public inbox for intel-xe@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: Matthew Brost <matthew.brost@intel.com>,
	Andi Shyti <andi.shyti@kernel.org>
Cc: intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	"Carlos Santa" <carlos.santa@intel.com>,
	"Huang Rui" <ray.huang@amd.com>,
	"Matthew Auld" <matthew.auld@intel.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Daniel Colascione" <dancol@dancol.org>
Subject: Re: [PATCH v2 3/5] drm/ttm: Introduce ttm_bo_shrink_kswap_fragmented()
Date: Thu, 30 Apr 2026 09:39:54 +0200	[thread overview]
Message-ID: <898c5657-3f5a-4fea-bd3e-4ac4de45dd2f@amd.com> (raw)
In-Reply-To: <afL1VbG9HNDnA5Rq@gsse-cloud1.jf.intel.com>

On 4/30/26 08:23, Matthew Brost wrote:
> On Tue, Apr 28, 2026 at 12:07:07PM +0200, Andi Shyti wrote:
>> Hi Matt,
>>
>> ...
>>
>>> +/**
>>> + * ttm_bo_shrink_kswap_fragmented() - Whether in kswap and memory appears
>>> + * fragmented
>>> + * @nid: current node being shrunk
>>> + *
>>> + * Return: true if in kswap and memory appears fragmented, false is not.
>>> + */
>>> +bool ttm_bo_shrink_kswap_fragmented(int nid)
>>
>> This name is a bit to strong and misleading, in my opinion.
>>
> 
> s/ttm_bo_shrink_kswap_fragmented/ttm_bo_shrink_kswap_maybe_fragmented
> 

Maybe ttm_bo_partial_shrink_kswap() or something into that direction?

I don't really have any better idea either.

Regards,
Christian.

> ?
> 
>>> +{
>>> +	enum zone_type zone_type;
>>> +
>>> +	if (!current_is_kswapd())
>>> +		return false;
>>> +
>>> +	if (!numa_valid_node(nid))
>>> +		return false;
>>> +
>>> +#if IS_ENABLED(CONFIG_ZONE_DMA32)
>>> +	zone_type = ZONE_DMA32;
>>> +#else
>>> +	zone_type = ZONE_NORMAL;
>>> +#endif
>>> +
>>> +	for (; zone_type <= ZONE_NORMAL; ++zone_type) {
>>
>> just start with "for (zone_type = 0; ... )" and you don't need
>> the ifdefs above.
>>
> 
> I don't think that is correct. Zero could mean ZONE_DMA which is not
> relavent here.
> 
> For example on BMG + raptor lake system, it clear ZONE_DMA is used.
> 
> cat /proc/buddyinfo
> Node 0, zone      DMA      0      1      0      0      0      0      0      0      1      1      3
> Node 0, zone    DMA32     20     10     11     14     15     15     11     13     13      8    232
> Node 0, zone   Normal    876   1782      6      5      4      4      2      6      4      2   7107
> 
> Matt 
> 
>> Andi
>>
>>> +		struct zone *zone = &NODE_DATA(nid)->node_zones[zone_type];


  reply	other threads:[~2026-04-30  7:40 UTC|newest]

Thread overview: 31+ 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-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 [this message]
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=898c5657-3f5a-4fea-bd3e-4ac4de45dd2f@amd.com \
    --to=christian.koenig@amd.com \
    --cc=airlied@gmail.com \
    --cc=andi.shyti@kernel.org \
    --cc=carlos.santa@intel.com \
    --cc=dancol@dancol.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=matthew.auld@intel.com \
    --cc=matthew.brost@intel.com \
    --cc=mripard@kernel.org \
    --cc=ray.huang@amd.com \
    --cc=simona@ffwll.ch \
    --cc=thomas.hellstrom@linux.intel.com \
    --cc=tzimmermann@suse.de \
    /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