[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20df6650c834b3d2d6e5d7062876ee6a1e997dba.camel@surriel.com>
Date: Tue, 30 Jul 2024 14:07:39 -0400
From: Rik van Riel <riel@...riel.com>
To: Usama Arif <usamaarif642@...il.com>, akpm@...ux-foundation.org,
linux-mm@...ck.org
Cc: hannes@...xchg.org, shakeel.butt@...ux.dev, roman.gushchin@...ux.dev,
yuzhao@...gle.com, david@...hat.com, baohua@...nel.org,
ryan.roberts@....com, rppt@...nel.org, willy@...radead.org,
cerasuolodomenico@...il.com, corbet@....net, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org, kernel-team@...a.com, Shuang Zhai
<zhais@...gle.com>
Subject: Re: [PATCH 4/6] mm: don't remap unused subpages when splitting
isolated thp
On Tue, 2024-07-30 at 13:46 +0100, Usama Arif wrote:
>
> + /*
> + * The pmd entry mapping the old thp was flushed and the pte
> mapping
> + * this subpage has been non present. Therefore, this
> subpage is
> + * inaccessible. We don't need to remap it if it contains
> only zeros.
> + */
> + addr = kmap_local_page(page);
> + dirty = memchr_inv(addr, 0, PAGE_SIZE);
> + kunmap_local(addr);
> +
> + if (dirty)
> + return false;
>
A minor nitpick here. The word dirty has a few different meanings
in memory management already.
Could it be clearer to use something like "contains_data" ?
--
All Rights Reversed.
Powered by blists - more mailing lists