Messages in this thread | | | Date | Mon, 23 Feb 2009 21:09:25 +0100 | From | Ingo Molnar <> | Subject | Re: [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
| |