From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C869C433DB for ; Tue, 16 Feb 2021 08:18:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0965264E00 for ; Tue, 16 Feb 2021 08:18:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229782AbhBPIR5 (ORCPT ); Tue, 16 Feb 2021 03:17:57 -0500 Received: from mx2.suse.de ([195.135.220.15]:42062 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229916AbhBPIQk (ORCPT ); Tue, 16 Feb 2021 03:16:40 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1613463352; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Cd6iBVx8TLBh3eG8PbSuUvtxi0546CjvNoO2Rg8UJbo=; b=ff0+X2CNo/g34XoaYWYd+6mjjJvmqDexKEitwg62RNGxJPmQENfikjDuVCe9o6D3+xi0C4 fNMneR8n7GZVjxLI/Xk3uP5ivfK1EK6Xk6ErzCnCfwatUiUSJGhX5KRVDUOaGWv+ohz4rF CpFvVsxFEYtZd/aVNMEZbOx56ATbbYY= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 6FCFAB027; Tue, 16 Feb 2021 08:15:52 +0000 (UTC) Date: Tue, 16 Feb 2021 09:15:51 +0100 From: Michal Hocko To: Muchun Song Cc: Jonathan Corbet , Mike Kravetz , Thomas Gleixner , mingo@redhat.com, bp@alien8.de, x86@kernel.org, hpa@zytor.com, dave.hansen@linux.intel.com, luto@kernel.org, Peter Zijlstra , viro@zeniv.linux.org.uk, Andrew Morton , paulmck@kernel.org, mchehab+huawei@kernel.org, pawan.kumar.gupta@linux.intel.com, Randy Dunlap , oneukum@suse.com, anshuman.khandual@arm.com, jroedel@suse.de, Mina Almasry , David Rientjes , Matthew Wilcox , Oscar Salvador , "Song Bao Hua (Barry Song)" , David Hildenbrand , HORIGUCHI =?utf-8?B?TkFPWUEo5aCA5Y+jIOebtOS5nyk=?= , Joao Martins , Xiongchun duan , linux-doc@vger.kernel.org, LKML , Linux Memory Management List , linux-fsdevel Subject: Re: [External] Re: [PATCH v15 4/8] mm: hugetlb: alloc the vmemmap pages associated with each HugeTLB page Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 16-02-21 12:34:41, Muchun Song wrote: > On Tue, Feb 16, 2021 at 3:39 AM Michal Hocko wrote: [...] > > > Using GFP_KERNEL will also use the current task cpuset to allocate > > > memory. Do we have an interface to ignore current task cpuset?If not, > > > WQ may be the only option and it also will not limit the context of > > > put_page. Right? > > > > Well, GFP_KERNEL is constrained to the task cpuset only if the said > > cpuset is hardwalled IIRC. But I do not see why this is a problem. > > I mean that if there are more than one node in the system, > but the current task cpuset only allows one node. How would that cpuset get a huge pages from a node which is not part of the cpuset? Well, that would be possible if the cpuset was dynamic but I am not sure that such a configuration would be very sensible along with hardwall setup. > If current > node has no memory and other nodes have enough memory. > We can fail to allocate vmemmap pages. But actually it is > suitable to allocate vmemmap pages from other nodes. > Right? Falling back to a different node would be very suboptimal because then you would have vmemmap back by remote pages. We do not want that. -- Michal Hocko SUSE Labs