From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751209AbdFBHSz (ORCPT ); Fri, 2 Jun 2017 03:18:55 -0400 Received: from fldsmtpe03.verizon.com ([140.108.26.142]:18679 "EHLO fldsmtpe03.verizon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750772AbdFBHSy (ORCPT ); Fri, 2 Jun 2017 03:18:54 -0400 X-IronPort-Anti-Spam-Filtered: false From: "Levin, Alexander (Sasha Levin)" X-IronPort-AV: E=Sophos;i="5.39,284,1493683200"; d="scan'208";a="213453820" To: Michal Hocko CC: Andrew Morton , "linux-mm@kvack.org" , LKML , Michal Hocko , John Hubbard , Andreas Dilger , Vlastimil Babka Subject: Re: [PATCH 1/9] mm: introduce kv[mz]alloc helpers Thread-Topic: [PATCH 1/9] mm: introduce kv[mz]alloc helpers Thread-Index: AQHS23BHW7kE/Q9yoUuFFI+LaY8nJQ== Date: Fri, 2 Jun 2017 07:17:22 +0000 Message-ID: <20170602071718.zk3ujm64xesoqyrr@sasha-lappy> References: <20170306103032.2540-1-mhocko@kernel.org> <20170306103032.2540-2-mhocko@kernel.org> In-Reply-To: <20170306103032.2540-2-mhocko@kernel.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: NeoMutt/20170113 (1.7.2) x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.144.60.250] Content-Type: text/plain; charset="us-ascii" Content-ID: <297D65ED0E8FE949BD99714067205F20@vzwcorp.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v527J0Sa027301 On Mon, Mar 06, 2017 at 11:30:24AM +0100, Michal Hocko wrote: > +void *kvmalloc_node(size_t size, gfp_t flags, int node) > +{ > + gfp_t kmalloc_flags = flags; > + void *ret; > + > + /* > + * vmalloc uses GFP_KERNEL for some internal allocations (e.g page tables) > + * so the given set of flags has to be compatible. > + */ > + WARN_ON_ONCE((flags & GFP_KERNEL) != GFP_KERNEL); Hm, there are quite a few locations in the kernel that do something like: __vmalloc(len, GFP_NOFS, PAGE_KERNEL); According to your patch, vmalloc can't really do GFP_NOFS, right? -- Thanks, Sasha From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f72.google.com (mail-it0-f72.google.com [209.85.214.72]) by kanga.kvack.org (Postfix) with ESMTP id 206A66B0292 for ; Fri, 2 Jun 2017 03:18:34 -0400 (EDT) Received: by mail-it0-f72.google.com with SMTP id l145so57776505ita.14 for ; Fri, 02 Jun 2017 00:18:34 -0700 (PDT) Received: from fldsmtpe03.verizon.com (fldsmtpe03.verizon.com. [140.108.26.142]) by mx.google.com with ESMTPS id g17si1649217ita.17.2017.06.02.00.18.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Jun 2017 00:18:33 -0700 (PDT) From: "Levin, Alexander (Sasha Levin)" Subject: Re: [PATCH 1/9] mm: introduce kv[mz]alloc helpers Date: Fri, 2 Jun 2017 07:17:22 +0000 Message-ID: <20170602071718.zk3ujm64xesoqyrr@sasha-lappy> References: <20170306103032.2540-1-mhocko@kernel.org> <20170306103032.2540-2-mhocko@kernel.org> In-Reply-To: <20170306103032.2540-2-mhocko@kernel.org> Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-ID: <297D65ED0E8FE949BD99714067205F20@vzwcorp.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko Cc: Andrew Morton , "linux-mm@kvack.org" , LKML , Michal Hocko , John Hubbard , Andreas Dilger , Vlastimil Babka On Mon, Mar 06, 2017 at 11:30:24AM +0100, Michal Hocko wrote: > +void *kvmalloc_node(size_t size, gfp_t flags, int node) > +{ > + gfp_t kmalloc_flags =3D flags; > + void *ret; > + > + /* > + * vmalloc uses GFP_KERNEL for some internal allocations (e.g page tabl= es) > + * so the given set of flags has to be compatible. > + */ > + WARN_ON_ONCE((flags & GFP_KERNEL) !=3D GFP_KERNEL); Hm, there are quite a few locations in the kernel that do something like: __vmalloc(len, GFP_NOFS, PAGE_KERNEL); According to your patch, vmalloc can't really do GFP_NOFS, right? --=20 Thanks, Sasha= -- 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