lkml.org 
[lkml]   [2002]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] misc. kernel preemption bits
Robert Love wrote:
>
> On Thu, 2002-08-29 at 14:24, Andrew Morton wrote:
>
> > Robert Love wrote:
> > >
> > > ...
> > > - we have a debug check in preempt_schedule that, even
> > > on detecting a schedule with irqs disabled, still goes
> > > ahead and reschedules. We should return. (me)
> > >
> >
> > OK, but that warning will still come out of the mess in mm/slab.c.
>
> Yah I saw your previous post. There is also a report or two re oops on
> poisoned memory with SLAB_DEBUG and preempt enabled - which should be
> fixed by the above return but one report says it does not.
>
> Anyhow, your new methods are fine... if they work, they work.
>
> I am starting to get concerned over the number of routines we are having
> to define. It is getting complicated (i.e. the
> inc_preempt_non_preempt() stuff).
>
> Maybe keep these local to mm/slab.c ?

Robert, I think what is needed is the changes I sent you for
spinlock.h and system.h. Could you convert to 2.5 and post?

All, I defined:
local_irq_restore_preempt(x)
local_irq_enable_preempt()
local_irq_restore_ck_preempt(x)
local_irq_enable_ck_preempt()

The preempt versions are to be used in the spin_unlock_*
macros. The ck_preempt versions in open code where we do
need to check preemption. I also redefined:
local_irq_enable()
local_irq_restore(x)
to call _local_irq_* and then test_preempt(x).
test_preempt() then, if CONFIG_ enables, prints warning
message the first time a test AFTER the irq restore finds a
preemptable condition AND if restore, the interrupt system
is now on.

The net result is that all the code is the same, but we can
now turn on a test to see if there are some preemptions we
are missing. Usually this would come from turning off
interrupts while wake-up is called.
--
George Anzinger george@mvista.com
High-res-timers:
http://sourceforge.net/projects/high-res-timers/
Preemption patch:
http://www.kernel.org/pub/linux/kernel/people/rml
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.045 / U:2.640 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site