From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A02AF3B442F for ; Thu, 30 Jul 2026 06:39:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785393573; cv=none; b=JATdFZSggQymI35FMkMHIToCpzcDPIWAhbca46YMehFFRoWr3sAkKqunFvaTDOipqkfQ8euEw4CtQK54gu3hkqus2jtH3bB+/MJvnvB7wuOwH/P09IXAyks6G/iwaYv8bnKl1Dvp/b4zbCjekaTgyQsc1BQefmIhxQaCM5CeS3w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785393573; c=relaxed/simple; bh=WncTQphxVp0l2Tk7Aew9QDDKQTVA3eE7asUk3yooeoU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GhodS33WWbUeHD53gu5mf1FKjEkfjfOgXNLFBnhYF62QtDBLRv9Ltq+J6VLyqkyk6SKBs8eEa7bdygQHglC6zmBrj+mwgOjpTELpWEG3RdeWMldZfDtKPVvkv5g4YzToSvSMBKUvrTvZXEsJoXMYtpzOsd2DVmQgCnA+gtXx3DU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net; spf=pass smtp.mailfrom=gourry.net; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b=r9Bnawsg; arc=none smtp.client-ip=209.85.222.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gourry.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b="r9Bnawsg" Received: by mail-qk1-f173.google.com with SMTP id af79cd13be357-9309d4ea213so153002585a.1 for ; Wed, 29 Jul 2026 23:39:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1785393570; x=1785998370; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=kOg1TP69pkfX9jACUFVlU927ii/AFS16vNDFEmK7SsI=; b=r9BnawsghlDcat/pe84AtaXEUH943VqDqoT86wpPLtvduovJvTkepYIApcK1kcS8dm Vsbr2HII615RJDo632lNp0VVIk4jIsyUPPLcjZ8G4kf7MUiscXwqTTMMwLZfyFdC/QnN f70GImoBQnn4kdpfMeSMKIUTaVJIokZFnAWahC3B01mdSflxvyXXndmWwaULOUhz0m3q tPZTXKH1pcBVfEDmSEhiq8AuTzB3paxBpAsg8AYTUEfIz9cdRVb8d9Zl+BpjDqEH0Bo9 nLEdgyH+WPJoX/9Jvq4uTgVa8DmfohQOLZK2BWsHLPOhSI6MWT2TSx+G8e8h2lnHSk9K fJPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785393570; x=1785998370; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=kOg1TP69pkfX9jACUFVlU927ii/AFS16vNDFEmK7SsI=; b=EwhdKMDuU86QfBcvCMEux8n1yiNgLHbTM/Xgj72JPcYYCGkPj5Y1Dd30fcvvZgIv0t 0mNuXTWHfC2YXaj0wVJYeH9wtcM5slmTskyGUgfY2UjoUMjiyVdnwheHQolaAxHYNWx6 v9fcBGDs1hOzkeZVC0VChMsjIZ9NgNrJAZAjWluh74ooHS1/1orByB/N4HbA/sCRscEg dUKz3zz9yM36P8CjA6C41kXIKqLwN4qjyqkK4hTIgeEauPbOPbhtkqi+NmM9agPzBm+6 FJKhLBAyroJhfg6lx6NWXjqlqFjrPAsIAjXGAZ4wgJKEfGBVXrRgnVl8eGQt5TkXVD9P nReg== X-Forwarded-Encrypted: i=1; AHgh+RoARq4iHTs+s9BkBpzFoAkP7LRnvayaXuJeDehdEr3Kbp4F3CAh1Fguxh0c1Yn1twXXPk34zFF5KY+Zu5g=@vger.kernel.org X-Gm-Message-State: AOJu0YzZKSEuX83cs815r2d2LwbkGORBfvMkQvIn17wVmhok1b8ClBXL lpW2z8PxI6R1ipw4QIpDYHg6oDhXaCPEIBnt8nm7yHNDljMdbB8fO/CJKlNVWKZPdK0= X-Gm-Gg: AR+sD11+8OtdKHUFN2fnupaH27LJvC2DBaEknmshK3KF1fCYOdYaweDFE4IRjWoccSv J269Ug4ZnDDbGGLGQSFuRxzUnXkNkvkw+Y15J9ng51RLBjwGI8x8G4uGNkVoJjlj6aJi7w6jr+v 01bidDbXlSlmlGrGZBxd3wUuxRI41gBjhXnjkoR2SQmGjjEQJlCFpwzzTVjNWe+Zyf9mjP23ANB i2LAxSnMJ4CIX6wvlfwaY/gSzNGRBsQrSjxlXcVlcZDBDX28x7QulW3d5qeWxt6EAmakYAjYBxa p7pOfyofyypNk5Wfdlv9r81c4xUTo2jUUWPYlX/So+gpQTxc5e5wZTmf5sz9I1ae7/yoU+t9Wpc Wqpuy/Y0taCiXocPNcStWd3V50lvXNWOiIkFj7Zt5iuSuHO246NKTfRjr/WqoKFQBR0/ujbssYm 5Ku5ITXwGf6nnz4TRuf3U9tNb4iGJdkcWprT4DHotQ66clAfutJq6NWfXjxHf6yWAFFIene+BEf qzum1IhqNG0vh8HxpIDwTt67zFjqjysI06JW2iUMSk4 X-Received: by 2002:a05:620a:72c5:10b0:930:ea99:8097 with SMTP id af79cd13be357-93486cf8599mr88361385a.61.1785393570464; Wed, 29 Jul 2026 23:39:30 -0700 (PDT) Received: from gourry-fedora-PF4VCD3F (pool-173-79-60-52.washdc.fios.verizon.net. [173.79.60.52]) by smtp.gmail.com with ESMTPSA id af79cd13be357-933d3221c71sm356647085a.2.2026.07.29.23.39.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Jul 2026 23:39:29 -0700 (PDT) Date: Thu, 30 Jul 2026 02:39:27 -0400 From: Gregory Price To: "Lorenzo Stoakes (ARM)" Cc: Andrew Morton , David Hildenbrand , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Jann Horn , Pedro Falcato , "Matthew Wilcox (Oracle)" , Jan Kara , Miaohe Lin , Naoya Horiguchi , Rik van Riel , Harry Yoo , Lance Yang , Kees Cook , Zi Yan , Baolin Wang , Nico Pache , Ryan Roberts , Dev Jain , Barry Song , Usama Arif , Matthew Brost , Joshua Hahn , Rakie Kim , Byungchul Park , Ying Huang , Alistair Popple , Peter Xu , Xu Xin , Chengming Zhou , Arnd Bergmann , Greg Kroah-Hartman , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v3 03/15] mm: abstract vma_address() and introduce vma_anon_address() Message-ID: References: <20260729-b4-scalable-cow-virt-pgoff-v3-0-e8ecfefea812@kernel.org> <20260729-b4-scalable-cow-virt-pgoff-v3-3-e8ecfefea812@kernel.org> 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-Disposition: inline In-Reply-To: On Thu, Jul 30, 2026 at 12:58:22AM -0400, Gregory Price wrote: > On Wed, Jul 29, 2026 at 05:48:38PM +0100, Lorenzo Stoakes (ARM) wrote: > > > > This will be necessary for determining the address of a folio's index > > within a VMA when the folio belongs to a MAP_PRIVATE file-backed VMA but > > has been CoW'd, and thus is anonymous, once the anonymous VMA page offset > > field is used for the reverse mapping. > > > > This is a doozy of a sentence... > > ... determines the address of a folio's index within a VMA when > - the folio belongs to a MAP_PRIVATE file-backed VMA, but > - has been cow'd > - thus is anonymous (as well) > - The original VMA may or may not also be marked anonymous? > (just clarifying, could be original mapper or a COW that COWs) > > Ow, my brain. One question below > After re-reading the cover-letter again - my note here is wrong and my brain hurts more. ... determines the address of a folio's index within a VMA when - the folio belongs to a MAP_PRIVATE file-backed VMA, but - has been CoW'd - thus is anonymous - The original folio may or may not have been anonymous (depending on whether it, itself, was a CoW copy) Lorenzo you are truly doing Darwin's work untangling all of this. ~Gregory