On Sat 27-07-19 14:23:33, Catalin Marinas wrote: > Add mempool allocations for struct kmemleak_object and > kmemleak_scan_area as slightly more resilient than kmem_cache_alloc() > under memory pressure. Additionally, mask out all the gfp flags passed > to kmemleak other than GFP_KERNEL|GFP_ATOMIC. > > A boot-time tuning parameter (kmemleak.mempool) is added to allow a > different minimum pool size (defaulting to NR_CPUS * 4). > > Cc: Michal Hocko <mhocko@xxxxxxxxxx> > Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx> > Cc: Qian Cai <cai@xxxxxx> > Suggested-by: Michal Hocko <mhocko@xxxxxxxxxx> > Signed-off-by: Catalin Marinas <catalin.marinas@xxxxxxx> I am not familiar with the kmemleak code so I cannot really give my ack but I can give my thumbs up at least. This is definitely an improvement and step into the right direction. The gfp flags games were just broken. My only recommendation would be to drop the kernel parameter as mentioned in other email. We have just too many of them and if the current auto-tuning is not sufficient we want to hear about that and find a better one or add a parameter only if we fail. Thanks! -- Michal Hocko SUSE Labs