Re: [RFC PATCH] mm: use ACCESS_ONCE in page_cpupid_xchg_last()

2016-12-05 Thread Xishi Qiu
On 2016/12/5 16:50, Christian Borntraeger wrote: > On 12/05/2016 09:31 AM, Christian Borntraeger wrote: >> On 12/05/2016 09:23 AM, Xishi Qiu wrote: >>> By reading the code, I find the following code maybe optimized by >>> compiler, maybe page->flags and old_flags use the same register, >>> so use

Re: [RFC PATCH] mm: use ACCESS_ONCE in page_cpupid_xchg_last()

2016-12-05 Thread Christian Borntraeger
On 12/05/2016 09:31 AM, Christian Borntraeger wrote: > On 12/05/2016 09:23 AM, Xishi Qiu wrote: >> By reading the code, I find the following code maybe optimized by >> compiler, maybe page->flags and old_flags use the same register, >> so use ACCESS_ONCE in page_cpupid_xchg_last() to fix the proble

Re: [RFC PATCH] mm: use ACCESS_ONCE in page_cpupid_xchg_last()

2016-12-05 Thread Christian Borntraeger
On 12/05/2016 09:23 AM, Xishi Qiu wrote: > By reading the code, I find the following code maybe optimized by > compiler, maybe page->flags and old_flags use the same register, > so use ACCESS_ONCE in page_cpupid_xchg_last() to fix the problem. please use READ_ONCE instead of ACCESS_ONCE for future

[RFC PATCH] mm: use ACCESS_ONCE in page_cpupid_xchg_last()

2016-12-05 Thread Xishi Qiu
By reading the code, I find the following code maybe optimized by compiler, maybe page->flags and old_flags use the same register, so use ACCESS_ONCE in page_cpupid_xchg_last() to fix the problem. Signed-off-by: Xishi Qiu --- mm/mmzone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif