linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Muchun Song <songmuchun@bytedance.com>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>,
	akpm@linux-foundation.org, mike.kravetz@oracle.com,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: hugetlb: Add missing cache flushing in hugetlb_unshare_all_pmds()
Date: Tue, 26 Apr 2022 13:34:36 -0400	[thread overview]
Message-ID: <YmgtLProFiMsyouf@xz-m1.local> (raw)
In-Reply-To: <YmT//huUbFX+KHcy@FVFYT0MHHV2J.usts.net>

On Sun, Apr 24, 2022 at 03:45:02PM +0800, Muchun Song wrote:
> On Sun, Apr 24, 2022 at 02:33:19PM +0800, Baolin Wang wrote:
> > Missed calling flush_cache_range() before removing the sharing PMD entrires,
> > otherwise data consistence issue may be occurred on some architectures whose
> > caches are strict and require a virtual–>physical translation to exist for
> > a virtual address. Thus add it.
> > 
> > Fixes: 6dfeaff93be1 ("hugetlb/userfaultfd: unshare all pmds for hugetlbfs when register wp")
> > Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
> 
> CONFIG_ARCH_WANT_HUGE_PMD_SHARE is only definded on riscv, arm64 and
> x86.  All of them do not have a VIVT cache.  In others words,
> flush_cache_range() is null on those architectures. So I suspect
> in practice this does not cause any issue.  It is better to
> clarify this in commit log.

Looks correct.

> 
> Anyway:
> 
> Reviewed-by: Muchun Song <songmuchun@bytedance.com>

Reviewed-by: Peter Xu <peterx@redhat.com>

Thanks,

-- 
Peter Xu



      parent reply	other threads:[~2022-04-26 17:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-24  6:33 Baolin Wang
2022-04-24  7:45 ` Muchun Song
2022-04-24 10:03   ` Baolin Wang
2022-04-26 17:34   ` Peter Xu [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=YmgtLProFiMsyouf@xz-m1.local \
    --to=peterx@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mike.kravetz@oracle.com \
    --cc=songmuchun@bytedance.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