[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Strigidaemon
From:       "John Tapsell" <johnflux () gmail ! com>
Date:       2008-03-28 21:04:50
Message-ID: 43d8ce650803281404u8d55aaaje1a439e01c70b266 () mail ! gmail ! com
[Download RAW message or body]

On 28/03/2008, Sebastian Trüg <strueg@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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic