From: Pavel Begunkov Date: Wed, 2 Nov 2022 15:18:23 +0000 (+0000) Subject: bio: shrink max number of pcpu cached bios X-Git-Tag: v6.2-rc1~129^2~85 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=42b2b2fb6ecf1cc11eb7e75782dd7a7a17e6d958;p=tomoyo%2Ftomoyo-test1.git bio: shrink max number of pcpu cached bios The downside of the bio pcpu cache is that bios of a cpu will be never freed unless there is new I/O issued from that cpu. We currently keep max 512 bios, which feels too much, half it. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/bc198e8efb27d8c740d80c8ce477432729075096.1667384020.git.asml.silence@gmail.com Signed-off-by: Jens Axboe --- diff --git a/block/bio.c b/block/bio.c index 14a7105231d2..ab59a491a883 100644 --- a/block/bio.c +++ b/block/bio.c @@ -27,7 +27,7 @@ #define ALLOC_CACHE_THRESHOLD 16 #define ALLOC_CACHE_SLACK 64 -#define ALLOC_CACHE_MAX 512 +#define ALLOC_CACHE_MAX 256 struct bio_alloc_cache { struct bio *free_list;