Re: [PATCH v2] mm/z3fold.c: Lock z3fold page before __SetPageMovable()

2019-07-03 Thread Henry Burns
On Tue, Jul 2, 2019 at 10:54 PM Vitaly Wool wrote: > > On Wed, Jul 3, 2019 at 12:24 AM Andrew Morton > wrote: > > > > On Tue, 2 Jul 2019 15:17:47 -0700 Henry Burns wrote: > > > > > > > > > + if (can_sleep) { > > > > > > > + lock_page(page); > > > > > > > + __Se

Re: [PATCH v2] mm/z3fold.c: Lock z3fold page before __SetPageMovable()

2019-07-02 Thread Vitaly Wool
On Wed, Jul 3, 2019 at 12:18 AM Henry Burns wrote: > > On Tue, Jul 2, 2019 at 2:19 PM Andrew Morton > wrote: > > > > On Mon, 1 Jul 2019 18:16:30 -0700 Henry Burns wrote: > > > > > Cc: Vitaly Wool , Vitaly Vul > > > > Are these the same person? > I Think it's the same person, but i wasn't sure

Re: [PATCH v2] mm/z3fold.c: Lock z3fold page before __SetPageMovable()

2019-07-02 Thread Vitaly Wool
On Wed, Jul 3, 2019 at 12:24 AM Andrew Morton wrote: > > On Tue, 2 Jul 2019 15:17:47 -0700 Henry Burns wrote: > > > > > > > + if (can_sleep) { > > > > > > + lock_page(page); > > > > > > + __SetPageMovable(page, pool->inode->i_mapping); > > > > > > +

Re: [PATCH v2] mm/z3fold.c: Lock z3fold page before __SetPageMovable()

2019-07-02 Thread Andrew Morton
On Mon, 1 Jul 2019 18:16:30 -0700 Henry Burns wrote: > Cc: Vitaly Wool , Vitaly Vul Are these the same person? > Subject: Re: [PATCH v2] mm/z3fold.c: Lock z3fold page before > __SetPageMovable() > Date: Mon, 1 Jul 2019 18:16:30 -0700 > > On Mon, Jul 1, 2019 at 6:00 PM S

Re: [PATCH v2] mm/z3fold.c: Lock z3fold page before __SetPageMovable()

2019-07-02 Thread Henry Burns
n the list of maintainers and I had contacted the other earlier. > > > Subject: Re: [PATCH v2] mm/z3fold.c: Lock z3fold page before > > __SetPageMovable() > > Date: Mon, 1 Jul 2019 18:16:30 -0700 > > > > On Mon, Jul 1, 2019 at 6:00 PM Shakeel Butt wrot

Re: [PATCH v2] mm/z3fold.c: Lock z3fold page before __SetPageMovable()

2019-07-02 Thread Andrew Morton
On Tue, 2 Jul 2019 15:17:47 -0700 Henry Burns wrote: > > > > > + if (can_sleep) { > > > > > + lock_page(page); > > > > > + __SetPageMovable(page, pool->inode->i_mapping); > > > > > + unlock_page(page); > > > > > + } else { > > > > > +

Re: [PATCH v2] mm/z3fold.c: Lock z3fold page before __SetPageMovable()

2019-07-02 Thread David Rientjes
On Mon, 1 Jul 2019, Henry Burns wrote: > __SetPageMovable() expects it's page to be locked, but z3fold.c doesn't > lock the page. Following zsmalloc.c's example we call trylock_page() and > unlock_page(). Also makes z3fold_page_migrate() assert that newpage is > passed in locked, as documentation.

Re: [PATCH v2] mm/z3fold.c: Lock z3fold page before __SetPageMovable()

2019-07-02 Thread Vitaly Wool
On Tue, Jul 2, 2019 at 3:51 AM Henry Burns wrote: > > __SetPageMovable() expects it's page to be locked, but z3fold.c doesn't > lock the page. Following zsmalloc.c's example we call trylock_page() and > unlock_page(). Also makes z3fold_page_migrate() assert that newpage is > passed in locked, as d

Re: [PATCH v2] mm/z3fold.c: Lock z3fold page before __SetPageMovable()

2019-07-01 Thread Henry Burns
On Mon, Jul 1, 2019 at 6:00 PM Shakeel Butt wrote: > > On Mon, Jul 1, 2019 at 5:51 PM Henry Burns wrote: > > > > __SetPageMovable() expects it's page to be locked, but z3fold.c doesn't > > lock the page. Following zsmalloc.c's example we call trylock_page() and > > unlock_page(). Also makes z3fol

Re: [PATCH v2] mm/z3fold.c: Lock z3fold page before __SetPageMovable()

2019-07-01 Thread Shakeel Butt
On Mon, Jul 1, 2019 at 5:51 PM Henry Burns wrote: > > __SetPageMovable() expects it's page to be locked, but z3fold.c doesn't > lock the page. Following zsmalloc.c's example we call trylock_page() and > unlock_page(). Also makes z3fold_page_migrate() assert that newpage is > passed in locked, as d

[PATCH v2] mm/z3fold.c: Lock z3fold page before __SetPageMovable()

2019-07-01 Thread Henry Burns
__SetPageMovable() expects it's page to be locked, but z3fold.c doesn't lock the page. Following zsmalloc.c's example we call trylock_page() and unlock_page(). Also makes z3fold_page_migrate() assert that newpage is passed in locked, as documentation. Signed-off-by: Henry Burns Suggested-by: Vita