Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp3487174pxb; Wed, 14 Apr 2021 06:41:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyeFkhnG5Ql7wsUT5+37QKjnWeWKRRBcN3Q8Icf7NvQdksiogEpg2fj0g7TOWwiqpvdQ2/Q X-Received: by 2002:aa7:df95:: with SMTP id b21mr40135520edy.338.1618407691128; Wed, 14 Apr 2021 06:41:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618407691; cv=none; d=google.com; s=arc-20160816; b=PRZlUW97t9BL8rty828SBYhzoegWsTPsOwpi5c2HddNl91nz6dnPPYg0GCtBxI1SW+ zg0cqnl7DeZQu5LJsz8Bxsr6C8BsgnszPwwkuOYpnrWZrJ3+WIa6A3htcWR0x1wLCcc5 1BbDRtQHR3s06UOjVSkDJftL33BKZvN0if/myh65Ql1aa9InYenrPZoNgPavUmIexEqc lhqK00IoBJApTh6npbnMWARylJg+PhVGiUih45dD/s7SxdqI/2uOr5cfM1m3HMECX9RK of10BYUv6cJTeqKrrScLmPIIFenEdVO504DG+JgDgQEqx9agTTBUtASGp0YlUVcPvWYU iFFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=NW3MlHF0Zqk0qy8zLPADFMewIkw+dkwRQ3FMnOHxkgw=; b=klgmXCQktbgum/W6/Q2WDCf+aKtlwBBWcX9F3jm61nkGwbdMAKiprBIriS0DZtCCnp aETv1g4nhBestRvKmH1Ke0LZ1+IdrANKa5QRNPOPusHUC9vrbh8BEesx87119DIDsv7y tCUwivuUQNzc+oLMKQ+1O9P91FmoCoxxmI1NcG3sO7zyhZ5TAdGrI89S7XP+6hSmBYJS 9v33JsPf6az7f7eYvcCqea45uQ8sGWhl2wSWk0jQUYJq2PxsGjBOuuR9kyz0CpGhlvhK RccbjiweLQru6fHk8RP3qyL5k26B2lQA5WZhi4uDHa8WRTEHtgAf0HNZaBasLhKMzA5O B2vQ== 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 bf3si2252585edb.431.2021.04.14.06.41.08; Wed, 14 Apr 2021 06:41:31 -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 S243052AbhDNFAM (ORCPT + 99 others); Wed, 14 Apr 2021 01:00:12 -0400 Received: from mx2.suse.de ([195.135.220.15]:56184 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230200AbhDNFAL (ORCPT ); Wed, 14 Apr 2021 01:00:11 -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 5B040ABB1; Wed, 14 Apr 2021 04:59:50 +0000 (UTC) Date: Wed, 14 Apr 2021 06:59:48 +0200 From: Oscar Salvador To: Mike Kravetz Cc: Andrew Morton , Vlastimil Babka , David Hildenbrand , Michal Hocko , Muchun Song , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v7 4/7] mm,hugetlb: Split prep_new_huge_page functionality Message-ID: References: <20210413104747.12177-1-osalvador@suse.de> <20210413104747.12177-5-osalvador@suse.de> <94992151-03fc-dedd-3e09-811908d26d04@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <94992151-03fc-dedd-3e09-811908d26d04@oracle.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 13, 2021 at 02:33:41PM -0700, Mike Kravetz wrote: > > -static void prep_new_huge_page(struct hstate *h, struct page *page, int nid) > > +/* > > + * Must be called with the hugetlb lock held > > + */ > > +static void __prep_account_new_huge_page(struct hstate *h, int nid) > > +{ > > + h->nr_huge_pages++; > > + h->nr_huge_pages_node[nid]++; > > I would prefer if we also move setting the destructor to this routine. > set_compound_page_dtor(page, HUGETLB_PAGE_DTOR); Uhm, but that is the routine that does the accounting, it feels wrong here, plus... > > That way, PageHuge() will be false until it 'really' is a huge page. > If not, we could potentially go into that retry loop in > dissolve_free_huge_page or alloc_and_dissolve_huge_page in patch 5. ...I do not follow here, could you please elaborate some more? Unless I am missing something, behaviour should not be any different with this patch. Thanks -- Oscar Salvador SUSE L3