[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZPsdIJn1Ef/3uNpL@casper.infradead.org>
Date: Fri, 8 Sep 2023 14:09:52 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Ankur Arora <ankur.a.arora@...cle.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org, x86@...nel.org,
akpm@...ux-foundation.org, luto@...nel.org, bp@...en8.de,
dave.hansen@...ux.intel.com, hpa@...or.com, mingo@...hat.com,
juri.lelli@...hat.com, vincent.guittot@...aro.org, mgorman@...e.de,
peterz@...radead.org, rostedt@...dmis.org, tglx@...utronix.de,
jon.grimm@....com, bharata@....com, raghavendra.kt@....com,
boris.ostrovsky@...cle.com, konrad.wilk@...cle.com
Subject: Re: [PATCH v2 3/9] mm/huge_page: cleanup clear_/copy_subpage()
On Wed, Aug 30, 2023 at 11:49:52AM -0700, Ankur Arora wrote:
> @@ -5945,9 +5935,7 @@ static int __clear_huge_page(
> /* Process subpages at the end of huge page */
> for (i = pages_per_huge_page - 1; i >= 2 * n; i--) {
> cond_resched();
> - ret = process_subpage(addr + i * PAGE_SIZE, i, arg);
> - if (ret)
> - return ret;
> + clear_user_highpage(page + i, addr + i * PAGE_SIZE);
It's possible for a 1GB page to cross a memmap discontiguity. This
needs to be:
clear_user_highpage(nth_page(page, i),
addr + i * PAGE_SIZE);
(similarly in other places)
Powered by blists - more mailing lists