From: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>
To: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Matthew Brost" <matthew.brost@intel.com>,
"David Hildenbrand (Arm)" <david@kernel.org>
Cc: intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
Andrew Morton <akpm@linux-foundation.org>,
Lorenzo Stoakes <ljs@kernel.org>,
"Liam R. Howlett" <Liam.Howlett@oracle.com>,
Mike Rapoport <rppt@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Johannes Weiner <hannes@cmpxchg.org>
Subject: Re: [PATCH v2 1/5] mm: Introduce zone_appears_fragmented()
Date: Thu, 30 Apr 2026 19:06:48 +0200 [thread overview]
Message-ID: <59b3dab5-3341-46dc-851a-419790eaf403@kernel.org> (raw)
In-Reply-To: <f4324084f3808b9a42b87ec27bef7fe920dde9ea.camel@linux.intel.com>
On 4/30/26 09:47, Thomas Hellström wrote:
> On Wed, 2026-04-29 at 19:47 -0700, Matthew Brost wrote:
>>
>> So again, I think starting with wiring order into shrink_control and
>> this helper is a good place to start, as it fixes an immediate issue.
>>
>> Let me know if that seems like a reasonable direction.
>
> +1 for wiring order into shrink_control, and possibly also the priority
> as mentioned in an earlier email.
>
> However for cgroups-aware shrinkers, The number of free memory in a
> zone might not be an indication of fragmentation-triggered reclaim at
> all, it could be the result of the cgroup hitting its memory limits.
I'm not sure I understand your concern wrt cgroups, but some hopefully
relevant (and hopefully not wrong) points:
- fragmentation is a zone-related property, not cgroup
- hitting a cgroup limit doesn't wake up kswapd nor go through the usual
reclaim/compaction paths, it's a form of direct-reclaim-only
So I believe it should be easy to recognize when your shrinker is called for
memcg shrinking and not kswapd and thus it can't be happening due to zone
fragmentation but must be due to memcg limits, and then you probably don't
need to check zone_appears_fragmented() at all.
> So I think if we can solve this with a combination of GFP flags,
> plumbed-through order and plumbed-through priority, that would be
> ideal.
>
> Thanks,
> Thomas
>
>>
>> Matt
>>
>> >
>> >
>> > --
>> > Cheers,
>> >
>> > David
next prev parent reply other threads:[~2026-05-04 12:43 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-23 5:56 [PATCH v2 0/5] mm, drm/ttm, drm/xe: Avoid reclaim/eviction loops under fragmentation Matthew Brost
2026-04-23 5:56 ` [PATCH v2 1/5] mm: Introduce zone_appears_fragmented() Matthew Brost
2026-04-23 6:04 ` Balbir Singh
2026-04-23 6:16 ` Matthew Brost
2026-04-23 6:27 ` Matthew Brost
2026-04-23 10:27 ` David Hildenbrand (Arm)
2026-04-23 11:27 ` Thomas Hellström
2026-04-23 19:08 ` Matthew Brost
2026-04-23 22:21 ` Matthew Brost
2026-04-24 7:05 ` Thomas Hellström
2026-04-24 7:26 ` David Hildenbrand (Arm)
2026-04-30 2:47 ` Matthew Brost
2026-04-30 7:47 ` Thomas Hellström
2026-04-30 16:34 ` Matthew Brost
2026-04-30 19:59 ` Thomas Hellström
2026-04-30 17:06 ` Vlastimil Babka (SUSE) [this message]
2026-04-28 9:51 ` Andi Shyti
2026-04-28 10:05 ` Andi Shyti
2026-04-30 2:34 ` Matthew Brost
2026-04-30 2:37 ` Matthew Brost
2026-04-23 5:56 ` [PATCH v2 2/5] drm/ttm: Issue direct reclaim at beneficial_order Matthew Brost
2026-04-28 9:55 ` Andi Shyti
2026-04-23 5:56 ` [PATCH v2 3/5] drm/ttm: Introduce ttm_bo_shrink_kswap_fragmented() Matthew Brost
2026-04-28 10:07 ` Andi Shyti
2026-04-30 6:23 ` Matthew Brost
2026-04-30 7:39 ` Christian König
2026-04-23 5:56 ` [PATCH v2 4/5] drm/xe: Set TTM device beneficial_order to 9 (2M) Matthew Brost
2026-04-28 10:46 ` Andi Shyti
2026-04-23 5:56 ` [PATCH v2 5/5] drm/xe: Avoid shrinker reclaim from kswapd under fragmentation Matthew Brost
2026-04-23 6:04 ` ✓ CI.KUnit: success for mm, drm/ttm, drm/xe: Avoid reclaim/eviction loops " Patchwork
2026-04-23 6:53 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-23 17:30 ` ✗ Xe.CI.FULL: failure " Patchwork
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=59b3dab5-3341-46dc-851a-419790eaf403@kernel.org \
--to=vbabka@kernel.org \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=hannes@cmpxchg.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=matthew.brost@intel.com \
--cc=mhocko@suse.com \
--cc=rppt@kernel.org \
--cc=surenb@google.com \
--cc=thomas.hellstrom@linux.intel.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