From: sashiko-bot@kernel.org
To: "Arunpravin Paneer Selvam" <Arunpravin.PaneerSelvam@amd.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v10 2/2] gpu/tests/buddy: add dirty tracker performance KUnit test
Date: Wed, 19 Aug 2026 10:53:00 +0000 [thread overview]
Message-ID: <20260819105301.136571F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260819104242.10703-2-Arunpravin.PaneerSelvam@amd.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Scenario 1 of the dirty tracker performance test fails to exercise the contiguous allocation path and `__force_merge()`, rendering its benchmark results invalid.
--
--- Patch [2]: [PATCH v10 2/2] gpu/tests/buddy: add dirty tracker performance KUnit test ---
commit 31fa603bd9e94c9fc78fd665cdb47f320c0dabdd
Author: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
gpu/tests/buddy: add dirty tracker performance KUnit test
This commit adds a new KUnit test to demonstrate the performance advantage
of the decoupled dirty-tracker design over the previous dual-tree and
force_merge approach.
> diff --git a/drivers/gpu/tests/gpu_buddy_test.c b/drivers/gpu/tests/gpu_buddy_test.c
> index 6ce485eae83ee..04344468ab6bf 100644
> --- a/drivers/gpu/tests/gpu_buddy_test.c
> +++ b/drivers/gpu/tests/gpu_buddy_test.c
[ ... ]
> +static void gpu_test_buddy_dirty_tracker_performance(struct kunit *test)
> +{
[ ... ]
> + start = ktime_get();
> + KUNIT_ASSERT_FALSE_MSG(test,
> + gpu_buddy_alloc_blocks(&mm, 0, SZ_4G, SZ_4G, SZ_4K,
> + &results,
> + GPU_BUDDY_CONTIGUOUS_ALLOCATION),
> + "contiguous alloc failed\n");
[Severity: Medium]
Does this allocation actually exercise the contiguous allocation path and
invoke __force_merge() as intended?
Looking at gpu_buddy_alloc_blocks(), when start + size == end (0 + SZ_4G ==
SZ_4G), the function takes an early exact-range allocation path and returns
__gpu_buddy_alloc_range():
drivers/gpu/buddy.c:gpu_buddy_alloc_blocks() {
...
/* Actual range allocation */
if (start + size == end) {
if (!IS_ALIGNED(start | end, min_block_size))
return -EINVAL;
return __gpu_buddy_alloc_range(mm, start, size, flags, NULL, blocks);
}
...
}
This bypasses the contiguous allocation logic entirely, meaning the baseline
measurement of 71 ms might just be the overhead of iterating the tree and
gathering 1,048,576 individual 4 KiB fragments into a list, rather than
measuring __force_merge() performance.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260819104242.10703-1-Arunpravin.PaneerSelvam@amd.com?part=2
next prev parent reply other threads:[~2026-08-19 10:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-19 10:42 [PATCH v10 1/2] gpu/buddy: replace dual-tree/force_merge with decoupled dirty tracker Arunpravin Paneer Selvam
2026-08-19 10:42 ` [PATCH v10 2/2] gpu/tests/buddy: add dirty tracker performance KUnit test Arunpravin Paneer Selvam
2026-08-19 10:53 ` sashiko-bot [this message]
2026-08-19 10:55 ` [PATCH v10 1/2] gpu/buddy: replace dual-tree/force_merge with decoupled dirty tracker sashiko-bot
2026-08-19 10:57 ` Matthew Auld
2026-08-19 11:10 ` ✗ Fi.CI.BUILD: failure for series starting with [v10,1/2] " 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=20260819105301.136571F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Arunpravin.PaneerSelvam@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
/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