mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Baolin Wang <baolin.wang@linux.alibaba.com>
To: Barry Song <baohua@kernel.org>
Cc: akpm@linux-foundation.org, david@kernel.org, hannes@cmpxchg.org,
	kasong@tencent.com, axelrasmussen@google.com, yuanchu@google.com,
	weixugc@google.com, baoquan.he@linux.dev, qi.zheng@linux.dev,
	shakeel.butt@linux.dev, mhocko@kernel.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: mglru: use pte_table_clamped_end() helper to calculate the end
Date: Fri, 13 Nov 2026 13:31:40 +0800	[thread overview]
Message-ID: <319d4cc3-93a9-46ad-9d03-ceb22d0f0aa2@linux.alibaba.com> (raw)
In-Reply-To: <CAGsJ_4y82CKoLx=HC8zUpHz+qwT8sNHjqT0bbrfLuCRYrWR1iQ@mail.gmail.com>



On 11/13/26 1:01 PM, Barry Song wrote:
> On Thu, Nov 12, 2026 at 7:13 PM Baolin Wang
> <baolin.wang@linux.alibaba.com> wrote:
>>
>> Use pte_table_clamped_end() to clamp the range to the PTE table and VMA
>> boundaries when batch-checking young flags, making the code more readable.
>>
>> No functional changes intended.
>>
>> Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
>> ---
>> Based on mm/core.git for-next branch.
>>
>> Note that this was found while reviewing David's series:
>> https://lore.kernel.org/all/c31cc8a0-c098-4784-a843-f13f51914094@linux.alibaba.com/
>> ---
>>   mm/vmscan.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/mm/vmscan.c b/mm/vmscan.c
>> index 5495d9be90e8..804d4188e7b4 100644
>> --- a/mm/vmscan.c
>> +++ b/mm/vmscan.c
>> @@ -4470,7 +4470,7 @@ bool lru_gen_look_around(struct page_vma_mapped_walk *pvmw, unsigned int nr)
>>          walk = current->reclaim_state ? current->reclaim_state->mm_walk : NULL;
>>
>>          start = max(addr & PMD_MASK, vma->vm_start);
>> -       end = min(addr | ~PMD_MASK, vma->vm_end - 1) + 1;
>> +       end = pte_table_clamped_end(addr, vma->vm_end);
> 
> 
> We don't have pte_table_clamped_end() in Andrew's tree yet;
> it's part of David's patch:
> 
> https://lore.kernel.org/all/20261111-pte_table_clamped_end-v1-1-2dbe339c487a@kernel.org/
> 
> So we're not going through Andrew's tree for this patch, right?

Yes. I think David will pick up this follow-up.

      reply	other threads:[~2026-11-13  5:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12 11:12 Baolin Wang
2026-11-13  5:01 ` Barry Song
2026-11-13  5:31   ` Baolin Wang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=319d4cc3-93a9-46ad-9d03-ceb22d0f0aa2@linux.alibaba.com \
    --to=baolin.wang@linux.alibaba.com \
    --cc=akpm@linux-foundation.org \
    --cc=axelrasmussen@google.com \
    --cc=baohua@kernel.org \
    --cc=baoquan.he@linux.dev \
    --cc=david@kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=kasong@tencent.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=qi.zheng@linux.dev \
    --cc=shakeel.butt@linux.dev \
    --cc=weixugc@google.com \
    --cc=yuanchu@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®