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=-7.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 5A31CC43381 for ; Tue, 12 Jan 2021 10:41:15 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CB8DE2310A for ; Tue, 12 Jan 2021 10:41:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CB8DE2310A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id AA2436B0254; Tue, 12 Jan 2021 05:41:13 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A2C876B0283; Tue, 12 Jan 2021 05:41:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8F4226B0284; Tue, 12 Jan 2021 05:41:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0074.hostedemail.com [216.40.44.74]) by kanga.kvack.org (Postfix) with ESMTP id 72C836B0254 for ; Tue, 12 Jan 2021 05:41:13 -0500 (EST) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 37ECC1EF1 for ; Tue, 12 Jan 2021 10:41:13 +0000 (UTC) X-FDA: 77696780826.28.help37_3307be427514 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin28.hostedemail.com (Postfix) with ESMTP id 1287C6C3A for ; Tue, 12 Jan 2021 10:41:13 +0000 (UTC) X-HE-Tag: help37_3307be427514 X-Filterd-Recvd-Size: 3697 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Tue, 12 Jan 2021 10:41:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610448072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=laMWYNPhqsIO491bNvJyhQH+JCab/CvNj2mGMUwymvk=; b=KL7n5HuvDTYwtCVLx7ZFPSrebFOxdH/q9p15kX4WjY7zLZ6tYw/LSDWbL4P3r4mPhHX057 vsv+XQsfX0HyREwv/Wa5aiKLFEuJHmbGMaCObQaLjglhNaRzm9Lm9SREKDZJl45E30NhFR V2JtJPlFvHouZdGIP2InJzhTsQsfnMk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-354-oSGPyhgqMzea9iap3Xa-dQ-1; Tue, 12 Jan 2021 05:41:08 -0500 X-MC-Unique: oSGPyhgqMzea9iap3Xa-dQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0E1A615720; Tue, 12 Jan 2021 10:41:07 +0000 (UTC) Received: from [10.36.115.140] (ovpn-115-140.ams2.redhat.com [10.36.115.140]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4902E60CA7; Tue, 12 Jan 2021 10:41:05 +0000 (UTC) Subject: Re: [RFC PATCH 0/3] create hugetlb flags to consolidate state To: Mike Kravetz , linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: Michal Hocko , Naoya Horiguchi , Muchun Song , Andrew Morton References: <20210111210152.118394-1-mike.kravetz@oracle.com> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: <250496a6-edfb-6a0e-9ca2-f1ceea6a0c8a@redhat.com> Date: Tue, 12 Jan 2021 11:41:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <20210111210152.118394-1-mike.kravetz@oracle.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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 11.01.21 22:01, Mike Kravetz wrote: > While discussing a series of hugetlb fixes in [1], it became evident > that the hugetlb specific page state information is stored in a somewhat > haphazard manner. Code dealing with state information would be easier > to read, understand and maintain if this information was stored in a > consistent manner. > > This RFC series uses page.private of the hugetlb head page for storing a > set of hugetlb specific page flags. Routines to manipulate the flags > are copied from normal page flag manipulation code and use atomic > operations. This is likely overkill for the uses in hugetlb code, and > can be changed after additional auditing of code. Haven't looked into the code but that sounds like a good idea. > > For now, only 3 state flags are added as part of this series. However, > the suggested fix in [2] could use another flag. In addition, a flag > could be used to track whether or not a huge page has been cleared to > optimize code paths if the init_on_alloc security feature is enabled. Right, that will be helpful: indicating pages that were either cleared directly when allocating (init_on_alloc) or via some asynchronous mechanism in the future. -- Thanks, David / dhildenb