Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp981412rwn; Thu, 8 Sep 2022 11:27:15 -0700 (PDT) X-Google-Smtp-Source: AA6agR78g9k+8NZ7EcQ1yO9LyGlJD78lVu3gi+gLou5qU5ehb6rkLV4VOvsJaG9kq5cA0roG8iBz X-Received: by 2002:a05:6512:10c1:b0:491:4104:cf92 with SMTP id k1-20020a05651210c100b004914104cf92mr3271012lfg.211.1662661635613; Thu, 08 Sep 2022 11:27:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662661635; cv=none; d=google.com; s=arc-20160816; b=iT7Fmppc7LAXI4NlWxT5JA+Jrd4KG9/8+wybyh36JioJhClAEAd1nw7xUQMhM0PoSh wJ4+vOkF0B5el5gq6t08IGbMgPhYDOr6bpRhWMOuQZzUVudKJUVdt+2XmoQNnPiBcSAz Kl3VZjgENTgQThUOxhs6PYTYWu+BatmrtvDq7ByRtO8VgS31Uudus0VfS4ari3yjkW+S zn5HoljZfhn57HFrglZtxpPAmpVrQ4WWiabv8DnEt8cy2RANeUT9F8nUa54TaRn+Jj7t lbnq3ZOzDrKffaGva2FFUXn2cjqJjj2Absc+Z31bieGWcktHw90nGndFqJqy8xmfOGfJ lqeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=yIGQ1rsAiCTfDSyBYdyVPVyYlO9LImSP5xeSStH2FZ0=; b=ub3CyQjUopb5TbOd+szFPU7fF+n2cSYoiUZ1B7Lc+YctHp3j5gLdXLnrEFCA6XQaJ4 tN5udbaasphRuh3w95iQbRO9GRcQKlAfUn/G0aOdTSOJcElNBz+1rCXWkPgXzMwEC5ok +tksyto2FoTC9RfIMuaBmlCe6UsNg+oe1KAQ1vmkOvudbBDHATCrbtpUSQU40LtvvsFr FdnrqPDK+tzKtQVJvt8v9yESTh/7/A9yqaGSBruF1P+jdW4uo989mhFNB1tD40HbDq8O PUkAGUPV21kxuf1sK8I3zTkZJdzY/6EmxbIlJbGEqgQe+jLBTLmQEILu9FoLRpebSA+p 95+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=pRUckrDB; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o18-20020a05651205d200b00497a61c00d1si2514844lfo.426.2022.09.08.11.26.46; Thu, 08 Sep 2022 11:27:15 -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=@google.com header.s=20210112 header.b=pRUckrDB; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230411AbiIHSON (ORCPT + 99 others); Thu, 8 Sep 2022 14:14:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230204AbiIHSOK (ORCPT ); Thu, 8 Sep 2022 14:14:10 -0400 Received: from mail-yb1-xb2d.google.com (mail-yb1-xb2d.google.com [IPv6:2607:f8b0:4864:20::b2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 710BFE55B6 for ; Thu, 8 Sep 2022 11:14:09 -0700 (PDT) Received: by mail-yb1-xb2d.google.com with SMTP id 130so22084750ybz.9 for ; Thu, 08 Sep 2022 11:14:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=yIGQ1rsAiCTfDSyBYdyVPVyYlO9LImSP5xeSStH2FZ0=; b=pRUckrDB014z72ph6+Gz6wJWHEWKBfiaLi4wsYdQZDPkwzAG/b1AVpHgGh8RXCE+oq AQeaBo9euSonu1IHvOKnIOUfif2gLUjpuAdwul1l35/Ct3ruLEbUkux3Gfot9hCf+DYh W2c6fOkUxHaGwb6v23PHPtEVGkW0/borE1dH7CDUHyJdZNkosP18XXH7cuUPG/ZKtWkG BC0rHV9d5ZuFtPmBt2Vvl2xeLZrRZd69PahstEpaawCiJO2Xiyi1WgA9NwVdLalMrlir wYH8p4SuxorGTSSBGWHfpvJGm25XC/ikzKFvEOPb8sZj97ExgP2maYpg6Znoqs3w/ymX 7H1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=yIGQ1rsAiCTfDSyBYdyVPVyYlO9LImSP5xeSStH2FZ0=; b=ZF8s9J2tNvs/Q8jOoiRYhGyjOFAlhSjaa82GtddTNMxEHAGXGEfhcsczmMcI+mwshF rtzdCsyI3H1BlUydfraNYOWDRIEFcyfTJP+YvRVN/RO04KS84wrK99UmirSAE1UZCV1l +9lEh3tH8wWGs6hDbqXJvQa5X7LaXpuFEoNMW4OfvFHlTL918vuNgtXpBADPak+9v70T dokPOooWwNA4MrKmECqByPr3LVWqnSOZ9ZQg6zGfPPaS/s4WJN56S8Rgfhq3FvPkutM6 oHldjdmmwA88JxA+XWbUnijDaTI1zwDZgwB/i2DWBX04pX5mGZ4PgEp5spLOXSrd6ALD cDaA== X-Gm-Message-State: ACgBeo0wLBM5qfg+bReTgkd7SkGUidFlSh9H3ewxatM6E4CyhE/aXYYC DoRKJrJP/aL1KyoODWp0iXx0KGm6CXcMHXyCuTN5zg== X-Received: by 2002:a5b:88a:0:b0:6ad:5eca:575b with SMTP id e10-20020a5b088a000000b006ad5eca575bmr6464622ybq.577.1662660848578; Thu, 08 Sep 2022 11:14:08 -0700 (PDT) MIME-Version: 1.0 References: <20220624173656.2033256-1-jthoughton@google.com> <20220624173656.2033256-10-jthoughton@google.com> In-Reply-To: From: James Houghton Date: Thu, 8 Sep 2022 11:13:56 -0700 Message-ID: Subject: Re: [RFC PATCH 09/26] hugetlb: add hugetlb_hgm_enabled To: Peter Xu 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 Thu, Sep 8, 2022 at 11:07 AM Peter Xu wrote: > > 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". :) > Will do. :) - James > -- > Peter Xu >