lkml.org 
[lkml]   [2009]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] irq threading: fix PF_HARDIRQ definition

* Ingo Molnar <mingo@elte.hu> wrote:

> hardirq_count() is correct, but looking at PF_HARDIRQ's definition in sched.h:
>
> #define PF_EXITPIDONE 0x00000008 /* pi exit done on shut down */
> #define PF_VCPU 0x00000010 /* I'm a virtual CPU */
> #define PF_HARDIRQ 0x08000020 /* hardirq context */
> #define PF_NOSCHED 0x00000020 /* Userspace does not expect scheduling */
> #define PF_FORKNOEXEC 0x00000040 /* forked but didn't exec */
>
> Reveals that due to a typo it not only overlaps the PF_NOSCHED bit, but
> also has a spurious 0x08000000 component.

The reason is that when we forward ported the definition, i first moved it
to the 0x08000000 slot - but that slot was already taken. (our PF_ task
flag space is really crowded ...)

Then i moved it to a free spot, 0x20. Or so i thought: a later -rt patch
in the queue introduced PF_NOSCHED which overlapped it.

But the bigger problem was the spurious 0x08000000 component, which overlaps
with:

#define PF_SOFTIRQ 0x08000000 /* softirq context */

Explaining why the warning triggered in ksoftirqd ;-)

Anyway, my fix should solve this. Do you still see the lockup under X? (make
sure you also have the IPI fix applied, see the patch in this same thread.)

Ingo


\
 
 \ /
  Last update: 2009-02-12 09:45    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog