From: David Hildenbrand <david@redhat.com>
To: Barry Song <21cnbao@gmail.com>,
akpm@linux-foundation.org, linux-mm@kvack.org
Cc: baolin.wang@linux.alibaba.com, chrisl@kernel.org,
ioworker0@gmail.com, kasong@tencent.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
lorenzo.stoakes@oracle.com, ryan.roberts@arm.com,
v-songbaohua@oppo.com, x86@kernel.org, ying.huang@intel.com,
zhengtangquan@oppo.com
Subject: Re: [PATCH v3 3/4] mm: Support batched unmap for lazyfree large folios during reclamation
Date: Tue, 4 Feb 2025 12:38:31 +0100 [thread overview]
Message-ID: <0785a15e-29fb-4801-9743-3d08e381d506@redhat.com> (raw)
In-Reply-To: <20250115033808.40641-4-21cnbao@gmail.com>
Hi,
> unsigned long hsz = 0;
>
> @@ -1780,6 +1800,16 @@ static bool try_to_unmap_one(struct folio *folio, struct vm_area_struct *vma,
> hugetlb_vma_unlock_write(vma);
> }
> pteval = huge_ptep_clear_flush(vma, address, pvmw.pte);
> + } else if (folio_test_large(folio) && !(flags & TTU_HWPOISON) &&
> + can_batch_unmap_folio_ptes(address, folio, pvmw.pte)) {
> + nr_pages = folio_nr_pages(folio);
> + flush_cache_range(vma, range.start, range.end);
> + pteval = get_and_clear_full_ptes(mm, address, pvmw.pte, nr_pages, 0);
> + if (should_defer_flush(mm, flags))
> + set_tlb_ubc_flush_pending(mm, pteval, address,
> + address + folio_size(folio));
> + else
> + flush_tlb_range(vma, range.start, range.end);
> } else {
I have some fixes [1] that will collide with this series. I'm currently
preparing a v2, and am not 100% sure when the fixes will get queued+merged.
I'll base them against mm-stable for now, and send them out based on
that, to avoid the conflicts here (should all be fairly easy to resolve
from a quick glimpse).
So we might have to refresh this series here if the fixes go in first.
[1] https://lkml.kernel.org/r/20250129115411.2077152-1-david@redhat.com
--
Cheers,
David / dhildenb
next prev parent reply other threads:[~2025-02-04 11:38 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-15 3:38 [PATCH v3 0/4] mm: batched unmap " Barry Song
2025-01-15 3:38 ` [PATCH v3 1/4] mm: Set folio swapbacked iff folios are dirty in try_to_unmap_one Barry Song
2025-01-15 3:38 ` [PATCH v3 2/4] mm: Support tlbbatch flush for a range of PTEs Barry Song
2025-01-16 8:30 ` Kefeng Wang
2025-01-15 3:38 ` [PATCH v3 3/4] mm: Support batched unmap for lazyfree large folios during reclamation Barry Song
2025-02-04 11:38 ` David Hildenbrand [this message]
2025-02-05 2:55 ` Andrew Morton
2025-02-05 3:35 ` Barry Song
2025-01-15 3:38 ` [PATCH v3 4/4] mm: Avoid splitting pmd for lazyfree pmd-mapped THP in try_to_unmap Barry Song
2025-01-15 5:01 ` Lance Yang
2025-01-15 5:09 ` Barry Song
2025-01-15 5:41 ` Lance Yang
2025-01-15 6:26 ` Lance Yang
2025-01-15 6:42 ` Barry Song
2025-01-15 7:01 ` Lance Yang
2025-01-17 1:30 ` Baolin Wang
2025-01-18 14:00 ` Lance Yang
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=0785a15e-29fb-4801-9743-3d08e381d506@redhat.com \
--to=david@redhat.com \
--cc=21cnbao@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=chrisl@kernel.org \
--cc=ioworker0@gmail.com \
--cc=kasong@tencent.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-riscv@lists.infradead.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=ryan.roberts@arm.com \
--cc=v-songbaohua@oppo.com \
--cc=x86@kernel.org \
--cc=ying.huang@intel.com \
--cc=zhengtangquan@oppo.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