Re: [RFC][PATCH 2/5] mm: Switch mod_state() to __this_cpu_read()

From: Valdis . Kletnieks
Date: Tue Sep 20 2011 - 18:20:45 EST


On Tue, 20 Sep 2011 10:54:10 CDT, Christoph Lameter said:
> IT DOES!!!! The memcg bug is caused by someone using this_cpu_read and
> expecting the cpu not to change. this_cpu_xx ops stand on their own and do
> not guarantee access to the same per cpu area.

As most 6 year olds will tell you, "Well, DUH!". Maybe if you had called it
"this_cpu_or_maybe_that_one_over_there_read()", people wouldn't use it wrong.

"If people place a nice chocky in their mouth, they don't want their cheeks
pierced. In any case this is an inadequate description of the sweetmeat. I
shall have to ask you to accompany me to the station." -- Monty Python.

"inadequate description" hardly begins to cover the design of this API, which
definitely needs to be taken to the station.

Attachment: pgp00000.pgp
Description: PGP signature