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=-5.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 52C26C433E1 for ; Fri, 10 Jul 2020 17:09:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 13F4B20657 for ; Fri, 10 Jul 2020 17:09:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="TCkSRcky" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 13F4B20657 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 970508D0002; Fri, 10 Jul 2020 13:09:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8F9648D0001; Fri, 10 Jul 2020 13:09:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7E8528D0002; Fri, 10 Jul 2020 13:09:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0159.hostedemail.com [216.40.44.159]) by kanga.kvack.org (Postfix) with ESMTP id 65F408D0001 for ; Fri, 10 Jul 2020 13:09:00 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id F3EB58248047 for ; Fri, 10 Jul 2020 17:08:59 +0000 (UTC) X-FDA: 77022801240.26.range20_461497b26ed0 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id CC1361804B667 for ; Fri, 10 Jul 2020 17:08:59 +0000 (UTC) X-HE-Tag: range20_461497b26ed0 X-Filterd-Recvd-Size: 3745 Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by imf42.hostedemail.com (Postfix) with ESMTP for ; Fri, 10 Jul 2020 17:08:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594400938; 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=dIJ9Cu+pL+yyFjMqrEiFKXlTlYcC1jnm87VZK4JkkJ0=; b=TCkSRcky3op6rRcaQ+QofWQfiJDbakueYx2oA0QgDG9Rbl2FZPwpuIMd0mkrs+K1o19qpI KxiJMUOfRDdQ0xnxkb2EwFp3YS97ubpn3xEWAJfJ7+RD08AwgVv+E71BH3V4zYgV6Plflr CbXLLdIzAzCtolQEoQd1uM0auSRsfos= 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-283-yemVJvaxOsOSsDOYurKUgw-1; Fri, 10 Jul 2020 13:08:56 -0400 X-MC-Unique: yemVJvaxOsOSsDOYurKUgw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1F72A800FF1; Fri, 10 Jul 2020 17:08:54 +0000 (UTC) Received: from mail (ovpn-112-112.rdu2.redhat.com [10.10.112.112]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E437A6FEC3; Fri, 10 Jul 2020 17:08:53 +0000 (UTC) Date: Fri, 10 Jul 2020 13:08:53 -0400 From: Andrea Arcangeli To: Matthew Wilcox Cc: Hugh Dickins , Mike Rapoport , linux-kernel@vger.kernel.org, Alan Cox , Andrew Morton , Andy Lutomirski , Christopher Lameter , Dave Hansen , Idan Yaniv , James Bottomley , "Kirill A. Shutemov" , Peter Zijlstra , "Reshetova, Elena" , Thomas Gleixner , Tycho Andersen , linux-api@vger.kernel.org, linux-mm@kvack.org, Mike Rapoport Subject: Re: [RFC PATCH v2 1/5] mm: make HPAGE_PxD_{SHIFT,MASK,SIZE} always available Message-ID: <20200710170853.GB11749@redhat.com> References: <20200706172051.19465-1-rppt@kernel.org> <20200706172051.19465-2-rppt@kernel.org> <20200710164037.GA11749@redhat.com> <20200710165746.GO12769@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200710165746.GO12769@casper.infradead.org> User-Agent: Mutt/1.14.5 (2020-06-23) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Rspamd-Queue-Id: CC1361804B667 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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, Jul 10, 2020 at 05:57:46PM +0100, Matthew Wilcox wrote: > btw, using the hpage_ prefix already caused one problem in the hugetlb > code: > > https://lore.kernel.org/linux-mm/20200629185003.97202-1-mike.kravetz@oracle.com/ > > I'd suggest we rename these to THP_PMD_* and THP_PUD_* to make it clear > they're only for the THP case. The confusion seem to have happened only about hpage_nr_pages not about HPAGE_PMD_*. It's just the hpage_ prefix alone that is commonly used by hugetlbfs only and so it's not surprising it caused confusion. So I certainly agree hpage_nr_pages would better be renamed to something more THP specific (either hpage_pmd_nr_pages or trans_huge_nr_pages or as you wish), but HPAGE_PMD_ don't look too confusing about the fact it's only for the THP case since the non-THP case won't necessarily care about PMDs. Thanks, Andrea