Re: [PATCH v18 31/32] mm: Add explicit page decrement in exception path for isolate_lru_pages

2020-09-09 Thread Alexander Duyck
On Wed, Sep 9, 2020 at 11:24 AM Hugh Dickins wrote: > > On Wed, 9 Sep 2020, Alexander Duyck wrote: > > On Tue, Sep 8, 2020 at 6:01 PM Matthew Wilcox wrote: > > > On Mon, Aug 24, 2020 at 08:55:04PM +0800, Alex Shi wrote: > > > > +++ b/mm/vmscan.c > > > > @@ -1688,10 +1688,13 @@ static unsigned lon

Re: [PATCH v18 31/32] mm: Add explicit page decrement in exception path for isolate_lru_pages

2020-09-09 Thread Hugh Dickins
On Wed, 9 Sep 2020, Matthew Wilcox wrote: > On Wed, Sep 09, 2020 at 11:24:14AM -0700, Hugh Dickins wrote: > > After overnight reflection, my own preference would be simply to > > drop this patch. I think we are making altogether too much of a > > fuss here over what was simply correct as plain put

Re: [PATCH v18 31/32] mm: Add explicit page decrement in exception path for isolate_lru_pages

2020-09-09 Thread Matthew Wilcox
On Wed, Sep 09, 2020 at 11:24:14AM -0700, Hugh Dickins wrote: > After overnight reflection, my own preference would be simply to > drop this patch. I think we are making altogether too much of a > fuss here over what was simply correct as plain put_page() > (and further from correct if we change i

Re: [PATCH v18 31/32] mm: Add explicit page decrement in exception path for isolate_lru_pages

2020-09-09 Thread Hugh Dickins
On Wed, 9 Sep 2020, Alexander Duyck wrote: > On Tue, Sep 8, 2020 at 6:01 PM Matthew Wilcox wrote: > > On Mon, Aug 24, 2020 at 08:55:04PM +0800, Alex Shi wrote: > > > +++ b/mm/vmscan.c > > > @@ -1688,10 +1688,13 @@ static unsigned long isolate_lru_pages(unsigned > > > long nr_to_scan, > > > > > >

Re: [PATCH v18 31/32] mm: Add explicit page decrement in exception path for isolate_lru_pages

2020-09-09 Thread Matthew Wilcox
On Wed, Sep 09, 2020 at 08:43:38AM -0700, Alexander Duyck wrote: > On Tue, Sep 8, 2020 at 6:01 PM Matthew Wilcox wrote: > > > > On Mon, Aug 24, 2020 at 08:55:04PM +0800, Alex Shi wrote: > > > +++ b/mm/vmscan.c > > > @@ -1688,10 +1688,13 @@ static unsigned long isolate_lru_pages(unsigned > > > lon

Re: [PATCH v18 31/32] mm: Add explicit page decrement in exception path for isolate_lru_pages

2020-09-09 Thread Alexander Duyck
On Tue, Sep 8, 2020 at 6:01 PM Matthew Wilcox wrote: > > On Mon, Aug 24, 2020 at 08:55:04PM +0800, Alex Shi wrote: > > +++ b/mm/vmscan.c > > @@ -1688,10 +1688,13 @@ static unsigned long isolate_lru_pages(unsigned > > long nr_to_scan, > > > > if (!TestClearPageLRU(page)) { >

Re: [PATCH v18 31/32] mm: Add explicit page decrement in exception path for isolate_lru_pages

2020-09-08 Thread Matthew Wilcox
On Mon, Aug 24, 2020 at 08:55:04PM +0800, Alex Shi wrote: > +++ b/mm/vmscan.c > @@ -1688,10 +1688,13 @@ static unsigned long isolate_lru_pages(unsigned long > nr_to_scan, > > if (!TestClearPageLRU(page)) { > /* > -

[PATCH v18 31/32] mm: Add explicit page decrement in exception path for isolate_lru_pages

2020-08-24 Thread Alex Shi
From: Alexander Duyck In isolate_lru_pages we have an exception path where if we call get_page_unless_zero and that succeeds, but TestClearPageLRU fails we call put_page. Normally this would be problematic but due to the way that the calls are ordered and the fact that we are holding the LRU lock