All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Anzinger <george@mvista.com>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: lkml <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>,
	Ingo Oeser <ingo.oeser@informatik.tu-chemnitz.de>
Subject: Re: [PATCH] eliminte NMI entry/ exit code
Date: Fri, 12 Aug 2005 18:13:38 -0700	[thread overview]
Message-ID: <42FD4942.8050407@mvista.com> (raw)
In-Reply-To: <42FD4548.3060204@yahoo.com.au>

Nick Piggin wrote:
> George Anzinger wrote:
> 
>> The NMI entry and exit code fiddles with bits in the preempt count.  
>> If an NMI happens while some other code is doing the same, bits will 
>> be lost.  This patch removes this modify code from the NMI path till 
>> we can come up with something better.
>>
> 
> Humour me for a minute here...
> NMI restores preempt_count back to its old value upon exit, right?
> So what does a race case look like?

Normal code                   NMI
fetch preempt_count
add                   <-----  interrupt here add and store then subtract 
and store, darn!
store preempt_count

Ok, no problem.

The problem is in the RT code when PREEMPT_DEBUG is on.  The tests for 
reasonable counts fail because of the rather undefined state when NMI 
picks up the word.  The failure is on the NMI side...
> 

-- 
George Anzinger   george@mvista.com
HRT (High-res-timers):  http://sourceforge.net/projects/high-res-timers/

  reply	other threads:[~2005-08-13  1:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-13  0:45 [PATCH] eliminte NMI entry/ exit code George Anzinger
2005-08-13  0:56 ` Nick Piggin
2005-08-13  1:13   ` George Anzinger [this message]
2005-08-13  6:27     ` Zachary Amsden
2005-08-13 16:54       ` George Anzinger
2005-08-13  1:18 ` Linus Torvalds

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=42FD4942.8050407@mvista.com \
    --to=george@mvista.com \
    --cc=akpm@osdl.org \
    --cc=ingo.oeser@informatik.tu-chemnitz.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    /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.