Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp532865lqp; Tue, 11 Jun 2024 11:22:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXAn7XNJ+2KzwORLtWF7r4KCIpo6JaIyLaoG9HJvnjUUTabf1gJoihS5Rwo4dZT/lVxYkC1uxxFD3JKUVoNAVunu7xqKhJBnI3Jy/QFFg== X-Google-Smtp-Source: AGHT+IHjt0uovwi3BebRvm2a7TswvAzRZpEakFDdR1f1LIs2ml/WlS4wv9FAzSZmtJiuTYumPR8W X-Received: by 2002:a17:90b:4b10:b0:2c2:fa5e:106a with SMTP id 98e67ed59e1d1-2c2fa5e1251mr7176296a91.48.1718130176659; Tue, 11 Jun 2024 11:22:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718130176; cv=pass; d=google.com; s=arc-20160816; b=jtXi/5QedJrXK02qSl1oiStm7naJWh/hQN0aHfMYCKPUlHXgIZykdtU/UGMW/nr4qJ zfMZYedyFUt6Rhxit4Yqqz76TCWzNM7B6SkvKTdP3IthveS48UhIKlUSMvtiSVRxMiXA 8L0yjsx7M/mXFI3aKXpvpq67VvnoyzEyASfPSlQ0NfGl0cib2x3wLm0/Ey/GJTI10W6N mTxqjr3Oei1g3fuXzssJslQu24YebyI1acJsr3itkBbAijAo9kONEJY92cQUE9NABhCD VcRcS1Ie75ns1GUXF/RhZVKzbsguecSmlb9BluOOjtw5Z9Sciwgi8YS9DjsMU9FrMHWY P+Zg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=MAhz4eFiPNRDMB6DAKaTzVfPEz+W98/77me6fMCIxnE=; fh=L7GcWzDPu5Cpo8obrYbzXIh1Cu3Mr5BpxQpzLBpkYp4=; b=Rcp1FjiAW0jVu3J9+1cc8VT1QPDmJzpwSpAEbDy1nRDVGp+WeVRAz59lgFLnBFfHLt gOpPzA5lV1BnuSc4xo05okofUTb7N7xH6kgjR4tvnM+azTZI4XKI8Ozq5m3Gv6jIcBkx 5ybZNOnsUq5RZdsuDJMlc0x2OGUtjiMr6VulAyhywYcrcHOWHNNEiiHzth3LtAFGDNwd lbKxm7sOYOU5QF1tpS0jG1tu47lsExN4RucYbAA7z/E6ioAmw8i7TGhmTm8riLFI9psi VPoliEpJoTQI5EQDYSxGnU43Psz+dkg/CMpILHsbXazAIgL2sBF/M2guZQfSbDPPrgLk Bi4Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=BlNTob1J; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-210416-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210416-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6e8ed650eacsi5905210a12.764.2024.06.11.11.22.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 11:22:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210416-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=@linux-foundation.org header.s=korg header.b=BlNTob1J; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-210416-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210416-linux.lists.archive=gmail.com@vger.kernel.org" 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 3D457285BF5 for ; Tue, 11 Jun 2024 18:21:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8126A6EB55; Tue, 11 Jun 2024 18:21:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="BlNTob1J" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9DF74376E9 for ; Tue, 11 Jun 2024 18:21:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718130092; cv=none; b=ftBTvaL6FNbYJWjzpEldzRWrGsihSQIrhNAw5JOcFacZqd3CodjuhDONSvTQj6TYBfcJ7opMfYXnS9kTR3t6qtxYmeSz5V7L25rAAbcLvWpN5qkx2HGxgHi0mdTRjk0SrHbw5Tw/7Wjvs2nDkqp3d2H4gPsLZVrmFhECh6/oBt4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718130092; c=relaxed/simple; bh=IkeeZ4IP+hn989ZtzVm7fErRBzJnQu7C1x3BhsI6GKc=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=X1oicA/Oe3fDj0iO4yzxJ8aQpRRl0ETWyWXSQbL1G6XWIM5g/owYFvZtTvE4AjnWhV6y46EYklg5kSpuQruETbs5yfChdTMIIxqV7x4Z519ew4LtSzi3YBtDX49Dg0wb6ktP3tCPHjdJQqlUbuuNCKvsKxAioabmXHWCK41wF6M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=BlNTob1J; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B06C0C2BD10; Tue, 11 Jun 2024 18:21:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1718130091; bh=IkeeZ4IP+hn989ZtzVm7fErRBzJnQu7C1x3BhsI6GKc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=BlNTob1J/lh6sEaQcarMkth5pJXdUNvMvpAXR956QDl9Hddm0WQTfBbC7EQUos6Pw Ca2No0QrbKNf2IDtvcnHn4FIv8OqEb++geeQRTHTUZVkYhX+yllpAu2YFJjmMsdm7b g8NccKFLc+kKiWDh86dv33DsjU91FT1o3ftfLKDw= Date: Tue, 11 Jun 2024 11:21:31 -0700 From: Andrew Morton To: Matthew Wilcox Cc: Andrew Bresticker , David Hildenbrand , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] mm/memory: Don't require head page for do_set_pmd() Message-Id: <20240611112131.25925b8ee5198668b88de35f@linux-foundation.org> In-Reply-To: References: <20240611153216.2794513-1-abrestic@rivosinc.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 11 Jun 2024 19:03:29 +0100 Matthew Wilcox wrote: > On Tue, Jun 11, 2024 at 08:32:16AM -0700, Andrew Bresticker wrote: > > - if (page != &folio->page || folio_order(folio) != HPAGE_PMD_ORDER) > > + if (folio_order(folio) != HPAGE_PMD_ORDER) > > return ret; > > + page = &folio->page; > > This works today, but in about six months time it's going to be a pain. > > + page = folio_page(folio, 0); > > is the one which works today and in the future. I was wondering about that. hp2:/usr/src/25> fgrep "&folio->page" mm/*.c | wc -l 84 hp2:/usr/src/25> fgrep "folio_page(" mm/*.c | wc -l 35 Should these all be converted? What's the general rule here?