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=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 56F3DC433E6 for ; Tue, 16 Feb 2021 09:06:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2111A64E00 for ; Tue, 16 Feb 2021 09:06:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230005AbhBPJGJ (ORCPT ); Tue, 16 Feb 2021 04:06:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229754AbhBPJGA (ORCPT ); Tue, 16 Feb 2021 04:06:00 -0500 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54774C06178B for ; Tue, 16 Feb 2021 01:04:19 -0800 (PST) Received: by mail-pl1-x62e.google.com with SMTP id z7so5141279plk.7 for ; Tue, 16 Feb 2021 01:04:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Hix40Xj1oUuEJXyWgpErtznzZizVsi/XpFAKnYjHmQY=; b=eCXmzNSbiTk7i4WkXniq28m9G37QrlWzW+DY39V8ZNK5WTP7spj9JBNl/75AUeXslS pJixcJGyqDLo4/gX0Lkr+1LUgrtreYH6pDPPHtbPLnLkeQx/1x9tDVzu0zNv77WPe+uF QM23Y4vse2SXdXjhaYvzlAGwnbVJnKqbsBbszex9XCw8oV+SmfE5m6RQXxoFgr5eVZn/ qINrIHGW1sADmAiL0WIfXKeZ8p6SxtIV13mV/bwjr35huaocQRV4X7kDW1oPkdZE79ZV Nbja5Hzu2TLV6H4VkmcjRP+LCxUc2OcC22SZjbz8IJ8OdTlvir4xzCcY9KhtszgDIiwM fSOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Hix40Xj1oUuEJXyWgpErtznzZizVsi/XpFAKnYjHmQY=; b=JG1jXtjjy6Ynn/pJ4KXTT++kZE7PcpvzHKS2+MlybVavxHZx2hJZ5dPbQRW1a7IHgB yEeB38o97dsHnJ0Riv0DviINmBgHc/VNiG73X1JNreo8/QiYZ7fobginHqPk1VEB+N3k Z/r7+j1ASW6IpdwksyY82Z/f612DO7TczJ+wqwWx9bgsLgF6mQg3G5ThsnzCOesjLPqy XOFYAIxO9R+OtdvWE83E7rElr4ofIl+vQC5d8bhQuotO9JpmzM3ifjWRg5hupOeIHXw5 1fSPI+226SMFgjS7ceFB/U/eOss2Xdhe7qFkeLaVnDJ7RWJaRbGMu+ln4mwNdMgNKDEx p7wQ== X-Gm-Message-State: AOAM533i23qqLUTrirCY5DIsAiyXhO3ityjpA4km1RyXg4Q8chc+PHcz Lar17cUTihapRu8ljpOXjv6+KAVKIN7pgI9BQJakmA== X-Google-Smtp-Source: ABdhPJwC+CdCVmurJuKhxiNJoI3GMzP36B8CJFWc2NOLZbqlE1QsTOfDQR+oZ/rFDU9LQIN8Yydx6cwaPCiXV/F65I8= X-Received: by 2002:a17:90b:286:: with SMTP id az6mr1469474pjb.147.1613466258888; Tue, 16 Feb 2021 01:04:18 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Muchun Song Date: Tue, 16 Feb 2021 17:03:42 +0800 Message-ID: Subject: Re: [External] Re: [PATCH v15 4/8] mm: hugetlb: alloc the vmemmap pages associated with each HugeTLB page To: Michal Hocko 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 , =?UTF-8?B?SE9SSUdVQ0hJIE5BT1lBKOWggOWPoyDnm7TkuZ8p?= , Joao Martins , Xiongchun duan , linux-doc@vger.kernel.org, LKML , Linux Memory Management List , linux-fsdevel Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 16, 2021 at 4:15 PM Michal Hocko wrote: > > 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=EF=BC= =9FIf 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. Got it. I didn't realize this before. Thanks. > > > 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