From: Nadav Amit <nadav.amit@gmail.com>
To: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Peter Xu <peterx@redhat.com>, Linux-MM <linux-mm@kvack.org>,
kernel list <linux-kernel@vger.kernel.org>,
Naoya Horiguchi <naoya.horiguchi@linux.dev>,
David Hildenbrand <david@redhat.com>,
Axel Rasmussen <axelrasmussen@google.com>,
Mina Almasry <almasrymina@google.com>,
Rik van Riel <riel@surriel.com>, Vlastimil Babka <vbabka@suse.cz>,
Matthew Wilcox <willy@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
Wei Chen <harperchen1110@gmail.com>,
stable@vger.kernel.org
Subject: Re: [PATCH v2] hugetlb: don't delete vma_lock in hugetlb MADV_DONTNEED processing
Date: Sat, 29 Oct 2022 17:54:44 -0700 [thread overview]
Message-ID: <7048D2B5-5FA5-4F72-8FDC-A02411CFD71D@gmail.com> (raw)
In-Reply-To: <Y13CO8iIGfDnV24u@monkey>
On Oct 29, 2022, at 5:15 PM, Mike Kravetz <mike.kravetz@oracle.com> wrote:
> zap_page_range is a bit confusing. It appears that the passed range can
> span multiple vmas. Otherwise, there would be no do while loop. Yet, there
> is only one mmu_notifier_range_init call specifying the passed vma.
>
> It appears all callers pass a range entirely within a single vma.
>
> The modifications above would work for a range within a single vma. However,
> things would be more complicated if the range can indeed span multiple vmas.
> For multiple vmas, we would need to check the first and last vmas for
> pmd sharing.
>
> Anyone know more about this seeming confusing behavior? Perhaps, range
> spanning multiple vmas was left over earlier code?
I don’t have personal knowledge, but I noticed that it does not make much
sense, at least for MADV_DONTNEED. I tried to batch the TLB flushes across
VMAs for madvise’s. [1]
Need to get to it sometime.
[1] https://lore.kernel.org/lkml/20210926161259.238054-7-namit@vmware.com/
next prev parent reply other threads:[~2022-10-30 0:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-23 2:50 Mike Kravetz
2022-10-24 21:55 ` Mike Kravetz
2022-10-24 23:14 ` Mike Kravetz
2022-10-26 21:42 ` Peter Xu
2022-10-26 23:54 ` Mike Kravetz
2022-10-27 1:12 ` Peter Xu
2022-10-28 15:23 ` Mike Kravetz
2022-10-28 16:13 ` Peter Xu
2022-10-28 21:17 ` Mike Kravetz
2022-10-28 23:20 ` Peter Xu
2022-10-30 0:15 ` Mike Kravetz
2022-10-30 0:54 ` Nadav Amit [this message]
2022-10-30 18:43 ` Peter Xu
2022-10-30 18:52 ` Nadav Amit
2022-10-31 1:44 ` Mike Kravetz
2022-11-02 19:24 ` Peter Xu
2022-11-07 20:01 ` Mike Kravetz
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=7048D2B5-5FA5-4F72-8FDC-A02411CFD71D@gmail.com \
--to=nadav.amit@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=almasrymina@google.com \
--cc=axelrasmussen@google.com \
--cc=david@redhat.com \
--cc=harperchen1110@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=naoya.horiguchi@linux.dev \
--cc=peterx@redhat.com \
--cc=riel@surriel.com \
--cc=stable@vger.kernel.org \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
/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