All of lore.kernel.org
 help / color / mirror / Atom feed
From: george anzinger <george@mvista.com>
To: Robert Love <rml@tech9.net>
Cc: Andrew Morton <akpm@zip.com.au>,
	torvalds@transmeta.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] misc. kernel preemption bits
Date: Thu, 29 Aug 2002 14:07:05 -0700	[thread overview]
Message-ID: <3D6E8CF9.D07253A2@mvista.com> (raw)
In-Reply-To: 1030648286.979.2597.camel@phantasy

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

  reply	other threads:[~2002-08-29 21:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-29 15:33 [PATCH] misc. kernel preemption bits Robert Love
2002-08-29 18:24 ` Andrew Morton
2002-08-29 19:11   ` Robert Love
2002-08-29 21:07     ` george anzinger [this message]
2002-08-29 18:38 ` Linus Torvalds
2002-08-29 18:39   ` Robert Love

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D6E8CF9.D07253A2@mvista.com \
    --to=george@mvista.com \
    --cc=akpm@zip.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rml@tech9.net \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.