Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp981063rwn; Thu, 8 Sep 2022 11:26:50 -0700 (PDT) X-Google-Smtp-Source: AA6agR71sDECS2RvtHHBcl+bHYgvIGtOxNWqwGVAiJ5X251nf4ErfMPqwqIO4OVEMhhcHwSko5Zy X-Received: by 2002:a05:6512:1694:b0:48a:9d45:763f with SMTP id bu20-20020a056512169400b0048a9d45763fmr2994158lfb.662.1662661610630; Thu, 08 Sep 2022 11:26:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662661610; cv=none; d=google.com; s=arc-20160816; b=Mbai19BowyO2bLyRYRJ8G6rOipv/8Q07PPFNmMDh0bFQINbHQLPyh4XA/GpxKmiWfM wqsEQfTHnwVhAbYE+TMyGyQ32sv/sh+JEIErfY7aqc8X7qdg+7esXgxtivSa2in2qDkF gzJg2kVcOAZMD1MGAksJvq7kwLmMpF2yy2gPak6zkjGIUZF1Jmxt9l48hZqp4yhZi0rp v+lJFyI6M/uOyNZitHhTudXwq+gptCz/UlJH2PlmDRIw1+0cZhCga+Ad8vOYRa4g4fa5 d+oHCsDuJmcg/jJgH4t1El1zClS0pQ/Jd+cJWoYN6lUFq5QknxAoWEd/6U3eqRQPUhwK jFHg== 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:dkim-signature; bh=XOiQMUC0eykppoN7iesoA/Zyk8TgTL7xhVonR4jGpV8=; b=U2o6DVnpGFGKbeukXe8zUMORI7aY4WeBaMnlFwzqdzVpFcthT/MA9hdcV562G73qmg l4uqwHD/CZKJja720elU3ecyF+p42CIxlw9r9qivLXTR5UEBB3c27M79HJHNLv24zEnr 1JI3M+6/qRdTVQqQIb38v/CXhKlDAoSpiXfo77FMWG58VKdqu1QmS8MBCe5bq8R3hLet 2yaqGj4e73eC5FJynPDjPB+7FbPbor8s/JIOFu3VZm1X/SkmGY4ASqMDwc5cCM758Qh8 FETXO1r/nLWj9i+YsDQ0KVbi4apRMM1re7eOGrkRMTZMUb7NQoHXF5EFE/QXIw15wxFJ /2wA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SO+YhVse; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q8-20020a05651c054800b0026507554474si8976846ljp.361.2022.09.08.11.26.21; Thu, 08 Sep 2022 11:26:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SO+YhVse; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231594AbiIHSH7 (ORCPT + 99 others); Thu, 8 Sep 2022 14:07:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229943AbiIHSHz (ORCPT ); Thu, 8 Sep 2022 14:07:55 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BCF1EA60C for ; Thu, 8 Sep 2022 11:07:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662660473; 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: in-reply-to:in-reply-to:references:references; bh=XOiQMUC0eykppoN7iesoA/Zyk8TgTL7xhVonR4jGpV8=; b=SO+YhVse3wysCzKhj5ZyUCQAuYReLnzFONZ4c4IXZn72s07EgZqj8oKw+z1BWqtv+nVSGe u6JQxMoN3R6q0LO30ZC+xF9zTLISPKMgReIodIRxNHdM5/5nXvC+6j1WV8Xyt61KoXBxfd QzYZ2cRhNQv70Qm7fUH4eJKDQVxeA30= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-29-WNaq2jhCO4qY15DEqQ-jhA-1; Thu, 08 Sep 2022 14:07:52 -0400 X-MC-Unique: WNaq2jhCO4qY15DEqQ-jhA-1 Received: by mail-qt1-f197.google.com with SMTP id a29-20020ac8435d000000b0035a990943ddso234160qtn.15 for ; Thu, 08 Sep 2022 11:07:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=XOiQMUC0eykppoN7iesoA/Zyk8TgTL7xhVonR4jGpV8=; b=sj+fpeYsxj5x7ZfVbl5Vr6+NLqogwx3POK6en0wMul4ggyJjXtfCNK/pw6QUGysAWk IIMhu/vk/ojv37aWlT/YvKF0zipIbID8oJO33HybuRG7Jd7H5qoLyfx4kfErz+k3dRKV SbVHUOhbN3Xk/PADXFaD3vQrqCpGcvKE+jxtfHuTxMKb9EynljsDIMY4BQoopN0UrG2h 2VRvXx6pwdzoZDSZ5WijS3D0X6z2uuu+seify0cvL61uRduJY28l9QtMuw9fdDigXKQK jvGtr8sED/DJN2F9fNnCG218UpZEB/+aFx7sBsDnam0D4IOnNhv9rbfzMwQ4M0Pyt+HY 0LkA== X-Gm-Message-State: ACgBeo09gNKdreeTP8wqMEP3v1mHeqpptqAquKVKZREW5J6aTZVLbcws WbZHJ8UyXfIiojYua2E8nrT25uNodRe2QA1nxAoFBpyUr2qGXwepBq/f/inG5+NcdFGHdzxijDu BYsEXC92E1tdT+hyviHW0iQwZ X-Received: by 2002:a05:6214:1cce:b0:474:60f:18f0 with SMTP id g14-20020a0562141cce00b00474060f18f0mr8729237qvd.106.1662660471246; Thu, 08 Sep 2022 11:07:51 -0700 (PDT) X-Received: by 2002:a05:6214:1cce:b0:474:60f:18f0 with SMTP id g14-20020a0562141cce00b00474060f18f0mr8729221qvd.106.1662660471044; Thu, 08 Sep 2022 11:07:51 -0700 (PDT) Received: from xz-m1.local (bras-base-aurron9127w-grc-35-70-27-3-10.dsl.bell.ca. [70.27.3.10]) by smtp.gmail.com with ESMTPSA id j17-20020a05620a289100b006b5d9a1d326sm18302465qkp.83.2022.09.08.11.07.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Sep 2022 11:07:50 -0700 (PDT) Date: Thu, 8 Sep 2022 14:07:49 -0400 From: Peter Xu To: James Houghton Cc: Mike Kravetz , Muchun Song , David Hildenbrand , David Rientjes , Axel Rasmussen , Mina Almasry , Jue Wang , Manish Mishra , "Dr . David Alan Gilbert" , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 09/26] hugetlb: add hugetlb_hgm_enabled Message-ID: References: <20220624173656.2033256-1-jthoughton@google.com> <20220624173656.2033256-10-jthoughton@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220624173656.2033256-10-jthoughton@google.com> X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 24, 2022 at 05:36:39PM +0000, James Houghton wrote: > +#ifdef CONFIG_HUGETLB_HIGH_GRANULARITY_MAPPING > +bool hugetlb_hgm_enabled(struct vm_area_struct *vma) > +{ > + /* All shared VMAs have HGM enabled. */ > + return vma->vm_flags & VM_SHARED; > +} > +#endif /* CONFIG_HUGETLB_HIGH_GRANULARITY_MAPPING */ Another nitpick: suggest to rename this to "hugetlb_***_supported()" (with whatever the new name could be..), as long as it cannot be "disabled". :) -- Peter Xu