From: Andrew Morton <akpm@linux-foundation.org>
To: Joshua Hahn <joshua.hahnjy@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>, Chris Mason <clm@fb.com>,
Vlastimil Babka <vbabka@suse.cz>,
Suren Baghdasaryan <surenb@gogle.com>,
Michal Hocko <mhocko@suse.com>,
Brendan Jackman <jackmanb@google.com>, Zi Yan <ziy@nvidia.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
kernel-team@meta.com
Subject: Re: [PATCH] mm/page_alloc: Occasionally relinquish zone lock in batch freeing
Date: Tue, 19 Aug 2025 22:41:11 -0700 [thread overview]
Message-ID: <20250819224111.e710eab683b7c7f941c7d1a7@linux-foundation.org> (raw)
In-Reply-To: <20250818185804.21044-1-joshua.hahnjy@gmail.com>
On Mon, 18 Aug 2025 11:58:03 -0700 Joshua Hahn <joshua.hahnjy@gmail.com> wrote:
> While testing workloads with high sustained memory pressure on large machines
> (1TB memory, 316 CPUs), we saw an unexpectedly high number of softlockups.
> Further investigation showed that the lock in free_pcppages_bulk was being held
> for a long time, even being held while 2k+ pages were being freed.
It would be interesting to share some of those softlockup traces.
We have this CONFIG_PCP_BATCH_SCALE_MAX which appears to exist to
address precisely this issue. But only about half of the
free_pcppages_bulk() callers actually honor it.
So perhaps the fix is to fix the callers which forgot to implement this?
- decay_pcp_high() tried to implement CONFIG_PCP_BATCH_SCALE_MAX, but
that code hurts my brain.
- drain_pages_zone() implements it but, regrettably, doesn't use it
to periodically release pcp->lock. Room for improvement there.
next prev parent reply other threads:[~2025-08-20 5:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-18 18:58 [PATCH] mm/page_alloc: Occasionally relinquish zone lock in batch freeing Joshua Hahn
2025-08-19 0:13 ` Andrew Morton
2025-08-19 15:18 ` Joshua Hahn
2025-08-19 21:44 ` Andrew Morton
2025-08-20 13:20 ` Joshua Hahn
2025-08-19 9:15 ` Kiryl Shutsemau
2025-08-19 15:28 ` Joshua Hahn
2025-08-19 17:15 ` Shakeel Butt
2025-08-20 12:58 ` Kiryl Shutsemau
2025-08-19 15:34 ` Joshua Hahn
2025-08-20 1:29 ` Hillf Danton
2025-08-20 15:13 ` Joshua Hahn
2025-08-21 1:03 ` Hillf Danton
2025-08-20 5:41 ` Andrew Morton [this message]
2025-08-20 15:48 ` Joshua Hahn
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=20250819224111.e710eab683b7c7f941c7d1a7@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=clm@fb.com \
--cc=hannes@cmpxchg.org \
--cc=jackmanb@google.com \
--cc=joshua.hahnjy@gmail.com \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=surenb@gogle.com \
--cc=vbabka@suse.cz \
--cc=ziy@nvidia.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;
as well as URLs for NNTP newsgroup(s).