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=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 39C2EC433E0 for ; Tue, 26 Jan 2021 08:17:30 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 969E3206FB for ; Tue, 26 Jan 2021 08:17:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 969E3206FB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 715748D00AC; Tue, 26 Jan 2021 03:17:28 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6C4D28D0076; Tue, 26 Jan 2021 03:17:28 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5DA498D00AC; Tue, 26 Jan 2021 03:17:28 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0099.hostedemail.com [216.40.44.99]) by kanga.kvack.org (Postfix) with ESMTP id 495BA8D0076 for ; Tue, 26 Jan 2021 03:17:28 -0500 (EST) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 07F69181AF5C6 for ; Tue, 26 Jan 2021 08:17:28 +0000 (UTC) X-FDA: 77747221776.02.bed25_02109892758c Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin02.hostedemail.com (Postfix) with ESMTP id D2A5F10097AA1 for ; Tue, 26 Jan 2021 08:17:27 +0000 (UTC) X-HE-Tag: bed25_02109892758c X-Filterd-Recvd-Size: 2798 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf50.hostedemail.com (Postfix) with ESMTP for ; Tue, 26 Jan 2021 08:17:27 +0000 (UTC) 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 1EF21AC4F; Tue, 26 Jan 2021 08:17:26 +0000 (UTC) Date: Tue, 26 Jan 2021 09:17:23 +0100 From: Oscar Salvador To: Mike Kravetz Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Michal Hocko , Naoya Horiguchi , Muchun Song , David Hildenbrand , Matthew Wilcox , Miaohe Lin , Andrew Morton Subject: Re: [PATCH v3 1/5] hugetlb: use page.private for hugetlb specific page flags Message-ID: <20210126081716.GA9519@linux> References: <20210122195231.324857-1-mike.kravetz@oracle.com> <20210122195231.324857-2-mike.kravetz@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210122195231.324857-2-mike.kravetz@oracle.com> User-Agent: Mutt/1.10.1 (2018-07-13) 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 Fri, Jan 22, 2021 at 11:52:27AM -0800, Mike Kravetz wrote: > As hugetlbfs evolved, state information about hugetlb pages was added. > One 'convenient' way of doing this was to use available fields in tail > pages. Over time, it has become difficult to know the meaning or contents > of fields simply by looking at a small bit of code. Sometimes, the > naming is just confusing. For example: The PagePrivate flag indicates > a huge page reservation was consumed and needs to be restored if an error > is encountered and the page is freed before it is instantiated. The > page.private field contains the pointer to a subpool if the page is > associated with one. > > In an effort to make the code more readable, use page.private to contain > hugetlb specific page flags. These flags will have test, set and clear > functions similar to those used for 'normal' page flags. More importantly, > an enum of flag values will be created with names that actually reflect > their purpose. > > In this patch, > - Create infrastructure for hugetlb specific page flag functions > - Move subpool pointer to page[1].private to make way for flags > Create routines with meaningful names to modify subpool field > - Use new HPageRestoreReserve flag instead of PagePrivate > > Conversion of other state information will happen in subsequent patches. > > Signed-off-by: Mike Kravetz Reviewed-by: Oscar Salvador -- Oscar Salvador SUSE L3