From: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
To: Jonathan Corbet <corbet@lwn.net>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Suren Baghdasaryan <surenb@google.com>,
"Liam R . Howlett" <Liam.Howlett@oracle.com>,
Vlastimil Babka <vbabka@suse.cz>,
Shakeel Butt <shakeel.butt@linux.dev>,
Jann Horn <jannh@google.com>,
Qi Zheng <zhengqi.arch@bytedance.com>,
linux-mm@kvack.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] docs/mm: expand vma doc to highlight pte freeing, non-vma traversal
Date: Tue, 3 Jun 2025 12:24:12 +0100 [thread overview]
Message-ID: <38bcf562-86dc-42b2-9ffc-53cbc5d8ac22@lucifer.local> (raw)
In-Reply-To: <9fc9ac50-abce-48bd-979f-2e00b26917b5@lucifer.local>
On Tue, Jun 03, 2025 at 11:56:37AM +0100, Lorenzo Stoakes wrote:
> On Mon, Jun 02, 2025 at 03:38:55PM -0600, Jonathan Corbet wrote:
> > Lorenzo Stoakes <lorenzo.stoakes@oracle.com> writes:
> >
> > > --- a/Documentation/mm/process_addrs.rst
> > > +++ b/Documentation/mm/process_addrs.rst
> > > @@ -303,7 +303,9 @@ There are four key operations typically performed on page tables:
> > > 1. **Traversing** page tables - Simply reading page tables in order to traverse
> > > them. This only requires that the VMA is kept stable, so a lock which
> > > establishes this suffices for traversal (there are also lockless variants
> > > - which eliminate even this requirement, such as :c:func:`!gup_fast`).
> > > + which eliminate even this requirement, such as :c:func:`!gup_fast`). There is
> > > + also a special case of page table traversal for non-VMA regions which we
> >
> > The "!gup_fast" caught my attention - I was unaware that Sphinx had such
> > a thing. Its purpose would be to appear to suppress the generation of the
> > link that turns the cross reference into a cross reference.
> >
> > The MM docs are full of these, do we know why?
>
> Removing it from the struct vm_area_struct struct immediately give:
>
> /home/lorenzo/kerndev/kernels/mm/Documentation/mm/process_addrs.rst:11: WARNING: Unparseable C cross-reference: 'struct vm_area_struct'
> Invalid C declaration: Expected identifier in nested name, got keyword: struct [error at 6]
> struct vm_area_struct
>
> And given C's weirdness with typing I really prefer to be explicit in
> referencing a struct vs. e.g. a typedef.
>
> At any rate I'm not sure it's all that useful to cross-reference these?
>
> Any such change would need to be a separate patch anyway or otherwise this
> becomes a 'add additional documentation and drop cross-refs'.
>
> >
> > I would recommend removing them unless there's some reason I don't see
> > for doing this. Also get rid of the :c:func: noise entirely - just
> > saying gup_fast() will do the right thing.
>
> Re: the c:func: stuff -
>
> Well, the right thing is making function + type names clearly discernable, and
> it just putting in the function name like that absolutely does not do the right
> thing in that respect.
>
> I feel strongly on this, as I've tried it both ways and it's a _really_ big
> difference in how readable the document is.
>
> I spent a lot of time trying to make it as readable as possible (given the
> complexity) so would really rather not do anything that would hurt that.
>
Somebody told me that in _other_ .rst's, seemingly, it does figure out xxx() ->
function and highlights it like this.
But for me, it does not... :)
In case that's something you assumed would happen here.
This is against me building locally with:
make SPHINXDIRS=mm htmldocs
> >
> > > +.. note:: Since v6.14 and commit 6375e95f381e ("mm: pgtable: reclaim empty
> > > PTE + page in madvise (MADV_DONTNEED)"), we now also free empty PTE tables
> > > + on zap. This does not change zapping locking requirements.
> >
> > As a general rule, the docs should represent the current state of
> > affairs; people wanting documentation for older kernels are best advised
> > to look at those kernels. Or so it seems to me, anyway. So I'm not
> > sure we need the "since..." stuff.
>
> Sure, I will drop this.
>
> >
> > Thanks,
> >
> > jon
next prev parent reply other threads:[~2025-06-03 11:24 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-02 21:07 [PATCH] docs/mm: expand vma doc to highlight pte freeing, non-vma traversal Lorenzo Stoakes
2025-06-02 21:38 ` Jonathan Corbet
2025-06-03 10:56 ` Lorenzo Stoakes
2025-06-03 11:24 ` Lorenzo Stoakes [this message]
2025-06-03 14:01 ` Jonathan Corbet
2025-06-03 14:11 ` Lorenzo Stoakes
2025-06-03 14:33 ` Jonathan Corbet
2025-06-03 14:08 ` Jonathan Corbet
2025-06-03 14:24 ` Lorenzo Stoakes
2025-06-03 14:37 ` Jonathan Corbet
2025-06-03 14:52 ` Lorenzo Stoakes
2025-06-03 15:05 ` Jonathan Corbet
2025-06-03 15:14 ` Lorenzo Stoakes
2025-06-03 15:28 ` Jonathan Corbet
2025-06-02 22:25 ` Jann Horn
2025-06-03 10:45 ` Lorenzo Stoakes
2025-06-03 18:36 ` Jann Horn
2025-06-03 18:52 ` 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=38bcf562-86dc-42b2-9ffc-53cbc5d8ac22@lucifer.local \
--to=lorenzo.stoakes@oracle.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=jannh@google.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shakeel.butt@linux.dev \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
--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 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.