Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp704378ybt; Fri, 10 Jul 2020 10:12:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjARyhh9RQjosPJQUGYc6IDj1RmP9ww6OTgdwV4xFiZGnnjrHE2b6EjfhqpYbNLAbGMwaJ X-Received: by 2002:a17:906:d9c4:: with SMTP id qk4mr65790642ejb.100.1594401128270; Fri, 10 Jul 2020 10:12:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594401128; cv=none; d=google.com; s=arc-20160816; b=iN02qEG6A2bQAxxskZTu36WWZitFJhFyp0Q0KKgvk2qeJe6kD5n1iv7Jpehrji9GOR 5pHYspXo1k6+LRUHzyGm+zdFnSVSiGvQGoQjY0B64cqO+/eW9R4HCfxzi5fd+nB4N+g8 abKWL79BxxCx2JgVEsKZCTos2RuZsdRr4QAU0PCX3Kc/PLpM/cB2Zi42q7ZFGB6YOSOR 3whNkuNvy6zZBseb1DUie5s2Jb5W5Ch0IRPD90aJS4kdgJVyWBNgIc9r3qEcBDPk1koQ rHxjuPRGoGKHAqvBPuhZcZEOD6bone4xhA+YjxgdG8UTVLXK74ShIierkLSPwGQQ7ju4 9cpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=dIJ9Cu+pL+yyFjMqrEiFKXlTlYcC1jnm87VZK4JkkJ0=; b=B/Ob4m/4w5kgZzfUcNMwxhLN0m3lR7q39NDsEWTPJ+KTICkICmPblijLRcBqmMqqJ9 R1iSi9ZHC4e6BWlGNY/icC/s5VDb1TiL7VNSett7czX9jOUMcbFKs3hzxFlvV02tt0GA j7ZsTECZnpbgRdvfoXuIl3Q/uhO5L/ritXmb+fyJBWsaCmNkZz5mBbJllrtL6mie9CSu WPLBp1bJ/ANTw7labafloVlZVm/ElOVl3wMXVfUmoRlI7faepY7R7TviQWnbd+M4ZzhE Hgcwkr1K9qWpk/wbxB0wL7JptI73h2LN8Ukq46u91332uxDoQQQR3d6UB2QiHe6bi4sW gB8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bvaVOM+p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c20si4076788edj.314.2020.07.10.10.11.45; Fri, 10 Jul 2020 10:12:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bvaVOM+p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1728013AbgGJRJC (ORCPT + 99 others); Fri, 10 Jul 2020 13:09:02 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:50404 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726496AbgGJRJB (ORCPT ); Fri, 10 Jul 2020 13:09:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594400940; 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=bvaVOM+pbgMBPIZ7y/nl0Z7t5nYGBGiGwx8oJZH6IK3KtUXRBnDpTPlTp0AjjF5RHsVTgQ x9MdPW/Rcx1juwLz0MpyHxHkgIJtNEXLEowZYt0nrRK2fpJbBqggW56lg7KD8lWCtI3lIf lZXwB5lMHoY9hCTMwcvFzIVMICwjsbE= 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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