lkml.org 
[lkml]   [2009]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Buggy IPI and MTRR code on low memory

On Wed, 28 Jan 2009, Peter Zijlstra wrote:

> On Wed, 2009-01-28 at 12:24 -0500, Steven Rostedt wrote:
> > On Wed, 28 Jan 2009, Peter Zijlstra wrote:
> > > ---
> > > Subject: x86: fix potential deadlock in set_mtrr()
> > > From: Peter Zijlstra <a.p.zijlstra@chello.nl>
> > > Date: Wed Jan 28 17:17:32 CET 2009
> > >
> > > smp_call_function() can fall-back to waiting on completion in case of
> > > low memory (GFP_ATOMIC). set_mtrr() relies on the async behaviour of !wait.
> > >
> > > This would deadlock.
> > >
> > > Fix this by providing per-cpu csd's and using __smp_call_function_single().
> >
> > I applied the patch but it still locked up in the testing NMI
> > watchdog code. Not saying your patch is at fault, because we never made it
> > to your code. This is probably not an issue, since if we have low memory
> > at bootup, we have much bigger problems to deal with.
> >
> > I'll have skip the NMI test and see if it locks up any place else.
>
> Right, the NMI code does exactly the same, in that case your patch might
> well be the best way forward.

Is there any reason to force the user to have to deal with a wait? We can
add this code to handle the failed alloc case, and I can even make it a
bit better to only do the copy *d = data; when the RELEASE flag is set.

-- Steve



\
 
 \ /
  Last update: 2009-01-28 19:55    [from the cache]
©2003-2011 Jasper Spaans