Strigidaemon

John Tapsell johnflux at gmail.com
Fri Mar 28 21:04:50 GMT 2008


On 28/03/2008, Sebastian TrĂ¼g <strueg at mandriva.com> wrote:
> On Friday 28 March 2008 16:21:46 Anders Lund wrote:
>  > What is wrong with strigidaemon?
>  >
>  > It can't be that it is supposed to run at 80-99%CPU for hours after i boot!
>  > That is simply not acceptable.
>  >
>  > It is set to index my home directory.
>
>
> I have here locally a quick hack that makes Strigi use io-nice. It actually
>  makes Strigi much more usable. While it still uses a lot of CPU in the
>  initial indexing phase, it does not lock the whole system down.
>  Please find attached the stupid little patch (the reason for not committing is
>  that the patch is not well tested)

Could you add brackets to the 7|IOPRIO_CLASS_BE<<IOPRIO_CLASS_SHIFT  please?

Btw, why did you switch to using syscall instead of sys_ioprio_set ?

For the //FIXME: make cmake test    part, I don't think you need a
cmake test.  Tthe following should suffice:

#define HAVE_IONICE
/* Check if this system has ionice */
#if !defined(SYS_ioprio_get) || !defined(SYS_ioprio_set)
/* All new kernels have SYS_ioprio_get and _set defined, but for the
few that do not, here are the definitions */
#if defined(__i386__)
#define __NR_ioprio_set         289
#define __NR_ioprio_get         290
#elif defined(__ppc__) || defined(__powerpc__)
#define __NR_ioprio_set         273
#define __NR_ioprio_get         274
#elif defined(__x86_64__)
#define __NR_ioprio_set         251
#define __NR_ioprio_get         252
#elif defined(__ia64__)
#define __NR_ioprio_set         1274
#define __NR_ioprio_get         1275
#else
#ifdef __GNUC__
#warning "This architecture does not support IONICE.  Disabling ionice feature."
#endif
#undef HAVE_IONICE
#endif
/* Map these to SYS_ioprio_get */
#define SYS_ioprio_get                __NR_ioprio_get
#define SYS_ioprio_set                __NR_ioprio_set

#endif /* !SYS_ioprio_get */

(This is what I use in
kdebase/workspace/libs/ksysguard/processcore/processes_linux_p.cpp )

John




More information about the kde-core-devel mailing list