Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp401773lqg; Thu, 11 Apr 2024 06:38:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUuCBHv5swXAZTIUqxI5aZSvPXBetHcdrxYpbow7Dzai6rObZmXEawLc5SoLbPuVdIJ+S8ShM1XZK6CIkzrApkv8iZRzIxhaspFEeo3bA== X-Google-Smtp-Source: AGHT+IGHrVbGZsTSEzCeVRy6QC9xnneUmSFnSnSBYdsZP4J5kdhqSbMXKDymIZ37LLYmGvuG2/Qu X-Received: by 2002:a17:902:d501:b0:1e3:de79:35d1 with SMTP id b1-20020a170902d50100b001e3de7935d1mr6502412plg.23.1712842680889; Thu, 11 Apr 2024 06:38:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712842680; cv=pass; d=google.com; s=arc-20160816; b=gd4ujDGpAD5IBdlpiVrjgFa5HaJzQSZ2XEqpfdF9oN1t7w+4I1pcVGJlxZ7pSf6cUm qWJhq3G/rZyt9IyHJ06R4OAuc9qIhzGPGcy11D/JyFPh51L46tpnzrS7ChBHiuOsF/un poxuIorOFqJ9g0+vLsHyAgfeIY1bZoQPs4Jf7fzScDSvjCSxaVTKHs5/uw2pPomZVcar Ifpog3M3qWAJfma3g6hYwzIbma0DMklUdPstXAGi+c5Z7l0XqmLfKgTZrco8mIiovdPQ fQyky4FkstOm7RR2eUHDmtECyO6iyd6/h8WFqzRRdxQ3Z/9pItE18VV/AXx/5yDm50bd iYZg== ARC-Message-Signature: i=2; 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=dERZePAMGY5Ogff4MXaSm74/ezvcT6trwfEdO0OfoQE=; fh=UYQGc6gZ0TetpRHc2w5mhzYJEnzxCvQZKtV2OBYFp5s=; b=zU5ieK2LdLPBWKHov5ef7LmFRTJGBy04X1KlGfF2Sz5MzVsy7li2KEQh9DWV7lADLh 8ejS6tyNO5d2BAuRQdWLQBx9ea5cO5J8ALzFHx5yv+8DjjGphaJ+d/vkMX+1KVMAbEho 36QjfISiZsob8hDTcEuR826xw4suriVYpFKRiIIw3TqeLPNxOqPjHFY21zqrLwoWHraW qGohQy+wPnJtxIcXF7vTDSfDjI3iexRK7t6HBpUvFwqUf8wksHgHn/8hU5VUXgycUspH oG4+2xDXHpJI1gGtRuotPr6UeXYO8SMdb8Kn839KEGmta3HTv95yo5+dYKeAUsn1hLvN WtAQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VdZr9owC; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-ext4+bounces-2032-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2032-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id g5-20020a170902f74500b001e2a3ff7b93si1318839plw.111.2024.04.11.06.38.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 06:38:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-2032-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VdZr9owC; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-ext4+bounces-2032-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2032-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 7EE77284903 for ; Thu, 11 Apr 2024 13:37:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D76F214D431; Thu, 11 Apr 2024 13:37:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="VdZr9owC" X-Original-To: linux-ext4@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 159B814D29C for ; Thu, 11 Apr 2024 13:37:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712842661; cv=none; b=l2yUvHzyDE1JvCDZ5HTICM41GczjmRihVeLrWoaGOmTvSbCYFUwDCkK0l0b8t36ovR8aBicSF1NglmzafJ+Ft7G3Dc37CVReZBmlaJEzv9qlUKhYINm10YKdECAiPe2KkTwE7H+E6yUDhxpaDuBj1FJLPskjb+It4Sb0UkGZGRI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712842661; c=relaxed/simple; bh=DIAb7MBg/O79YuapLR2aNqATub3e0SOKNJsfHZ2b5E8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tTrMnb5FRXtm94UsYKE2a8d1FoXg79n7KZoifr0F8nvtw+3zYA0EcJyc9bjfDYyY+i49jjG706IdyLcwBz61MmdiuoQ8JZRcbyLkGkVY7Fen9DQ3nQYux8lPZyWdXqDZgIIHPch5IRCuDbfpFmynlZhW2PeNof9qK7ouYceII34= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=VdZr9owC; arc=none smtp.client-ip=170.10.129.124 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=1712842659; 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=dERZePAMGY5Ogff4MXaSm74/ezvcT6trwfEdO0OfoQE=; b=VdZr9owC+8APMHB3glMhT0+GoERpECKD3T8BC9YDTW+BJl57CNFRMO+ue4QDnRUrcWeMuZ ogOpAwkR6EDGfNM1AaYWrlhS90kr1hA+0RbvzexO8WZ5a6XXzWvfDiYselGKQlpYveZ3Bg Yatf18y1hEBa8VAULB2o0YbXavYuV0k= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-515-xbC2Ob5TMJ2u1w8JoC5gLg-1; Thu, 11 Apr 2024 09:37:37 -0400 X-MC-Unique: xbC2Ob5TMJ2u1w8JoC5gLg-1 Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-434ed2e412fso11561831cf.0 for ; Thu, 11 Apr 2024 06:37:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712842657; x=1713447457; 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=dERZePAMGY5Ogff4MXaSm74/ezvcT6trwfEdO0OfoQE=; b=LOIxNU1/aFRYnw8mVMSinbxeLBaHTY+x0HbJr2Mn9207a5n9XS3xjl56E88zEktYQ2 hxQOGq9rfIbrtGxVuCk94l8EGq2bPQd9o4eeVKS8Rq9hkj5d2/nPV6Qt2Ma8SMH9/Fu9 6lqlNTT80vhoqA2/UGTLicQmZgaaU2nfVlJWSTNTrjnqpaHsmc6vbwR2/amRuyGdi9p4 3ZE6MwFaiten2j8XoaSBnHLG3ufNBfe0ShS0nvoUpBw99YrDsfynjKJyNC4vSM0O0d1R I0BGZNOT/COCqg9YNSxRpSKBcU4KmKjtHhIajEatIkvd2KTCYcM2GxqBL9LgIJMaEjtS b13A== X-Forwarded-Encrypted: i=1; AJvYcCUGI/6//0TNwzq3OD1n/QQCtOlBfrDaUpeOPJLUHVpBW4xkcVyQs8+ut0wDl/uA8bjYxtXxtaJw+tqnRjgy5AmQq7iFbtI+H2GLhQ== X-Gm-Message-State: AOJu0YyAJd5KbDOh+f+QqPPEePZLSLavGNr0W9evV+/WEEPdiDu0Lh9p BwjBR/vul6OJeIAsY9fFqXT8SFmk83K3EdDu3rlg26aECDtY6q9/yTIGmVaHvVJ9pOpb8l5MNM0 aSXRGWnDg+jr2JP6R25qgw0b+bheX0RTPUENfEfHNd+xKWgYuyFm9pwwh5SA= X-Received: by 2002:a05:6214:da1:b0:69b:1833:598e with SMTP id h1-20020a0562140da100b0069b1833598emr6052237qvh.6.1712842656864; Thu, 11 Apr 2024 06:37:36 -0700 (PDT) X-Received: by 2002:a05:6214:da1:b0:69b:1833:598e with SMTP id h1-20020a0562140da100b0069b1833598emr6052197qvh.6.1712842656337; Thu, 11 Apr 2024 06:37:36 -0700 (PDT) Received: from x1n (pool-99-254-121-117.cpe.net.cable.rogers.com. [99.254.121.117]) by smtp.gmail.com with ESMTPSA id e7-20020a0cf747000000b0069943d0e5a3sm946973qvo.93.2024.04.11.06.37.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 06:37:35 -0700 (PDT) Date: Thu, 11 Apr 2024 09:37:33 -0400 From: Peter Xu To: Jason Gunthorpe Cc: Alistair Popple , linux-mm@kvack.org, david@fromorbit.com, dan.j.williams@intel.com, jhubbard@nvidia.com, rcampbell@nvidia.com, willy@infradead.org, linux-fsdevel@vger.kernel.org, jack@suse.cz, djwong@kernel.org, hch@lst.de, david@redhat.com, ruansy.fnst@fujitsu.com, nvdimm@lists.linux.dev, linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, jglisse@redhat.com Subject: Re: [RFC 02/10] mm/hmm: Remove dead check for HugeTLB and FS DAX Message-ID: References: <20240411122530.GQ5383@nvidia.com> Precedence: bulk X-Mailing-List: linux-ext4@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: <20240411122530.GQ5383@nvidia.com> On Thu, Apr 11, 2024 at 09:25:30AM -0300, Jason Gunthorpe wrote: > On Thu, Apr 11, 2024 at 10:57:23AM +1000, Alistair Popple wrote: > > pud_huge() returns true only for a HugeTLB page. pud_devmap() is only > > used by FS DAX pages. These two things are mutually exclusive so this > > code is dead code and can be removed. > > I'm not sure this is true.. pud_huge() is mostly a misspelling of pud_leaf().. > > > - if (pud_huge(pud) && pud_devmap(pud)) { > > I suspect this should be written as: > > if (pud_leaf(pud) && pud_devmap(pud)) { > > In line with Peter's work here: > > https://lore.kernel.org/linux-mm/20240321220802.679544-1-peterx@redhat.com/ Just to provide more information for Alistair, this patch already switched that over to a _leaf(): https://lore.kernel.org/r/20240318200404.448346-12-peterx@redhat.com That's in mm-unstable now, so should see that in a rebase. And btw it's great to see that pxx_devmap() can go away. Thanks, -- Peter Xu