From: Muchun Song <songmuchun@bytedance.com>
To: Mike Kravetz <mike.kravetz@oracle.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
stable@vger.kernel.org
Subject: Re: [PATCH] hugetlb: fix huge_pmd_unshare address update
Date: Thu, 26 May 2022 16:01:10 +0800 [thread overview]
Message-ID: <Yo8zxk0kCRikYk0x@FVFYT0MHHV2J.googleapis.com> (raw)
In-Reply-To: <20220524205003.126184-1-mike.kravetz@oracle.com>
On Tue, May 24, 2022 at 01:50:03PM -0700, Mike Kravetz wrote:
> The routine huge_pmd_unshare is passed a pointer to an address
> associated with an area which may be unshared. If unshare is successful
> this address is updated to 'optimize' callers iterating over huge page
> addresses. For the optimization to work correctly, address should be
> updated to the last huge page in the unmapped/unshared area. However,
> in the common case where the passed address is PUD_SIZE aligned, the
> address is incorrectly updated to the address of the preceding huge
> page. That wastes CPU cycles as the unmapped/unshared range is scanned
> twice.
>
> Cc: <stable@vger.kernel.org>
> Fixes: 39dde65c9940 ("shared page table for hugetlb page")
> Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
Acked-by: Muchun Song <songmuchun@bytedance.com>
Thanks.
prev parent reply other threads:[~2022-05-26 8:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-24 20:50 Mike Kravetz
2022-05-26 8:01 ` Muchun Song [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=Yo8zxk0kCRikYk0x@FVFYT0MHHV2J.googleapis.com \
--to=songmuchun@bytedance.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=stable@vger.kernel.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