linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Nadav Amit <nadav.amit@gmail.com>
To: Mike Kravetz <mike.kravetz@oracle.com>
Cc: 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>,
	Peter Xu <peterx@redhat.com>, Rik van Riel <riel@surriel.com>,
	Vlastimil Babka <vbabka@suse.cz>,
	Matthew Wilcox <willy@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v9 0/3] fix hugetlb MADV_DONTNEED vma_lock handling
Date: Sat, 12 Nov 2022 11:37:12 -0800	[thread overview]
Message-ID: <78B2DE9B-C9D5-4E3F-8328-427590C5A610@gmail.com> (raw)
In-Reply-To: <20221111232628.290160-1-mike.kravetz@oracle.com>

On Nov 11, 2022, at 3:26 PM, Mike Kravetz <mike.kravetz@oracle.com> wrote:

> This series addresses the issue first reported in [1], and fully
> described in patch 3.  While exploring solutions to this issue,
> related problems with mmu notification calls were discovered.  The
> first two patches address those issues.
> 
> Previous discussions suggested further cleanup by removing the
> routine zap_page_range.  This is possible because zap_page_range_single
> is now exported, and all callers of zap_page_range pass ranges entirely
> within a single vma.  This work will be done in a later patch so as not
> to distract from this bug fix.
> 
> [1] https://lore.kernel.org/lkml/CAO4mrfdLMXsao9RF4fUE8-Wfde8xmjsKrTNMNC9wjUb6JudD0g@mail.gmail.com/
> 
> Mike Kravetz (3):
>  madvise: use zap_page_range_single for madvise dontneed
>  hugetlb: remove duplicate mmu notifications
>  hugetlb: don't delete vma_lock in hugetlb MADV_DONTNEED processing
> 
> include/linux/mm.h | 29 +++++++++++++++++++++--------
> mm/hugetlb.c       | 45 +++++++++++++++++++++++++--------------------
> mm/madvise.c       |  6 +++---
> mm/memory.c        | 25 ++++++++++++-------------
> 4 files changed, 61 insertions(+), 44 deletions(-)

With my limited knowledge of hugetlbfs, it all looks good.

Having said that - 2 random thoughts:

1. It is more intuitive to me to have
mmu_notifier_invalidate_range_{start|end}() next to tlb_{start|end}_vma().
I think that one day these two should have been combined into a
single function, which could have also executed
adjust_range_if_pmd_sharing_possible() as needed.

2. If you still have a concern of exposing zap_details as you had in the
past (not that I care), consider putting zap_details and
zap_page_range_single() in mm/internal.h.

Thanks,
Nadav

  parent reply	other threads:[~2022-11-12 19:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-11 23:26 Mike Kravetz
2022-11-11 23:26 ` [PATCH v9 1/3] madvise: use zap_page_range_single for madvise dontneed Mike Kravetz
2022-11-14  9:05   ` David Hildenbrand
2022-11-11 23:26 ` [PATCH v9 2/3] hugetlb: remove duplicate mmu notifications Mike Kravetz
2022-11-14  9:06   ` David Hildenbrand
2022-11-14 19:30     ` Mike Kravetz
2022-11-11 23:26 ` [PATCH v9 3/3] hugetlb: don't delete vma_lock in hugetlb MADV_DONTNEED processing Mike Kravetz
2022-11-12 19:37 ` Nadav Amit [this message]
2022-11-14  0:09 ` [PATCH v9 0/3] fix hugetlb MADV_DONTNEED vma_lock handling Peter Xu

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=78B2DE9B-C9D5-4E3F-8328-427590C5A610@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=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=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