From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751139AbdALRBi (ORCPT ); Thu, 12 Jan 2017 12:01:38 -0500 Received: from mail-oi0-f49.google.com ([209.85.218.49]:34372 "EHLO mail-oi0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750906AbdALRA5 (ORCPT ); Thu, 12 Jan 2017 12:00:57 -0500 MIME-Version: 1.0 In-Reply-To: <20170112153717.28943-6-mhocko@kernel.org> References: <20170112153717.28943-1-mhocko@kernel.org> <20170112153717.28943-6-mhocko@kernel.org> From: Dan Williams Date: Thu, 12 Jan 2017 09:00:30 -0800 Message-ID: Subject: Re: [PATCH 5/6] treewide: use kv[mz]alloc* rather than opencoded variants To: Michal Hocko Cc: Andrew Morton , Vlastimil Babka , David Rientjes , Mel Gorman , Johannes Weiner , Al Viro , Linux MM , LKML , Michal Hocko , Martin Schwidefsky , Heiko Carstens , Herbert Xu , Anton Vorontsov , Colin Cross , Kees Cook , Tony Luck , "Rafael J. Wysocki" , Ben Skeggs , Kent Overstreet , Santosh Raspatur , Hariprasad S , Tariq Toukan , Yishai Hadas , Oleg Drokin , Andreas Dilger , Boris Ostrovsky , David Sterba , "Yan, Zheng" , Ilya Dryomov , Alexei Starovoitov , Eric Dumazet , Netdev Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 12, 2017 at 7:37 AM, 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. > [..] > Cc: Dan Williams [..] > drivers/nvdimm/dimm_devs.c | 5 +--- Acked-by: Dan Williams