From: George Anzinger <george@mvista.com>
To: Zachary Amsden <zach@vmware.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>,
lkml <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>,
Ingo Oeser <ingo.oeser@informatik.tu-chemnitz.de>,
Linus Torvalds <torvalds@osdl.org>
Subject: Re: [PATCH] eliminte NMI entry/ exit code
Date: Sat, 13 Aug 2005 09:54:33 -0700 [thread overview]
Message-ID: <42FE25C9.6000805@mvista.com> (raw)
In-Reply-To: <42FD92E5.4020407@vmware.com>
Zachary Amsden wrote:
> George Anzinger wrote:
>
>> 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...
>
>
>
> So NMI changing the preempt count and restoring in the middle of a RWM
> is not the problem. Thus I don't understand what the issue is. NMI
> must undo all side effects. Does the PREEMPT_DEBUG code check the count
> somewhere within the NMI handler? If so, shouldn't the proper fix be to
> make that code aware that it could be running inside of an NMI and/or
> ensure that code is not called from within the NMI handler?
Yes that is the problem. The sanity check in PREEMPT_DEBUG fails when
called from the NMI handler.
>
--
George Anzinger george@mvista.com
HRT (High-res-timers): http://sourceforge.net/projects/high-res-timers/
next prev parent reply other threads:[~2005-08-13 16:56 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
2005-08-13 6:27 ` Zachary Amsden
2005-08-13 16:54 ` George Anzinger [this message]
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=42FE25C9.6000805@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 \
--cc=torvalds@osdl.org \
--cc=zach@vmware.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.