* [PATCH] mm: slub: Wrap krealloc() __GFP_ZERO semantics diagram in literal code block
@ 2025-06-10 9:21 Bagas Sanjaya
2025-06-10 14:20 ` Harry Yoo
2025-06-10 23:51 ` Matthew Wilcox
0 siblings, 2 replies; 4+ messages in thread
From: Bagas Sanjaya @ 2025-06-10 9:21 UTC (permalink / raw)
To: Linux Kernel Mailing List, Linux Documentation,
Linux Memory Management List
Cc: Feng Tang, Christoph Lameter, David Rientjes, Andrew Morton,
Vlastimil Babka, Roman Gushchin, Harry Yoo, Danilo Krummrich,
Bagas Sanjaya
Sphinx reports htmldocs warnings:
Documentation/core-api/mm-api:40: ./mm/slub.c:4936: WARNING: Block quote ends without a blank line; unexpected unindent. [docutils]
Documentation/core-api/mm-api:40: ./mm/slub.c:4936: ERROR: Undefined substitution referenced: "--------". [docutils]
Fix the warning by wrapping krealloc() semantics diagram for __GFP_ZERO
in literal code block.
Fixes: 489a744e5fb1 ("mm: krealloc: clarify valid usage of __GFP_ZERO")
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
---
mm/slub.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/mm/slub.c b/mm/slub.c
index 31e11ef256f90a..45a963e363d32b 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -4930,12 +4930,12 @@ __do_krealloc(const void *p, size_t new_size, gfp_t flags)
* When slub_debug_orig_size() is off, krealloc() only knows about the bucket
* size of an allocation (but not the exact size it was allocated with) and
* hence implements the following semantics for shrinking and growing buffers
- * with __GFP_ZERO.
+ * with __GFP_ZERO::
*
- * new bucket
- * 0 size size
- * |--------|----------------|
- * | keep | zero |
+ * new bucket
+ * 0 size size
+ * |--------|----------------|
+ * | keep | zero |
*
* Otherwise, the original allocation size 'orig_size' could be used to
* precisely clear the requested size, and the new size will also be stored
--
An old man doll... just what I always wanted! - Clara
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mm: slub: Wrap krealloc() __GFP_ZERO semantics diagram in literal code block
2025-06-10 9:21 [PATCH] mm: slub: Wrap krealloc() __GFP_ZERO semantics diagram in literal code block Bagas Sanjaya
@ 2025-06-10 14:20 ` Harry Yoo
2025-06-10 22:54 ` Bagas Sanjaya
2025-06-10 23:51 ` Matthew Wilcox
1 sibling, 1 reply; 4+ messages in thread
From: Harry Yoo @ 2025-06-10 14:20 UTC (permalink / raw)
To: Bagas Sanjaya
Cc: Linux Kernel Mailing List, Linux Documentation,
Linux Memory Management List, Feng Tang, Christoph Lameter,
David Rientjes, Andrew Morton, Vlastimil Babka, Roman Gushchin,
Danilo Krummrich
On Tue, Jun 10, 2025 at 04:21:53PM +0700, Bagas Sanjaya wrote:
> Sphinx reports htmldocs warnings:
>
> Documentation/core-api/mm-api:40: ./mm/slub.c:4936: WARNING: Block quote ends without a blank line; unexpected unindent. [docutils]
> Documentation/core-api/mm-api:40: ./mm/slub.c:4936: ERROR: Undefined substitution referenced: "--------". [docutils]
>
> Fix the warning by wrapping krealloc() semantics diagram for __GFP_ZERO
> in literal code block.
>
> Fixes: 489a744e5fb1 ("mm: krealloc: clarify valid usage of __GFP_ZERO")
> Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
> ---
Hmm not sure what I am missing, but neither `make htmldocs` on my machine
nor docs.kernel.org [1] list kerneldoc for *_noprof() functions properly
(which should have been listed), so no errors show up...
[1] https://docs.kernel.org/core-api/mm-api.html
> mm/slub.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/mm/slub.c b/mm/slub.c
> index 31e11ef256f90a..45a963e363d32b 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -4930,12 +4930,12 @@ __do_krealloc(const void *p, size_t new_size, gfp_t flags)
> * When slub_debug_orig_size() is off, krealloc() only knows about the bucket
> * size of an allocation (but not the exact size it was allocated with) and
> * hence implements the following semantics for shrinking and growing buffers
> - * with __GFP_ZERO.
> + * with __GFP_ZERO::
> *
> - * new bucket
> - * 0 size size
> - * |--------|----------------|
> - * | keep | zero |
> + * new bucket
> + * 0 size size
> + * |--------|----------------|
> + * | keep | zero |
> *
> * Otherwise, the original allocation size 'orig_size' could be used to
> * precisely clear the requested size, and the new size will also be stored
> --
> An old man doll... just what I always wanted! - Clara
>
--
Cheers,
Harry / Hyeonggon
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mm: slub: Wrap krealloc() __GFP_ZERO semantics diagram in literal code block
2025-06-10 14:20 ` Harry Yoo
@ 2025-06-10 22:54 ` Bagas Sanjaya
0 siblings, 0 replies; 4+ messages in thread
From: Bagas Sanjaya @ 2025-06-10 22:54 UTC (permalink / raw)
To: Harry Yoo
Cc: Linux Kernel Mailing List, Linux Documentation,
Linux Memory Management List, Feng Tang, Christoph Lameter,
David Rientjes, Andrew Morton, Vlastimil Babka, Roman Gushchin,
Danilo Krummrich
[-- Attachment #1: Type: text/plain, Size: 1164 bytes --]
On Tue, Jun 10, 2025 at 11:20:14PM +0900, Harry Yoo wrote:
> On Tue, Jun 10, 2025 at 04:21:53PM +0700, Bagas Sanjaya wrote:
> > Sphinx reports htmldocs warnings:
> >
> > Documentation/core-api/mm-api:40: ./mm/slub.c:4936: WARNING: Block quote ends without a blank line; unexpected unindent. [docutils]
> > Documentation/core-api/mm-api:40: ./mm/slub.c:4936: ERROR: Undefined substitution referenced: "--------". [docutils]
> >
> > Fix the warning by wrapping krealloc() semantics diagram for __GFP_ZERO
> > in literal code block.
> >
> > Fixes: 489a744e5fb1 ("mm: krealloc: clarify valid usage of __GFP_ZERO")
> > Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
> > ---
>
> Hmm not sure what I am missing, but neither `make htmldocs` on my machine
> nor docs.kernel.org [1] list kerneldoc for *_noprof() functions properly
> (which should have been listed), so no errors show up...
>
> [1] https://docs.kernel.org/core-api/mm-api.html
I was encountering the warnings on docs-next (see MAINTAINERS), something that
I forget to mention when posting this patch.
Thanks.
--
An old man doll... just what I always wanted! - Clara
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mm: slub: Wrap krealloc() __GFP_ZERO semantics diagram in literal code block
2025-06-10 9:21 [PATCH] mm: slub: Wrap krealloc() __GFP_ZERO semantics diagram in literal code block Bagas Sanjaya
2025-06-10 14:20 ` Harry Yoo
@ 2025-06-10 23:51 ` Matthew Wilcox
1 sibling, 0 replies; 4+ messages in thread
From: Matthew Wilcox @ 2025-06-10 23:51 UTC (permalink / raw)
To: Bagas Sanjaya
Cc: Linux Kernel Mailing List, Linux Documentation,
Linux Memory Management List, Feng Tang, Christoph Lameter,
David Rientjes, Andrew Morton, Vlastimil Babka, Roman Gushchin,
Harry Yoo, Danilo Krummrich
On Tue, Jun 10, 2025 at 04:21:53PM +0700, Bagas Sanjaya wrote:
> Sphinx reports htmldocs warnings:
>
> Documentation/core-api/mm-api:40: ./mm/slub.c:4936: WARNING: Block quote ends without a blank line; unexpected unindent. [docutils]
> Documentation/core-api/mm-api:40: ./mm/slub.c:4936: ERROR: Undefined substitution referenced: "--------". [docutils]
Jon already fixed this. I've picked it up into my current set of slab
patches.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-06-10 23:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-10 9:21 [PATCH] mm: slub: Wrap krealloc() __GFP_ZERO semantics diagram in literal code block Bagas Sanjaya
2025-06-10 14:20 ` Harry Yoo
2025-06-10 22:54 ` Bagas Sanjaya
2025-06-10 23:51 ` Matthew Wilcox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).