linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mel Gorman <mgorman@techsingularity.net>
To: Chen Wandun <chenwandun@huawei.com>
Cc: akpm@linux-foundation.org, vbabka@suse.cz, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, wangkefeng.wang@huawei.com
Subject: Re: [PATCH] mm: fix pcp count beyond pcp high in pcplist allocation
Date: Mon, 24 Oct 2022 15:55:55 +0100	[thread overview]
Message-ID: <20221024145555.oaoisy6m723h4axc@techsingularity.net> (raw)
In-Reply-To: <20221024134146.3442393-1-chenwandun@huawei.com>

On Mon, Oct 24, 2022 at 09:41:46PM +0800, Chen Wandun wrote:
> Nowadays there are several orders in pcplist, Function __rmqueue_pcplist
> would alloc pcp batch pages to refill pcplist, when list of target order
> if empty meanwhile other lists is not all empty, that result in pcp count
> beyond pcp high after allocation. This behaviour can be easily observed by
> adding debugging information in __rmqueue_pcplist.
> 
> Fix this by recalculate the batch pages to be allocated.

Are any problems observed other than the PCP lists temporarily exceed
pcp->high? As is, the patch could result in a batch request of 0 and
fall through to allocating from the zone list anyway defeating the
purpose of the PCP allocator and probably regressing performance in some
csaes.

The intention was to allow high to be briefly exceeded on the refill side,
particularly for THP pages and to always refill by at least two pages. In
the THP case, one would be allocated and maybe one in the near future
without acquiring the zone lock. If the limits are exceeded, it's only
exceeded until the next free.

-- 
Mel Gorman
SUSE Labs


  reply	other threads:[~2022-10-24 14:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-24 13:41 Chen Wandun
2022-10-24 14:55 ` Mel Gorman [this message]
2022-10-25 11:49   ` Chen Wandun
2022-10-25 13:19     ` Mel Gorman
2022-10-31  3:37       ` Chen Wandun
2022-11-01 10:40         ` Mel Gorman
2022-11-03 12:46           ` Chen Wandun

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=20221024145555.oaoisy6m723h4axc@techsingularity.net \
    --to=mgorman@techsingularity.net \
    --cc=akpm@linux-foundation.org \
    --cc=chenwandun@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=vbabka@suse.cz \
    --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