From: David Sterba Subject: Re: [PATCH 5/6] treewide: use kv[mz]alloc* rather than opencoded variants Date: Thu, 12 Jan 2017 16:57:43 +0100 Message-ID: <20170112155743.GN12081@suse.cz> References: <20170112153717.28943-1-mhocko@kernel.org> <20170112153717.28943-6-mhocko@kernel.org> Reply-To: dsterba@suse.cz Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andrew Morton , Colin Cross , Hariprasad S , Santosh Raspatur , Kees Cook , Johannes Weiner , Heiko Carstens , Martin Schwidefsky , Anton Vorontsov , Eric Dumazet , Ilya Dryomov , Kent Overstreet , Herbert Xu , David Rientjes , Andreas Dilger , Dan Williams , Oleg Drokin , Tony Luck , Alexei Starovoitov , linux-mm@kvack.org, Tariq Toukan , Yishai Hadas , Boris Ostrovsky Return-path: Content-Disposition: inline In-Reply-To: <20170112153717.28943-6-mhocko@kernel.org> Sender: owner-linux-mm@kvack.org List-Id: netdev.vger.kernel.org On Thu, Jan 12, 2017 at 04:37:16PM +0100, Michal Hocko wrote: > From: Michal Hocko > > There are many code paths opencoding kvmalloc. Let's use the helper > instead. The main difference to kvmalloc is that those users are usually > not considering all the aspects of the memory allocator. E.g. allocation > requests < 64kB are basically never failing and invoke OOM killer to > satisfy the allocation. This sounds too disruptive for something that > has a reasonable fallback - the vmalloc. On the other hand those > requests might fallback to vmalloc even when the memory allocator would > succeed after several more reclaim/compaction attempts previously. There > is no guarantee something like that happens though. > > This patch converts many of those places to kv[mz]alloc* helpers because > they are more conservative. For the btrfs bits, Acked-by: David Sterba -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org