Re: [PATCH 1/2] af_unix: Do not wait for garbage collector in sendmsg()

From: Nam Cao

Date: Wed Jul 01 2026 - 23:56:20 EST


Kuniyuki Iwashima <kuniyu@xxxxxxxxxx> writes:
> On Wed, Jul 1, 2026 at 9:36 AM Nam Cao <namcao@xxxxxxxxxxxxx> wrote:
>> Now, sendmsg() does not have to block on the garbage collector anymore,
>> because:
>>
>> - The OOM killer issue has already been addressed by checking
>> RLIMIT_NOFILE.
>>
>> - The soft lockup issue is no longer relevant, because the garbage
>> collector now runs asynchronously since commit d9f21b361333 ("af_unix:
>> Try to run GC async.")
>
> I don't think the latter is resolved. Without blocking insane
> users, they can keep pushing sockets to the kernel work,
> which could be soft-lockup'd.

User cannot push more than RLIMIT_NOFILE before GC runs. And the GC
grabs the spin lock, clean up the present stuffs, and exit.

So user could make the GC runs again and again, but there wouldn't be
soft lockup, as the GC yields after short intervals.

Nam