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 4F4CEC433DB for ; Tue, 16 Feb 2021 09:04:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A160D64DA3 for ; Tue, 16 Feb 2021 09:04:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A160D64DA3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=bytedance.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1E8918D0160; Tue, 16 Feb 2021 04:04:21 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 173328D0140; Tue, 16 Feb 2021 04:04:21 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F08DD8D0160; Tue, 16 Feb 2021 04:04:20 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0169.hostedemail.com [216.40.44.169]) by kanga.kvack.org (Postfix) with ESMTP id D211C8D0140 for ; Tue, 16 Feb 2021 04:04:20 -0500 (EST) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 9EA181838A3AB for ; Tue, 16 Feb 2021 09:04:20 +0000 (UTC) X-FDA: 77823544680.07.fowl30_2e0ca6d27642 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id 81C4C1838DBF6 for ; Tue, 16 Feb 2021 09:04:20 +0000 (UTC) X-HE-Tag: fowl30_2e0ca6d27642 X-Filterd-Recvd-Size: 5776 Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Tue, 16 Feb 2021 09:04:19 +0000 (UTC) Received: by mail-pj1-f50.google.com with SMTP id z9so5523673pjl.5 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=uMox/X6vDqYCxtZRkP4GiJkF+Bl8nMA4bmbAgJyO6OVH36OsiIGyi/Kxkrh6NySQU3 YIzik6V70Thnurc+Ebhr6YKQjn+4YEiukYNMam96t/X22HUDjvqRaL1pbFMvfmivGr+m jxb+2IL1HzHj6mGMhHggURzWjmWURZf7CGU+5nrCK0QL42OUbZpi68vl6H2AgiNhaQAE qRYrLox0OuiHtR8VkwQRmdv1Ax2VOOK/JVsgLMKu5wB2ywBA4pGLx99zOT7KteclPvKg cI3nWBeAaRLPD6GFLTJaaYiKLdAN2ioZoH94XQUoxquAaTFNMXNwoLs5WMGMZ5vNzIVR 5rpA== X-Gm-Message-State: AOAM532jJO0NFxdBnM1R77RRJOclqHeWrymmc2sDneiWFR1wAQzaVmTy /1J93NWqrOUxRIS3PzGLczZ3KtX+rUb4ajmMwb1Vzw== 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 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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