Hi, 在 2026/11/7 21:27, [email protected] 写道: > Thank you for your contribution! Sashiko AI review found 1 potential > issue to consider: > - [Low] io_uring: commit message omits rsrc and tctx changes and > uncharged allocs Thanks for catching this.
You're right that the changelog should better match the actual changes. Besides io_ring_ctx and io_sq_data, this patch also switches the allocations in io_coalesce_buffer(), io_init_wq_offload(), and io_uring_alloc_task_context() to GFP_KERNEL_ACCOUNT. I'll mention those explicitly in v2. You're also right that "the last per-ring allocations" overstates the current state. Patch 7 still leaves some infrastructure allocations, such as the percpu pieces and the io-wq cpumask, unchanged. I'll drop that wording and instead describe what this patch accounts and what remains. As for commits 075d5837bafc and 0b34e7b20a48, this series is based on linux-next (next-20261104), which already includes the io_uring-7.4-20261029 tag containing those commits. If the review is performed against a tree without that tag, those objects will indeed still appear uncharged. Thanks, Tao > -- > > commit 3d47975c4208930279f98824279734ca99b5e9bd > Author: Tao Cui <[email protected]> > >> io_uring: account the ring context and SQPOLL thread data to memcg >> >> The io_ring_ctx and the SQPOLL io_sqd are the last per-ring allocations >> made with plain GFP_KERNEL. The larger surfaces around them are >> already charged: io_mapped_ubuf and io_rsrc_node since commit >> 075d5837bafc ("io_uring/rsrc: charge buffer arrays and nodes to memcg"), >> the tctx node and its XArrays since commit 0b34e7b20a48 ("io_uring: >> charge tctx nodes and personalities"). >> >> Charge the context and the SQPOLL thread data the same way. >> >> Signed-off-by: Tao Cui <[email protected]> > > [Severity: Low] > Does the commit message match the actual changes and current tree state? > > Alongside io_ring_ctx and io_sq_data, the patch also switches new_array in > io_coalesce_buffer(), ctx->hash_map in io_init_wq_offload(), and > io_uring_task in io_uring_alloc_task_context() to GFP_KERNEL_ACCOUNT without > mentioning them in the subject or changelog. > > The changelog also says these are the last per-ring GFP_KERNEL allocations. > While commit "io_uring: account the remaining per-object allocations to > memcg" later in the series converts io_alloc_cache_init() and io_wq_create(), > percpu_ref_init(&ctx->refs, ...) in io_ring_ctx_alloc(), > percpu_counter_init(&tctx->inflight, ...) in io_uring_alloc_task_context(), > and alloc_cpumask_var(&wq->cpu_mask, ...) in io_wq_create() still use plain > GFP_KERNEL. > > Finally, the cited commits 075d5837bafc ("io_uring/rsrc: charge buffer > arrays and nodes to memcg") and 0b34e7b20a48 ("io_uring: charge tctx nodes > and personalities") are not present in the base tree, so io_alloc_imu(), > io_rsrc_node_alloc(), io_tctx_install_node(), tctx->xa, and > ctx->personalities remain uncharged. >
