[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220908132538.kjqas6q2i24mrsug@box.shutemov.name>
Date: Thu, 8 Sep 2022 16:25:38 +0300
From: "Kirill A. Shutemov" <kirill@...temov.name>
To: Liu Shixin <liushixin2@...wei.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
"Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
Andrea Arcangeli <aarcange@...hat.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org,
Kefeng Wang <wangkefeng.wang@...wei.com>
Subject: Re: [PATCH v2] mm/huge_memory: prevent THP_ZERO_PAGE_ALLOC increased
twice
On Thu, Sep 08, 2022 at 09:07:04PM +0800, Liu Shixin wrote:
>
>
> On 2022/9/8 20:31, Kirill A. Shutemov wrote:
> > On Thu, Sep 08, 2022 at 11:55:33AM +0800, Liu Shixin wrote:
> >> If two or more threads call get_huge_zero_page concurrently,
> >> THP_ZERO_PAGE_ALLOC may increased two or more times. But actually,
> >> this should only count as once since the extra zero pages has been
> >> freed. Redefine its meaning to indicate the times a huge zero page
> >> used for thp is successfully allocated.
> > I don't particularly care, but it is not obvoius why the new behaviour is
> > better.
> The user who read the value may be more concerned about the huge zero
> pages that are really allocated using for thp and can indicated the
> times of calling huge_zero_page_shrinker.
> I misunderstood when I first saw it.
Please, explain the motivation in the commit message.
--
Kiryl Shutsemau / Kirill A. Shutemov
Powered by blists - more mailing lists