Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6359944rdb; Mon, 1 Jan 2024 21:37:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IEvSVGTFP6a/R/hqkh7TgdN+fIWcESOZox8DD6wuBJYWqMAawaJyAHN+ufvCr9sVcWbqRg/ X-Received: by 2002:a2e:a23b:0:b0:2cc:d442:5dda with SMTP id i27-20020a2ea23b000000b002ccd4425ddamr2191558ljm.180.1704173870082; Mon, 01 Jan 2024 21:37:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704173870; cv=none; d=google.com; s=arc-20160816; b=SdHQtupe0e0yLd40GBq6tXQzU6B2d8In3CRiqzv+sqCplURIO/5pKDflCGgjDiJts5 Go5YnWV5oVTAwPT6jW0deS101DFNo0Sth2hwl/GG6pFLaNLf3e6qyqQNKBJ62WrAHcha KCk6GBnvDE6vPd9THxy2Y6JWJ0rlivbhCoPPEOSYX1AK36FvIMX+B6fwWMmU7Ont2TyY bDJpJV1jkAa2sYIi4RON7E+UDw1uNHOM4ZqUpeC0jQ1TflbGzqDv0s5E4WmvlFkMaY/t R257QQWEHxq9hKeptxsQV1x6rOWNCAP7wczXXho4LK0r1z+LVJQr2xl1bKrHZSe+2/O5 lw7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=eCnGZSmn0Xbft/VvC3w27VmkfIRRQMc7XVfvoJNmfHo=; fh=dXQs+wNr79kEC9UFF/iKgB+L9Z/tsJdNNjhlq1yxFlE=; b=mTxuSX7fXzgc7qph5FiR1mwVVTJzQm1B9oZEXyFOxknPzeviwyMdjk5D+L3nZriKqN TOO1g2dwvsv3GO6yFDgTg1L9MlQ5cob13np3OIHcchuXuNwE0wJYIUBwDf8f3PV8+a6q GnNm5JYJAi1ndLcdioKjOIMOTjJnzbBryWWC51Ot0pYq0ySGdwHmZkxF5ED2ou8SN64Z Ghi9147WHCk1DhcyMYhl65CGnbdjm1FbtSJ/uGWMiq2f7xWP0QIwB7/3OyggCutBvE42 Ybo80G856B8041KpLzQYmNO9xN76lzIIgyPl6HgX9iQLk30DaHEjrRuO0DKe+fFaOOdd StmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Dq8FNNmO; spf=pass (google.com: domain of linux-kernel+bounces-14055-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14055-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id y16-20020a056402359000b005549157eb2asi8623759edc.585.2024.01.01.21.37.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jan 2024 21:37:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-14055-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Dq8FNNmO; spf=pass (google.com: domain of linux-kernel+bounces-14055-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14055-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id CF44B1F21AA3 for ; Tue, 2 Jan 2024 05:37:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AD5382918; Tue, 2 Jan 2024 05:37:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Dq8FNNmO" X-Original-To: linux-kernel@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 491812574 for ; Tue, 2 Jan 2024 05:37:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704173858; 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=eCnGZSmn0Xbft/VvC3w27VmkfIRRQMc7XVfvoJNmfHo=; b=Dq8FNNmOnV48ZkdI9nIP8ZaEECWQWJJPsSsTjcWCFWAYYdRYbtMlGXp4tHUWi+FhbqWx1k z+n24TLq8OyU160IYIOqiYNJgGoPJoFQlfZaLmqa9Gx2MA4kex5l7z925JNvprPY7rzCh/ nEJNSBM00vBlK2S4GPoZOZXHVhYglx8= Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-543-NyMTX97DNN2BYlz5lYB9pw-1; Tue, 02 Jan 2024 00:37:32 -0500 X-MC-Unique: NyMTX97DNN2BYlz5lYB9pw-1 Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-28bea0ff98cso2090990a91.0 for ; Mon, 01 Jan 2024 21:37:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704173851; x=1704778651; 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=eCnGZSmn0Xbft/VvC3w27VmkfIRRQMc7XVfvoJNmfHo=; b=QzIM+EbVM3sAITPT5RCb2V/EiX4fFIZoB44V4IW6s21rJ8YpYbIyTy0g/905h7x0/R LmPFuEnohH6ZpafJDJyTdRch0AulC3D6w2V6fBq65dA1io8J8IUpjnwG2tQQpf3FLlSm ix9OW9Ljx55O1EpgCTLvcHoPmK0Stxq3tjnVKVJnXoTHnIxLiJ3Lpk/9reYLz5+vDcWa dgCUrr1t1vK7plDDwtkgA5iBkNKcBVQJs1UsE7vl/YGD0xeG+/IGWaMXTFANyv+kQfeP gxhfPcP79P10fDf05fBVBlpL83y15ThyCXwBsh13SMo1qKJwC/XYAHw9QpXtSwJE3ulk o10Q== X-Gm-Message-State: AOJu0YxAoMhd50VN2JXgLNfnfXY3lpRhCZz9KeBxIJCdiml9w0R1JRFf AkpKMlaUDPV0JSBvpPQECmJjs6kOtoe13933oMFtwz4EoSg44IvV1gnSWPRgzgBOFts0o657Vok 9I6Rb62ww6cKyV9QzF6k5c8nthPxCWw2r X-Received: by 2002:a17:902:ce86:b0:1d3:eecd:b296 with SMTP id f6-20020a170902ce8600b001d3eecdb296mr33590830plg.6.1704173851407; Mon, 01 Jan 2024 21:37:31 -0800 (PST) X-Received: by 2002:a17:902:ce86:b0:1d3:eecd:b296 with SMTP id f6-20020a170902ce8600b001d3eecdb296mr33590810plg.6.1704173851161; Mon, 01 Jan 2024 21:37:31 -0800 (PST) Received: from x1n ([43.228.180.230]) by smtp.gmail.com with ESMTPSA id v4-20020a17090331c400b001d49c0daf60sm6900347ple.265.2024.01.01.21.37.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jan 2024 21:37:30 -0800 (PST) Date: Tue, 2 Jan 2024 13:37:14 +0800 From: Peter Xu To: Muchun Song Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Matthew Wilcox , Christophe Leroy , Lorenzo Stoakes , David Hildenbrand , Vlastimil Babka , Mike Kravetz , Mike Rapoport , Christoph Hellwig , John Hubbard , Andrew Jones , linux-arm-kernel@lists.infradead.org, Michael Ellerman , "Kirill A . Shutemov" , linuxppc-dev@lists.ozlabs.org, Rik van Riel , linux-riscv@lists.infradead.org, Yang Shi , James Houghton , "Aneesh Kumar K . V" , Andrew Morton , Jason Gunthorpe , Andrea Arcangeli , Axel Rasmussen Subject: Re: [PATCH 03/13] mm: Provide generic pmd_thp_or_huge() Message-ID: References: <20231219075538.414708-1-peterx@redhat.com> <20231219075538.414708-4-peterx@redhat.com> <135b3189-f459-4b57-9861-bb8acb999d91@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <135b3189-f459-4b57-9861-bb8acb999d91@linux.dev> On Mon, Dec 25, 2023 at 02:29:53PM +0800, Muchun Song wrote: > > @@ -1355,6 +1355,10 @@ static inline int pmd_write(pmd_t pmd) > > #endif /* pmd_write */ > > #endif /* CONFIG_TRANSPARENT_HUGEPAGE */ > > +#ifndef pmd_thp_or_huge > > I think it may be the time to rename to pmd_thp_or_hugetlb, > the "huge" is really confusing. thp is not huge? Actually, > it is huge. It is better to make it more specific from now on, like > "hugetlb". The rename will need to touch ARM code, which I wanted to avoid, see: arch/arm64/include/asm/pgtable.h:#define pmd_thp_or_huge(pmd) (pmd_huge(pmd) || pmd_trans_huge(pmd)) So far this series only touches generic code. Would you mind I keep this patch as-is, and leave renaming to later? > > BTW, please cc me via the new email (muchun.song@linux.dev) next edition. Sure. Thanks for taking a look. -- Peter Xu