From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752453AbdCHKpT (ORCPT ); Wed, 8 Mar 2017 05:45:19 -0500 Received: from mx2.suse.de ([195.135.220.15]:60755 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750743AbdCHKpQ (ORCPT ); Wed, 8 Mar 2017 05:45:16 -0500 Date: Wed, 8 Mar 2017 10:26:59 +0100 From: Michal Hocko To: Vlastimil Babka Cc: Andrew Morton , Al Viro , David Rientjes , Cristopher Lameter , linux-mm@kvack.org, LKML Subject: Re: [PATCH] mm, vmalloc: use __GFP_HIGHMEM implicitly Message-ID: <20170308092659.GD11028@dhcp22.suse.cz> References: <20170307141020.29107-1-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 08-03-17 08:33:58, Vlastimil Babka wrote: > On 03/07/2017 03:10 PM, Michal Hocko wrote: [...] > > index dece26f119d4..a804a4107fbc 100644 > > --- a/drivers/block/drbd/drbd_bitmap.c > > +++ b/drivers/block/drbd/drbd_bitmap.c > > @@ -409,7 +409,7 @@ static struct page **bm_realloc_pages(struct drbd_bitmap *b, unsigned long want) > > new_pages = kzalloc(bytes, GFP_NOIO | __GFP_NOWARN); > > if (!new_pages) { > > new_pages = __vmalloc(bytes, > > - GFP_NOIO | __GFP_HIGHMEM | __GFP_ZERO, > > + GFP_NOIO | __GFP_ZERO, > > This should be converted to memalloc_noio_save(), right? And then > kvmalloc? Unless that happens in your other series :) yeah, that would be for a separate patch(es). [...] > > diff --git a/fs/btrfs/free-space-tree.c b/fs/btrfs/free-space-tree.c > > index dd7fb22a955a..fc0bd8406758 100644 > > --- a/fs/btrfs/free-space-tree.c > > +++ b/fs/btrfs/free-space-tree.c > > @@ -167,8 +167,7 @@ static u8 *alloc_bitmap(u32 bitmap_size) > > if (mem) > > return mem; > > > > - return __vmalloc(bitmap_size, GFP_NOFS | __GFP_HIGHMEM | __GFP_ZERO, > > - PAGE_KERNEL); > > + return __vmalloc(bitmap_size, GFP_NOFS | __GFP_ZERO, PAGE_KERNEL); > > memalloc_nofs_save() and plain vzalloc()? I would really prefer to check whether GFP_NOFS is really needed here and if yes then place memalloc_nofs_save where the locking really requires it so this would become plan vmalloc as a side effect > > diff --git a/mm/nommu.c b/mm/nommu.c > > index a80411d258fc..fc184f597d59 100644 > > --- a/mm/nommu.c > > +++ b/mm/nommu.c > > @@ -246,8 +246,7 @@ void *vmalloc_user(unsigned long size) > > { > > void *ret; > > > > - ret = __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO, > > - PAGE_KERNEL); > > + ret = __vmalloc(size, GFP_KERNEL | __GFP_ZERO, PAGE_KERNEL); > > vzalloc()? after some code moving in mm/nommu.c yes. But I am not sure this is a huge win -- Michal Hocko SUSE Labs