HomeFreeBSD

linuxkpi: reduce number of stray mm_struct allocations

Description

linuxkpi: reduce number of stray mm_struct allocations

Only allocate struct_mm after we checked that other threads do not carry
useful mm_struct. If they don't, drop process lock, allocate, and recheck.

Note that for M_NOWAIT allocations we could avoid dropping process lock,
but I do not think that this increased complexity is useful.

Reviewed by: hselasky
Sponsored by: Mellanox Technologies/NVidia Networking
MFC after: 1 week

Details

Provenance
kibAuthored on Mar 11 2021, 6:48 AM
Parents
rG165ba13fb806: linuxkpi: guarantee allocations of task and mm for interrupt threads
Branches
Unknown
Tags
Unknown