All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>,
	 David Hildenbrand <david@kernel.org>,
	"Liam R. Howlett" <liam@infradead.org>,
	 Vlastimil Babka <vbabka@kernel.org>,
	Mike Rapoport <rppt@kernel.org>,
	 Suren Baghdasaryan <surenb@google.com>,
	Michal Hocko <mhocko@suse.com>, Jann Horn <jannh@google.com>,
	 Pedro Falcato <pfalcato@suse.de>,
	"Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 02/16] mm: provide vma_[flags_]is_cow_mapping() and remove is_cow_mapping()
Date: Thu, 20 Aug 2026 13:41:17 +0100	[thread overview]
Message-ID: <aob1goSSPH6sTN9y@gremlin> (raw)
In-Reply-To: <20260813-b4-scalable-cow-virt-pgoff-v5-2-c21581c0c3c8@kernel.org>

(trim cc-list)

On Thu, Aug 13, 2026 at 06:32:19PM +0100, Lorenzo Stoakes (ARM) wrote:
...
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index df78847f5f07..199d0a64b14a 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -2271,17 +2271,76 @@ void unpin_user_pages(struct page **pages, unsigned long npages);
>  void unpin_user_folio(struct folio *folio, unsigned long npages);
>  void unpin_folios(struct folio **folios, unsigned long nfolios);
>
...
> +/**
> + * vma_is_cow_mapping() - Is this VMA a CoW mapping?
> + * @desc: The VMA to check.

Andrew - a small typo here, this should be @vma not @desc, are you still to fix
this in place? If not can always send a fixup patch next cycle :))

(Credit to David's scripts for finding this! :)

> + *
> + * See vma_flags_is_cow_mapping() for details.
> + *
> + * Returns: true if the VMA is a CoW mapping, otherwise false.
> + */
> +static inline bool vma_is_cow_mapping(const struct vm_area_struct *vma)
>  {
> -	return (flags & (VM_SHARED | VM_MAYWRITE)) == VM_MAYWRITE;
> +	return vma_flags_is_cow_mapping(&vma->flags);
>  }
>


--
Cheers, Lorenzo


  reply	other threads:[~2026-08-20 12:41 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-13 17:32 [PATCH v5 00/16] mm/rmap: index MAP_PRIVATE file-backed folios by anonymous pgoff Lorenzo Stoakes (ARM)
2026-08-13 17:32 ` [PATCH v5 01/16] mm/vma: introduce VMA anon page offset field and add helpers Lorenzo Stoakes (ARM)
2026-08-13 17:32 ` [PATCH v5 02/16] mm: provide vma_[flags_]is_cow_mapping() and remove is_cow_mapping() Lorenzo Stoakes (ARM)
2026-08-20 12:41   ` Lorenzo Stoakes (ARM) [this message]
2026-08-13 17:32 ` [PATCH v5 03/16] mm: introduce linear_anon_page_index() Lorenzo Stoakes (ARM)
2026-08-13 17:32 ` [PATCH v5 04/16] mm: abstract vma_address() and introduce vma_anon_address() Lorenzo Stoakes (ARM)
2026-08-13 17:32 ` [PATCH v5 05/16] mm: update print_bad_page_map() to show anon index if appropriate Lorenzo Stoakes (ARM)
2026-08-13 17:32 ` [PATCH v5 06/16] mm: introduce and use vma_filebacked_address() Lorenzo Stoakes (ARM)
2026-08-13 17:32 ` [PATCH v5 07/16] mm/vma: fix self-merge check in copy_vma() Lorenzo Stoakes (ARM)
2026-08-13 17:32 ` [PATCH v5 08/16] tools/testing/vma: add tests for copy_vma() self-merge Lorenzo Stoakes (ARM)
2026-08-13 17:32 ` [PATCH v5 09/16] mm: propagate VMA anonymous page offset on map, remap, split + merge Lorenzo Stoakes (ARM)
2026-08-13 17:32 ` [PATCH v5 10/16] mm/rmap: track whether the page VMA mapped pgoff is anonymous Lorenzo Stoakes (ARM)
2026-08-13 17:32 ` [PATCH v5 11/16] mm: clean up vma_address_end() Lorenzo Stoakes (ARM)
2026-08-13 17:32 ` [PATCH v5 12/16] mm/huge_memory: update remove_migration_pmd() to accept a folio Lorenzo Stoakes (ARM)
2026-08-13 17:32 ` [PATCH v5 13/16] mm/migrate: calculate large folio page index using PFN Lorenzo Stoakes (ARM)
2026-08-13 17:32 ` [PATCH v5 14/16] mm/rmap: use anon pgoff to track MAP_PRIVATE file-backed anon folios Lorenzo Stoakes (ARM)
2026-08-13 17:32 ` [PATCH v5 15/16] tools/testing/vma: expand VMA merge tests to assert anon pgoff Lorenzo Stoakes (ARM)
2026-08-13 17:32 ` [PATCH v5 16/16] tools/testing/selftests/mm: test anonymous page offset merge behaviour Lorenzo Stoakes (ARM)
2026-08-13 18:53 ` [PATCH v5 00/16] mm/rmap: index MAP_PRIVATE file-backed folios by anonymous pgoff Andrew Morton
2026-08-14  9:01   ` Lorenzo Stoakes (ARM)
2026-08-14  9:13     ` Matthew Brost
2026-08-14  9:29       ` fixing sashiko failure to apply (was Re: [PATCH v5 00/16] mm/rmap: index MAP_PRIVATE file-backed folios by anonymous pgoff) Lorenzo Stoakes (ARM)
2026-08-14 13:53         ` Roman Gushchin
2026-08-14 16:44           ` Lorenzo Stoakes (ARM)
2026-08-15  2:19             ` Zi Yan
2026-08-17 16:47               ` Lorenzo Stoakes (ARM)
2026-08-14  9:18     ` [PATCH v5 00/16] mm/rmap: index MAP_PRIVATE file-backed folios by anonymous pgoff Mike Rapoport
2026-08-14  9:23       ` Lorenzo Stoakes (ARM)
2026-08-14  9:45         ` Mike Rapoport

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aob1goSSPH6sTN9y@gremlin \
    --to=ljs@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=jannh@google.com \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=pfalcato@suse.de \
    --cc=rppt@kernel.org \
    --cc=surenb@google.com \
    --cc=vbabka@kernel.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.