[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <877btssz5b.fsf@oracle.com>
Date: Wed, 07 Jan 2026 16:53:36 -0800
From: Ankur Arora <ankur.a.arora@...cle.com>
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, david@...nel.org, bp@...en8.de,
dave.hansen@...ux.intel.com, hpa@...or.com, mingo@...hat.com,
mjguzik@...il.com, luto@...nel.org, peterz@...radead.org,
tglx@...utronix.de, willy@...radead.org, raghavendra.kt@....com,
chleroy@...nel.org, ioworker0@...il.com, lizhe.67@...edance.com,
boris.ostrovsky@...cle.com, konrad.wilk@...cle.com
Subject: Re: [PATCH] mm: folio_zero_user: (fixup) cache neighbouring pages
Hi Andrew,
Sorry, please ignore this patch.
Thanks
Ankur
Ankur Arora <ankur.a.arora@...cle.com> writes:
> Constify the unit computation. Also, cleans up the comment
> a little bit.
>
> Signed-off-by: Ankur Arora <ankur.a.arora@...cle.com>
> ---
> mm/memory.c | 20 ++++++++++----------
> 1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/mm/memory.c b/mm/memory.c
> index 11ad1db61929..95dc21ca120f 100644
> --- a/mm/memory.c
> +++ b/mm/memory.c
> @@ -7240,19 +7240,19 @@ static inline int process_huge_page(
> static void clear_contig_highpages(struct page *page, unsigned long addr,
> unsigned int nr_pages)
> {
> - unsigned int i, unit, count;
> -
> - might_sleep();
> + unsigned int i, count;
> /*
> - * When clearing we want to operate on the largest extent possible since
> - * that allows for extent based architecture specific optimizations.
> + * When clearing we want to operate on the largest extent possible to
> + * allow for for architecture specific extent based optimizations.
> *
> - * However, since the clearing interfaces (clear_user_highpages(),
> - * clear_user_pages(), clear_pages()), do not call cond_resched(), we
> - * limit the batch size when running under non-preemptible scheduling
> - * models.
> + * However, since clear_user_highpages() (and primitives clear_user_pages(),
> + * clear_pages()), do not call cond_resched(), limit the unit size when
> + * running under non-preemptible scheduling models.
> */
> - unit = preempt_model_preemptible() ? nr_pages : PROCESS_PAGES_NON_PREEMPT_BATCH;
> + const unsigned int unit = preempt_model_preemptible() ?
> + nr_pages : PROCESS_PAGES_NON_PREEMPT_BATCH;
> +
> + might_sleep();
>
> for (i = 0; i < nr_pages; i += count) {
> cond_resched();
--
ankur
Powered by blists - more mailing lists