[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YeokbrpCdAGAYHEl@xz-m1.local>
Date: Fri, 21 Jan 2022 11:11:42 +0800
From: Peter Xu <peterx@...hat.com>
To: Hugh Dickins <hughd@...gle.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
David Hildenbrand <david@...hat.com>,
Andrea Arcangeli <aarcange@...hat.com>,
Yang Shi <shy828301@...il.com>,
Vlastimil Babka <vbabka@...e.cz>,
Andrew Morton <akpm@...ux-foundation.org>,
Alistair Popple <apopple@...dia.com>,
"Kirill A . Shutemov" <kirill@...temov.name>,
Matthew Wilcox <willy@...radead.org>
Subject: Re: [PATCH RFC v2 1/2] mm: Don't skip swap entry even if zap_details
specified
On Thu, Jan 20, 2022 at 06:32:29PM +0800, Peter Xu wrote:
> > Except that here we have no page to check, so it looks like you'll
> > have to change should_zap_page() to deal with this case too, or just
> > check details->check_mapping directly.
>
> Yeah I prefer this, as we don't have the page* pointer anyway.
>
> > Which raises the question again
> > of why I did not just use a boolean flag there originally: aah, I think
> > I've found why. In those days there was a horrible "optimization", for
> > better performance on some benchmark I guess, which when you read from
> > /dev/zero into a private mapping, would map the zero page there (look
> > up read_zero_pagealigned() and zeromap_page_range() if you dare). So
> > there was another category of page to be skipped along with the anon
> > COWs, and I didn't want multiple tests in the zap loop, so checking
> > check_mapping against page->mapping did both. I think nowadays you
> > could do it by checking for PageAnon page (or genuine swap entry)
> > instead.
>
> It must be PageAnon already, isn't it?
I think I see what you meant now..
I assume the special case is gone, how about I switch zap_mappings back into
a boolean altogether in this patchset? Thanks,
--
Peter Xu
Powered by blists - more mailing lists