From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751307AbdALP6K (ORCPT ); Thu, 12 Jan 2017 10:58:10 -0500 Received: from mx2.suse.de ([195.135.220.15]:35382 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750773AbdALP6I (ORCPT ); Thu, 12 Jan 2017 10:58:08 -0500 Date: Thu, 12 Jan 2017 16:57:43 +0100 From: David Sterba To: Michal Hocko 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 , Ben Skeggs , Zheng Yan , "Rafael J. Wysocki" , Michal Hocko , Vlastimil Babka , Mel Gorman , LKML , netdev@vger.kernel.org, Al Viro Subject: Re: [PATCH 5/6] treewide: use kv[mz]alloc* rather than opencoded variants Message-ID: <20170112155743.GN12081@suse.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Michal Hocko , 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 , Ben Skeggs , Zheng Yan , "Rafael J. Wysocki" , Michal Hocko , Vlastimil Babka , Mel Gorman , LKML , netdev@vger.kernel.org, Al Viro References: <20170112153717.28943-1-mhocko@kernel.org> <20170112153717.28943-6-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170112153717.28943-6-mhocko@kernel.org> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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 From mboxrd@z Thu Jan 1 00:00:00 1970 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f70.google.com (mail-wm0-f70.google.com [74.125.82.70]) by kanga.kvack.org (Postfix) with ESMTP id 24E236B0261 for ; Thu, 12 Jan 2017 10:58:07 -0500 (EST) Received: by mail-wm0-f70.google.com with SMTP id c85so5562005wmi.6 for ; Thu, 12 Jan 2017 07:58:07 -0800 (PST) Received: from mx2.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id y23si7633696wra.86.2017.01.12.07.58.05 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 12 Jan 2017 07:58:06 -0800 (PST) Date: Thu, 12 Jan 2017 16:57:43 +0100 From: David Sterba Subject: Re: [PATCH 5/6] treewide: use kv[mz]alloc* rather than opencoded variants Message-ID: <20170112155743.GN12081@suse.cz> Reply-To: dsterba@suse.cz References: <20170112153717.28943-1-mhocko@kernel.org> <20170112153717.28943-6-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170112153717.28943-6-mhocko@kernel.org> Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko 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 , Ben Skeggs , Zheng Yan , "Rafael J. Wysocki" , Michal Hocko , Vlastimil Babka , Mel Gorman , LKML , netdev@vger.kernel.org, Al Viro 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