From: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
To: "Liam R. Howlett" <Liam.Howlett@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>,
Jonathan Corbet <corbet@lwn.net>,
Vlastimil Babka <vbabka@suse.cz>, Jann Horn <jannh@google.com>,
Alice Ryhl <aliceryhl@google.com>,
Boqun Feng <boqun.feng@gmail.com>,
Matthew Wilcox <willy@infradead.org>,
Mike Rapoport <rppt@kernel.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org, Suren Baghdasaryan <surenb@google.com>,
Hillf Danton <hdanton@sina.com>,
Qi Zheng <zhengqi.arch@bytedance.com>,
SeongJae Park <sj@kernel.org>,
Bagas Sanjaya <bagasdotme@gmail.com>
Subject: Re: [PATCH v2] docs/mm: add VMA locks documentation
Date: Thu, 14 Nov 2024 20:45:38 +0000 [thread overview]
Message-ID: <77ebb384-cfeb-4b13-aaad-c9a6b398fecd@lucifer.local> (raw)
In-Reply-To: <le3ykvrau2lbncrjsqll7z6ck43bf3shon4g5ohchxcvcs4fuy@h3pq646xgoz6>
On Tue, Nov 12, 2024 at 10:15:44AM -0500, Liam R. Howlett wrote:
> * Lorenzo Stoakes <lorenzo.stoakes@oracle.com> [241108 08:57]:
> > +VMA locks are special in that you must obtain an mmap **write** lock **first**
> > +in order to obtain a VMA **write** lock. A VMA **read** lock however can be
> > +obtained without any other lock (:c:func:`!lock_vma_under_rcu` will acquire then
> > +release an RCU lock to lookup the VMA for you).
>
> This reduces the impact of a writer on readers by only impacting
> conflicting areas of the vma tree.
Sorry I totally missed this last time round, will add a note.
> > + ================================= ===================== ======================================== ===============
> > + Field Configuration option Description Write lock
> > + ================================= ===================== ======================================== ===============
> > + :c:member:`!anon_name` CONFIG_ANON_VMA_NAME A field for storing a mmap write,
> > + :c:struct:`!struct anon_vma_name` VMA write.
> > + object providing a name for anonymous
> > + mappings, or :c:macro:`!NULL` if none
> > + is set or the VMA is file-backed.
>
> These are ref counted and can be shared by more than one vma for
> scalability.
>
> > + :c:member:`!swap_readahead_info` CONFIG_SWAP Metadata used by the swap mechanism mmap read,
> > + to perform readahead. This field is swap-specific
> > + accessed atomically. lock.
> > + :c:member:`!vm_policy` CONFIG_NUMA :c:type:`!mempolicy` object which mmap write,
> > + describes the NUMA behaviour of the VMA write.
> > + VMA.
>
> These are also ref counted for scalability.
I think actually on second thoughts I will add notes about this in v3, as it at
least gives a bit more context.
next prev parent reply other threads:[~2024-11-14 20:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-08 13:57 Lorenzo Stoakes
2024-11-09 16:01 ` Lorenzo Stoakes
2024-11-11 7:33 ` Mike Rapoport
2024-11-11 8:39 ` Qi Zheng
2024-11-12 5:39 ` Bagas Sanjaya
2024-11-12 15:15 ` Liam R. Howlett
2024-11-13 15:44 ` Lorenzo Stoakes
2024-11-13 17:43 ` Jann Horn
2024-11-14 20:45 ` Lorenzo Stoakes [this message]
2024-11-13 19:46 ` Jann Horn
2024-11-14 20:23 ` Lorenzo Stoakes
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=77ebb384-cfeb-4b13-aaad-c9a6b398fecd@lucifer.local \
--to=lorenzo.stoakes@oracle.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=aliceryhl@google.com \
--cc=bagasdotme@gmail.com \
--cc=boqun.feng@gmail.com \
--cc=corbet@lwn.net \
--cc=hdanton@sina.com \
--cc=jannh@google.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rppt@kernel.org \
--cc=sj@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
--cc=zhengqi.arch@bytedance.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox