Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp420336rdh; Thu, 23 Nov 2023 07:29:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IG0XQPC1d6NqXk4ioFQpAD3LMfYIdEVHCdyzYrVMvOGdWaxtblG+Zik+nqNmf0sViAgk6RR X-Received: by 2002:a05:6a00:1c8c:b0:6be:5a1a:3b93 with SMTP id y12-20020a056a001c8c00b006be5a1a3b93mr5369183pfw.4.1700753361434; Thu, 23 Nov 2023 07:29:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700753361; cv=none; d=google.com; s=arc-20160816; b=Tckyy77xV0WTc1F5NZAGZFYhFaHb1nzf0vuUKiGP3/FXcS0/HOlyfk7bIV9sLhhaU9 ONZmADSV581etjNcMRilXTuq+1xNDV2a6cCXcA6xj5Td13o3WagEeKaT3qTQxBlUJr2W 6+MZVTcL4KvEf0/kpplIWYB1OOkJFRU0LUGW43cjFCnUcJso/UYjRV100Ai/nmc5fxFH 847dcstC7ApKFhIy+ayCvwGLBvOJw0Q5WqkrWW21FnFkf0DhFp0QyzSRM7bYFDtmaXtm IypqsfDuvjsi4gj3VruaoJMmyygbWuGNtqC5xhhqJZs7BiwJNPFQG2qTrxXn9PazJJwu lh/w== 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=5h6+cWGrz23YrwqeZDYI017fAYOSZdJb9rWkUmkd9M8=; fh=pQA7p6n9gjTTR41p8aBir07nEG6yKKhKiJiqOIfIZqM=; b=I2XBzyhaa2m3LrqJkNwgzku90tWMOO5qBMqqE79F5gX/rO1NXs+v3Cu5sCazlM+253 s26MRh+nkR78j0Lm6n1F/ks5HyzDkZLCe9VhjyEU6hnGOJJTwbD++LLQx/7D7AJO8dvP 4Ordxmb0JMMmsiFOJwbNrK7OmYUIIcllzU7JS2kUnBbSuT1+0RhLkzWbipriMiX9bArd c2UvMY4YvnjdMGPIEFHdSPKxsMr3lXMI9ilGxoOvGOwOoZTX9M/1lc+CGaFLEaUK8JFm I/sjPotsO1CW9DNSC6VOD6gcWy2218ZAR6OW5BpUYoahI02LvYI7JvSvKWTxoLOPyAyG ASdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BsBh6eBR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id s63-20020a632c42000000b005b98299a57csi1401854pgs.727.2023.11.23.07.29.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 07:29:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BsBh6eBR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 09FF08263EAB; Thu, 23 Nov 2023 07:29:16 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346097AbjKWP2a (ORCPT + 99 others); Thu, 23 Nov 2023 10:28:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346240AbjKWP1i (ORCPT ); Thu, 23 Nov 2023 10:27:38 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFF781BC0 for ; Thu, 23 Nov 2023 07:27:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700753240; 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=5h6+cWGrz23YrwqeZDYI017fAYOSZdJb9rWkUmkd9M8=; b=BsBh6eBRghYRUxL332LiSHgcF1iwoUgOhJtaEPDhEtxUsIfjFCsQE+ewZFI4Ji007Ai3L6 DmtYzdi84T3Mtpis8bHtT4xJ3if2SJ7yHVi8cw55xJhnVGE7eEiumlDn4d50wkMW2klvto lwlyD/1v2+KwHBNfCMpgzkPxYXe72EM= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-632-3JXbwu5TPt-M_f2hGWZFSQ-1; Thu, 23 Nov 2023 10:27:19 -0500 X-MC-Unique: 3JXbwu5TPt-M_f2hGWZFSQ-1 Received: by mail-qv1-f72.google.com with SMTP id 6a1803df08f44-67a06b43afcso1659146d6.1 for ; Thu, 23 Nov 2023 07:27:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700753239; x=1701358039; 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 :message-id:reply-to; bh=5h6+cWGrz23YrwqeZDYI017fAYOSZdJb9rWkUmkd9M8=; b=h3gSQfg5al1rwafKs2mjC43mvgN1DJXmioloIaFpBDzyZcTCJwbWw1AqLkL7hk8xfz nQgvEshFvvrppI1H5GQJo9mT3cBDkyx285LQ8B3S5yb/RBI6X1tOGMfLCM/Z3tg8gAvE O5P+XK1QmEyeDVGNNbAiD10cVQpHnZN9c7HW9fxtJ/utay0ss0VpGN6z9BE1UAZUfkl+ TX5ndokhB1QApF7Zciv3VuVTczQIDAXb/wIWLGBreTRzhYIKDQ019ruX2bJaoID0/c/D QqT7gRBrVCFX9reK1Ta2PuSK3BGkCFNEB5JpzF2Z0Leq4ZVpK/QtlXZP0XyDjI5zxVmB c/Rw== X-Gm-Message-State: AOJu0YzCnl5AY1Kcbxegv915M3geYeDFNUSbRDcoZFQQT5YKa2MomSG0 VR4bY7uoF7CNS9Cqyre/p0uOORzRfmCQWUpVqgwe9w/tUDAqtXjGPigNogyzmnfnXBNPcwFI6uX TYybZPTiYEfpssSa4v4C5Kl0+ X-Received: by 2002:a0c:cd84:0:b0:679:e920:8cd8 with SMTP id v4-20020a0ccd84000000b00679e9208cd8mr5882099qvm.5.1700753238793; Thu, 23 Nov 2023 07:27:18 -0800 (PST) X-Received: by 2002:a0c:cd84:0:b0:679:e920:8cd8 with SMTP id v4-20020a0ccd84000000b00679e9208cd8mr5882075qvm.5.1700753238487; Thu, 23 Nov 2023 07:27:18 -0800 (PST) Received: from x1n (cpe688f2e2cb7c3-cm688f2e2cb7c0.cpe.net.cable.rogers.com. [99.254.121.117]) by smtp.gmail.com with ESMTPSA id w24-20020a05620a149800b0077d587e5589sm531883qkj.27.2023.11.23.07.27.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 07:27:18 -0800 (PST) Date: Thu, 23 Nov 2023 10:27:15 -0500 From: Peter Xu To: Mike Rapoport Cc: Christoph Hellwig , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Mike Kravetz , "Kirill A . Shutemov" , Lorenzo Stoakes , Axel Rasmussen , Matthew Wilcox , John Hubbard , Hugh Dickins , David Hildenbrand , Andrea Arcangeli , Rik van Riel , James Houghton , Yang Shi , Jason Gunthorpe , Vlastimil Babka , Andrew Morton Subject: Re: [PATCH RFC 03/12] mm: Export HPAGE_PXD_* macros even if !THP Message-ID: References: <20231116012908.392077-1-peterx@redhat.com> <20231116012908.392077-4-peterx@redhat.com> <20231123095304.GD636165@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231123095304.GD636165@kernel.org> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 23 Nov 2023 07:29:16 -0800 (PST) On Thu, Nov 23, 2023 at 11:53:04AM +0200, Mike Rapoport wrote: > On Wed, Nov 22, 2023 at 11:23:57PM -0800, Christoph Hellwig wrote: > > No way to export macros :) > > > > I'd say define, but other might have better ideas. > > Make HPAGE_PXD_* macros visible even if !THP Sounds good, thanks both! Besides, I do plan to introduce a new macro in the next version to mean "THP || HUGETLB", so as to put PxD code segments into it and not compile when unnecessary (!THP && !HUGETLB). Currently what I had is: config PGTABLE_HAS_HUGE_LEAVES def_bool TRANSPARENT_HUGEPAGE || HUGETLB_PAGE I didn't use something like CONFIG_HUGE_PAGE because it's too close to HUGETLB_PAGE, even if generic and short enough. Please speak if there's any early comments on that, either the name or the format. For example, I can also define it in e.g. mm/internal.h, instead of a config entry. -- Peter Xu