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 2/2] page-flags: Catch the double setter of page flags

2019-02-11 Thread Peter Zijlstra
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 > follow trylock_page() which is much safer version of

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

2019-02-11 Thread Chintan Pandya
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 follow trylock_page() which is much safer version of the same. But, for performance issues, we may not want to implement