From: sashiko-bot@kernel.org
To: "Carl Vanderlip" <carl.vanderlip@oss.qualcomm.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 6/6] accel/qaic: Use reduced size allocation for FIFOs
Date: Sat, 03 Oct 2026 02:51:35 +0000 [thread overview]
Message-ID: <20261003025136.323F41F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20261003023818.1161666-7-carl.vanderlip@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] accel/qaic: job credits can exceed DRM scheduler credit limit
- [Medium] accel/qaic: missing __GFP_NOWARN in fallback allocation causes log spam
--
commit 71c6cfc1950c4572f2fdf94ea37059d815f2f378
Author: Carl Vanderlip <carl.vanderlip@oss.qualcomm.com>
Subject: accel/qaic: Use reduced size allocation for FIFOs
This commit modifies the allocation strategy for FIFOs in the qaic driver.
Instead of failing when a large DMA coherent pool allocation cannot be
fulfilled, it iteratively halves the requested size until the allocation
succeeds, allowing the DRM scheduler to break up submissions to fit available
memory.
[Severity: Medium]
In drivers/accel/qaic/qaic_control.c inside encode_activate around line 663,
there is a fallback allocation loop that calls dma_alloc_coherent with
GFP_KERNEL. Because the loop starts with a large allocation size and expects
it to potentially fail on fragmented systems before halving the size, will
this cause the page allocator to print stack traces and spam dmesg on each
expected failure?
Could the __GFP_NOWARN flag be added to the allocation request to prevent
this log spam when the higher order allocations predictably fail?
[Severity: High]
In drivers/accel/qaic/qaic_control.c inside encode_activate around line 671,
nelem is calculated based on the dynamically reduced size using the
QAIC_DBC_NELEM macro. This can result in a non-power-of-two queue size.
Later, in drivers/accel/qaic/qaic_sched.c inside set_dbc_scaling_ratio at
line 98, the credit_ratio is computed using DIV_ROUND_UP(QAIC_CREDITS, nelem).
If nelem is not a power of two, the rounding up means that a job requesting
the maximum number of elements in qaic_create_job (around line 156) will
calculate its total credits as (nelem - 1) multiplied by credit_ratio. Can
this total routinely exceed the QAIC_CREDITS limit and the DRM scheduler
maximum credit limit?
If a user submits a large execution request that triggers this, it appears
it would result in a dev_WARN and credit truncation within the DRM scheduler,
preventing the job from executing properly. How should this credit overflow
be prevented when dealing with non-power-of-two sizes?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261003023818.1161666-1-carl.vanderlip@oss.qualcomm.com?part=6
prev parent reply other threads:[~2026-10-03 2:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-03 2:38 [PATCH 0/6] accel/qaic: Use DRM Scheduler for submitting BO reqs Carl Vanderlip
2026-10-03 2:38 ` [PATCH 1/6] accel/qaic: Centralize execution info Carl Vanderlip
2026-10-03 2:49 ` sashiko-bot
2026-10-03 2:38 ` [PATCH 2/6] accel/qaic: Replace transfer completion with dma-fence Carl Vanderlip
2026-10-03 2:54 ` sashiko-bot
2026-10-03 2:38 ` [PATCH 3/6] accel/qaic: Isolate hw submission Carl Vanderlip
2026-10-03 2:49 ` sashiko-bot
2026-10-03 2:38 ` [PATCH 4/6] accel/qaic: Use DRM_SCHED to handle FIFO submission Carl Vanderlip
2026-10-03 2:51 ` sashiko-bot
2026-10-03 2:38 ` [PATCH 5/6] accel/qaic: Split oversized BO requests into multiple jobs Carl Vanderlip
2026-10-03 2:51 ` sashiko-bot
2026-10-03 2:38 ` [PATCH 6/6] accel/qaic: Use reduced size allocation for FIFOs Carl Vanderlip
2026-10-03 2:51 ` sashiko-bot [this message]
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=20261003025136.323F41F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=carl.vanderlip@oss.qualcomm.com \
--cc=dri-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.