From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot0-f199.google.com (mail-ot0-f199.google.com [74.125.82.199]) by kanga.kvack.org (Postfix) with ESMTP id A37316B0033 for ; Mon, 16 Jan 2017 03:19:08 -0500 (EST) Received: by mail-ot0-f199.google.com with SMTP id 65so27328088otq.2 for ; Mon, 16 Jan 2017 00:19:08 -0800 (PST) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0061.outbound.protection.outlook.com. [104.47.2.61]) by mx.google.com with ESMTPS id h49si8300093ote.229.2017.01.16.00.19.07 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Jan 2017 00:19:07 -0800 (PST) Subject: Re: [PATCH 5/6] treewide: use kv[mz]alloc* rather than opencoded variants References: <20170112153717.28943-1-mhocko@kernel.org> <20170112153717.28943-6-mhocko@kernel.org> From: Tariq Toukan Message-ID: <836c370c-f8ff-d682-f457-0ad0da622068@mellanox.com> Date: Mon, 16 Jan 2017 10:18:48 +0200 MIME-Version: 1.0 In-Reply-To: <20170112153717.28943-6-mhocko@kernel.org> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko , Andrew Morton Cc: Vlastimil Babka , David Rientjes , Mel Gorman , Johannes Weiner , Al Viro , linux-mm@kvack.org, 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 , Yishai Hadas , Dan Williams , Oleg Drokin , Andreas Dilger , Boris Ostrovsky , David Sterba , "Yan, Zheng" , Ilya Dryomov , Alexei Starovoitov , Eric Dumazet , netdev@vger.kernel.org On 12/01/2017 5:37 PM, 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: Martin Schwidefsky > Cc: Heiko Carstens > Cc: Herbert Xu > Cc: Anton Vorontsov > Cc: Colin Cross > Cc: Kees Cook > Cc: Tony Luck > Cc: "Rafael J. Wysocki" > Cc: Ben Skeggs > Cc: Kent Overstreet > Cc: Santosh Raspatur > Cc: Hariprasad S > Cc: Tariq Toukan > Cc: Yishai Hadas > Cc: Dan Williams > Cc: Oleg Drokin > Cc: Andreas Dilger > Cc: Boris Ostrovsky > Cc: David Sterba > Cc: "Yan, Zheng" > Cc: Ilya Dryomov > Cc: Alexander Viro > Cc: Alexei Starovoitov > Cc: Eric Dumazet > Cc: netdev@vger.kernel.org > Signed-off-by: Michal Hocko > --- Acked-by: Tariq Toukan For the mlx4 parts. Regards. Tariq -- 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