From: Matthew Auld <matthew.auld@intel.com>
To: Sanjay Yadav <sanjay.kumar.yadav@intel.com>,
dri-devel@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org,
"Christian König" <christian.koenig@amd.com>,
"Arunpravin Paneer Selvam" <Arunpravin.PaneerSelvam@amd.com>
Subject: Re: [PATCH 2/2] drm/tests/drm_buddy: Add tests for allocations exceeding max_order
Date: Tue, 6 Jan 2026 16:08:39 +0000 [thread overview]
Message-ID: <a814c4c7-8f45-47dd-97b3-e1c2e4755c80@intel.com> (raw)
In-Reply-To: <20251222065238.1661415-6-sanjay.kumar.yadav@intel.com>
On 22/12/2025 06:52, Sanjay Yadav wrote:
> Add kunit tests that exercise edge cases where allocation requests
> exceed mm->max_order after rounding. This can happen with
> non-power-of-two VRAM sizes when the allocator rounds up requests.
>
> For example, with 10G VRAM (8G + 2G roots), mm->max_order represents
> the 8G block. A 9G allocation can round up to 16G in multiple ways:
> CONTIGUOUS allocation rounds to next power-of-two, or non-CONTIGUOUS
> with 8G min_block_size rounds to next alignment boundary.
>
> The test validates CONTIGUOUS and RANGE flag combinations, ensuring that
> only CONTIGUOUS-alone allocations use try_harder fallback, while other
> combinations return -EINVAL when rounded size exceeds memory, preventing
> BUG_ON assertions.
>
> Cc: Christian König <christian.koenig@amd.com>
> Cc: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
> Suggested-by: Matthew Auld <matthew.auld@intel.com>
> Signed-off-by: Sanjay Yadav <sanjay.kumar.yadav@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
next prev parent reply other threads:[~2026-01-06 16:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-22 6:52 [PATCH 0/2] drm/buddy: Fix BUG_ON from oversized rounded allocations Sanjay Yadav
2025-12-22 6:52 ` [PATCH 1/2] drm/buddy: Prevent BUG_ON by validating rounded allocation Sanjay Yadav
2026-01-06 16:04 ` Matthew Auld
2026-01-07 9:40 ` Arunpravin Paneer Selvam
2026-01-07 10:37 ` Yadav, Sanjay Kumar
2025-12-22 6:52 ` [PATCH 2/2] drm/tests/drm_buddy: Add tests for allocations exceeding max_order Sanjay Yadav
2026-01-06 16:08 ` Matthew Auld [this message]
2025-12-23 5:35 ` ✓ CI.KUnit: success for drm/buddy: Fix BUG_ON from oversized rounded allocations Patchwork
2025-12-23 5:50 ` ✗ CI.checksparse: warning " Patchwork
2025-12-23 6:11 ` ✓ Xe.CI.BAT: success " Patchwork
2025-12-23 16:14 ` ✓ Xe.CI.Full: " 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=a814c4c7-8f45-47dd-97b3-e1c2e4755c80@intel.com \
--to=matthew.auld@intel.com \
--cc=Arunpravin.PaneerSelvam@amd.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=sanjay.kumar.yadav@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