Searched hist:ca5e46c3400badc418a8fbcaeba711ad60ff4e1b (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/mm/ |
H A D | vmalloc.c | diff ca5e46c3400badc418a8fbcaeba711ad60ff4e1b Thu May 25 07:57:04 CDT 2023 Thomas Gleixner <tglx@linutronix.de> mm/vmalloc: avoid iterating over per CPU vmap blocks twice
_vunmap_aliases() walks the per CPU xarrays to find partially unmapped blocks and then walks the per cpu free lists to purge fragmented blocks.
Arguably that's waste of CPU cycles and cache lines as the full xarray walk already touches every block.
Avoid this double iteration:
- Split out the code to purge one block and the code to free the local purge list into helper functions.
- Try to purge the fragmented blocks in the xarray walk before looking at their dirty space.
Link: https://lkml.kernel.org/r/20230525124504.633469722@linutronix.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Baoquan He <bhe@redhat.com> Cc: Lorenzo Stoakes <lstoakes@gmail.com> Cc: Uladzislau Rezki (Sony) <urezki@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|