On Fri, 18 Aug 2023, Michael Schmitz wrote:
I think the patch could be simplified by dropping the dynamic memory
allocation...
If using a private data pointer field for an int bitmask is acceptable
use ...
I thought that was implicit in Geert's response.
I used a similar technique in drivers/nubus/proc.c and it didn't bother
anyone.
I'll see if I can find any performance impact from the additional
swap_data flag. If there's none, your solution may be cleaner.
It was the maintenance impact of the extra code that motivated my
suggestion. However, by avoiding kalloc we also avoid having to
dereference the pointer in the fast path.