[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Yo8zxk0kCRikYk0x@FVFYT0MHHV2J.googleapis.com>
Date: Thu, 26 May 2022 16:01:10 +0800
From: Muchun Song <songmuchun@...edance.com>
To: Mike Kravetz <mike.kravetz@...cle.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
stable@...r.kernel.org
Subject: Re: [PATCH] hugetlb: fix huge_pmd_unshare address update
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@...r.kernel.org>
> Fixes: 39dde65c9940 ("shared page table for hugetlb page")
> Signed-off-by: Mike Kravetz <mike.kravetz@...cle.com>
Acked-by: Muchun Song <songmuchun@...edance.com>
Thanks.
Powered by blists - more mailing lists