linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Liu Shixin <liushixin2@huawei.com>
To: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
	Andrea Arcangeli <aarcange@redhat.com>, <linux-mm@kvack.org>,
	<linux-kernel@vger.kernel.org>,
	Kefeng Wang <wangkefeng.wang@huawei.com>
Subject: Re: [PATCH v2] mm/huge_memory: prevent THP_ZERO_PAGE_ALLOC increased twice
Date: Thu, 8 Sep 2022 21:07:04 +0800	[thread overview]
Message-ID: <84a82033-ceb5-d8a2-3bae-a31574a5ff28@huawei.com> (raw)
In-Reply-To: <20220908123102.rpihrmisv55j3b2o@box.shutemov.name>



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.
>
> All huge zero pages are freed apart from possibly the last one allocated.
>



  reply	other threads:[~2022-09-08 13:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-08  3:55 Liu Shixin
2022-09-08 12:31 ` Kirill A. Shutemov
2022-09-08 13:07   ` Liu Shixin [this message]
2022-09-08 13:25     ` Kirill A. Shutemov
2022-09-09  1:46       ` Liu Shixin

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=84a82033-ceb5-d8a2-3bae-a31574a5ff28@huawei.com \
    --to=liushixin2@huawei.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=kirill@shutemov.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=wangkefeng.wang@huawei.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