linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Liu Shixin <liushixin2@huawei.com>
Cc: <linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>,
	Kefeng Wang <wangkefeng.wang@huawei.com>
Subject: Re: [PATCH] mm/huge_memory: prevent THP_ZERO_PAGE_ALLOC increased twice
Date: Mon, 5 Sep 2022 13:07:28 -0700	[thread overview]
Message-ID: <20220905130728.1e814d185b189faece6f2c2f@linux-foundation.org> (raw)
In-Reply-To: <20220905133813.2253703-1-liushixin2@huawei.com>

On Mon, 5 Sep 2022 21:38:13 +0800 Liu Shixin <liushixin2@huawei.com> 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.

Well, for better of for worse,
Documentation/admin-guide/mm/transhuge.rst says

thp_zero_page_alloc
	is incremented every time a huge zero page is
	successfully allocated. It includes allocations which where
	dropped due race with other allocation. Note, it doesn't count
	every map of the huge zero page, only its allocation.

If you think this interprtation should be changed then please explain
why, and let's be sure to update the documentation accordingly.



  reply	other threads:[~2022-09-05 20:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-05 13:38 Liu Shixin
2022-09-05 20:07 ` Andrew Morton [this message]
2022-09-06  1:52   ` Liu Shixin
2022-09-07 23:35     ` Andrew Morton
2022-09-08  3:28       ` 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=20220905130728.1e814d185b189faece6f2c2f@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --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