Re: [PATCH v7 01/14] KEYS: Move key garbage collection to a dedicated workqueue

From: Guicai Ma

Date: Mon Nov 30 2026 - 03:16:32 EST


On Sun, Nov 29, 2026 at 07:05:30PM +0200, Jarkko Sakkinen wrote:
> Allocate a dedicated key_gc workqueue in key_init() with WQ_PERCPU to
> preserve the per-CPU bound execution and cache locality of
> schedule_work(), and queue key_gc_work onto key_gc_wq.

key_init() runs before rest_init(), so key_gc_wq is up before user keys
can be created, and I didn't spot any leftover schedule_work() sites
under security/keys/. Booted and ran the v7 keyring_gc branch at
977007b8a422 on arm64 KVM with KASAN, lockdep, UBSAN and kmemleak
enabled without warnings.

Reviewed-by: Guicai Ma <maguicai@xxxxxxxxxx>
Tested-by: Guicai Ma <maguicai@xxxxxxxxxx>