linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Liu Shixin <liushixin2@huawei.com>
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 15:31:02 +0300	[thread overview]
Message-ID: <20220908123102.rpihrmisv55j3b2o@box.shutemov.name> (raw)
In-Reply-To: <20220908035533.2186159-1-liushixin2@huawei.com>

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.

All huge zero pages are freed apart from possibly the last one allocated.

-- 
  Kiryl Shutsemau / Kirill A. Shutemov


  reply	other threads:[~2022-09-08 12:31 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 [this message]
2022-09-08 13:07   ` Liu Shixin
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=20220908123102.rpihrmisv55j3b2o@box.shutemov.name \
    --to=kirill@shutemov.name \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=liushixin2@huawei.com \
    --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