[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5720B7F4.80505@suse.cz>
Date: Wed, 27 Apr 2016 15:00:36 +0200
From: Vlastimil Babka <vbabka@...e.cz>
To: Mel Gorman <mgorman@...hsingularity.net>
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org,
Jesper Dangaard Brouer <brouer@...hat.com>
Subject: Re: [PATCH 2/3] mm, page_alloc: pull out side effects from
free_pages_check
On 04/27/2016 02:41 PM, Mel Gorman wrote:
> On Wed, Apr 27, 2016 at 02:01:15PM +0200, Vlastimil Babka wrote:
>> Check without side-effects should be easier to maintain. It also removes the
>> duplicated cpupid and flags reset done in !DEBUG_VM variant of both
>> free_pcp_prepare() and then bulkfree_pcp_prepare(). Finally, it enables
>> the next patch.
>>
>
> Hmm, now the cpuid and flags reset is done in multiple places. While
> this is potentially faster, it goes against the comment "I don't like the
> duplicated code in free_pcp_prepare() from maintenance perspective".
After patch 3/3 it's done only in free_pages_prepare() which I think is
not that bad, even though it's two places there. Tail pages are already
special in that function. And I thought that the fact it was done twice
in !DEBUG_VM free path was actually not intentional, but a consequence
of the side-effect being unexpected. But it's close to bike-shedding
area so I don't insist. Anyway, overal I like the code after patch 3/3
better than before 2/3.
Powered by blists - more mailing lists