Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2452826pxj; Mon, 10 May 2021 03:24:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4aHH5OgvFwgJ2Gd/8gDKYqkVx456riTvsRCZknVLkGNxSsHZ0530OqlemxTkSYKpuijCr X-Received: by 2002:a05:6e02:eac:: with SMTP id u12mr21227352ilj.177.1620642267956; Mon, 10 May 2021 03:24:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620642267; cv=none; d=google.com; s=arc-20160816; b=V76nzzUARNQHm7wncUoSjI8G4e/qQGfeSh3CdRQmGPO1dk1A5ej3e2R7jMuN5m4/VP qU5zw9XkLVEsLZ6fdEmzdZHoiUy/n7sXKcUITkNSoSCKZRQSgY5X75FttxN2wbq4I/H9 FWbtEZ24B+XoYdc3A4XEcTsJ22Ea/vDXmyeoCC9ZULoOiLO5Cl67JvV1r09DOofXhq2B K60eRtaIPJaN9NHOobYCEHSC5YvZBjnssIOIZBFsoDD2xp5VGeloEUpeQPOWsOgZDtMa gfxSwq2RS5NUtUU1x6XZKL/eIDVaLWiDD5Zp6dxAY5WqDPJF71y17Vy81G6ZcUSfjNos 7Raw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=PR6k3iHZ+wBaahiZVlv9uYESg+UPLMKqZXv7Q3AdQ1Q=; b=ogN1obujZkkwN5X5chA28ql46f0H+75qTEZZQ4Cg2wn6ti/EcFzSN0NNPY5AgEf9Jo G/2nPEZiNx77Q0VdxZY2WMOgRrv/9d98JHpZDHRKtmhvu5QoyO9e4dp8JZEhUm/2oqnC KPJ73s5hBvbWDM0D7Vg8vmNRgbvn/AiXqIl0op1nDXR9llG426yLuDkzyX2QDV7Ibuf3 14Mut17V8Aiu5liBgpCoDpbjqcA/nloeKYgJKjdKhESq/bOzxiUnsxCucNIlwuD0QJue Xwy+YLfN5IcYYWScLDqAmgQjLwnEkDQTckaOBJOFlYT5dKWQtBeHvbR16B+k/wiMVp0M jrZA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g5si16911197ild.106.2021.05.10.03.24.15; Mon, 10 May 2021 03:24:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230521AbhEJKYY (ORCPT + 99 others); Mon, 10 May 2021 06:24:24 -0400 Received: from mx2.suse.de ([195.135.220.15]:37534 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230351AbhEJKYX (ORCPT ); Mon, 10 May 2021 06:24:23 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 5497CADDD; Mon, 10 May 2021 10:23:17 +0000 (UTC) Date: Mon, 10 May 2021 12:23:12 +0200 From: Oscar Salvador To: Muchun Song Cc: corbet@lwn.net, mike.kravetz@oracle.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, x86@kernel.org, hpa@zytor.com, dave.hansen@linux.intel.com, luto@kernel.org, peterz@infradead.org, viro@zeniv.linux.org.uk, akpm@linux-foundation.org, paulmck@kernel.org, pawan.kumar.gupta@linux.intel.com, rdunlap@infradead.org, oneukum@suse.com, anshuman.khandual@arm.com, jroedel@suse.de, almasrymina@google.com, rientjes@google.com, willy@infradead.org, mhocko@suse.com, song.bao.hua@hisilicon.com, david@redhat.com, naoya.horiguchi@nec.com, joao.m.martins@oracle.com, duanxiongchun@bytedance.com, fam.zheng@bytedance.com, zhengqi.arch@bytedance.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v23 5/9] mm: hugetlb: defer freeing of HugeTLB pages Message-ID: <20210510102312.GC22664@linux> References: <20210510030027.56044-1-songmuchun@bytedance.com> <20210510030027.56044-6-songmuchun@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210510030027.56044-6-songmuchun@bytedance.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 10, 2021 at 11:00:23AM +0800, Muchun Song wrote: > In the subsequent patch, we should allocate the vmemmap pages when > freeing a HugeTLB page. But update_and_free_page() can be called > under any context, so we cannot use GFP_KERNEL to allocate vmemmap > pages. However, we can defer the actual freeing in a kworker to > prevent from using GFP_ATOMIC to allocate the vmemmap pages. > > The __update_and_free_page() is where the call to allocate vmemmmap > pages will be inserted. > > Signed-off-by: Muchun Song > Reviewed-by: Mike Kravetz Reviewed-by: Oscar Salvador -- Oscar Salvador SUSE L3