lkml.org 
[lkml]   [2009]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm: fix lazy vmap purging (use-after-free error)

* Andrew Morton <akpm@linux-foundation.org> wrote:

> On Mon, 23 Feb 2009 20:33:51 +0100
> Ingo Molnar <mingo@elte.hu> wrote:
>
> > > > > Nice work all (btw. if this patch goes in rather than using system_state,
> > > > > then please make the variable __read_mostly).
> > > >
> > > > Hmmm... I misread this and made system_state be __read_mostly. Let
> > > > me know if this is bad, easy to fix if needed.
> > >
> > > Please don't use system_state. The whole thing is just bad
> > > design. It's a global variable, breaks encapsulation, creates
> > > interactions etc. CS-101 stuff.
> >
> > ok, i've removed the patch
>
> Thanks.
>
> > - Paul, would you mind to re-send your original flag
> > solution, with it marked __read_mostly and with the extern
> > declarations put into a suitable header file?
>
> It would still make sense to mark system_state __read_mostly.
>
> (That's assuming that __read_mostly makes sense. I still
> wanna rename it to
> __pack_all_write_often_variables_into_the_same_cacheline and
> see what happens then)

the write often variables should be on separate cachelines.
Putting them on the same cacheline as a read-mostly variable is
not helpful.

Ingo


\
 
 \ /
  Last update: 2009-02-23 21:13    [W:0.064 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site