summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc/allocator/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorYoussef Samir <quic_yabdulra@quicinc.com>2025-10-07 14:18:45 +0200
committerJeff Hugo <jeff.hugo@oss.qualcomm.com>2025-10-14 08:39:10 -0600
commitf6d9329aefe2829aaa95feb6bbdcd3cbe32900f9 (patch)
treeb9ad064327ac50a74260d350c1d5835b0647fe44 /rust/kernel/alloc/allocator/git@git.tavy.me:linux.git
parent8e944ab8196e421f20386f51c5ffc43baa145932 (diff)
accel/qaic: Use kvcalloc() for slice requests allocation
When a BO is created, qaic will use the page allocator to request the memory chunks that the BO will be composed of in-memory. The number of chunks increases when memory is segmented. For example, a 16MB BO can be composed of four 4MB chunks or 4096 4KB chunks. A BO is then sliced into a single or multiple slices to be transferred to the device on the DBC's xfer queue. For that to happen, the slice needs to encode its memory chunks into DBC requests and keep track of them in an array, which is allocated using kcalloc(). Knowing that the BO might be very fragmented, this array can grow so large that the allocation may fail to find contiguous memory for it. Replace kcalloc() with kvcalloc() to allocate the DBC requests array for a slice. Signed-off-by: Youssef Samir <quic_yabdulra@quicinc.com> Signed-off-by: Youssef Samir <youssef.abdulrahman@oss.qualcomm.com> Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Reviewed-by: Carl Vanderlip <carl.vanderlip@oss.qualcomm.com> Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Link: https://lore.kernel.org/r/20251007121845.337382-1-youssef.abdulrahman@oss.qualcomm.com
Diffstat (limited to 'rust/kernel/alloc/allocator/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions