Re: [RFC 2/2] page-flags: Catch the double setter of page flags

2019-02-11 Thread Linux Upstream
On 11/02/19 7:17 PM, Peter Zijlstra wrote: > On Mon, Feb 11, 2019 at 12:53:55PM +, Chintan Pandya wrote: >> Some of the page flags, like PG_locked is not supposed to >> be set twice. Currently, there is no protection around this >> and many callers directly tries to set this bit. Others >>

Re: [RFC 1/2] page-flags: Make page lock operation atomic

2019-02-11 Thread Linux Upstream
On 11/02/19 7:16 PM, Peter Zijlstra wrote: > On Mon, Feb 11, 2019 at 12:53:53PM +, Chintan Pandya wrote: >> Currently, page lock operation is non-atomic. This is opening >> some scope for race condition. For ex, if 2 threads are accessing >> same page flags, it may happen that our desired