From: Steven Rostedt <rostedt@goodmis.org>
To: Vincent Donnefort <vdonnefort@google.com>
Cc: mhiramat@kernel.org, linux-kernel@vger.kernel.org,
linux-trace-kernel@vger.kernel.org,
mathieu.desnoyers@efficios.com, kernel-team@android.com,
rdunlap@infradead.org
Subject: Re: [PATCH v20 1/5] ring-buffer: allocate sub-buffers with __GFP_COMP
Date: Wed, 10 Apr 2024 13:36:13 -0400 [thread overview]
Message-ID: <20240410133613.0a6bd6fb@gandalf.local.home> (raw)
In-Reply-To: <20240406173649.3210836-2-vdonnefort@google.com>
Hi Vincent,
Thanks for sending this. Nit: Subject should start with a capital:
ring-buffer: Allocate sub-buffers with __GFP_COMP
-- Steve
On Sat, 6 Apr 2024 18:36:45 +0100
Vincent Donnefort <vdonnefort@google.com> wrote:
> In preparation for the ring-buffer memory mapping, allocate compound
> pages for the ring-buffer sub-buffers to enable us to map them to
> user-space with vm_insert_pages().
>
> Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
>
> diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
> index 25476ead681b..cc9ebe593571 100644
> --- a/kernel/trace/ring_buffer.c
> +++ b/kernel/trace/ring_buffer.c
> @@ -1524,7 +1524,7 @@ static int __rb_allocate_pages(struct ring_buffer_per_cpu *cpu_buffer,
> list_add(&bpage->list, pages);
>
> page = alloc_pages_node(cpu_to_node(cpu_buffer->cpu),
> - mflags | __GFP_ZERO,
> + mflags | __GFP_COMP | __GFP_ZERO,
> cpu_buffer->buffer->subbuf_order);
> if (!page)
> goto free_pages;
> @@ -1609,7 +1609,7 @@ rb_allocate_cpu_buffer(struct trace_buffer *buffer, long nr_pages, int cpu)
>
> cpu_buffer->reader_page = bpage;
>
> - page = alloc_pages_node(cpu_to_node(cpu), GFP_KERNEL | __GFP_ZERO,
> + page = alloc_pages_node(cpu_to_node(cpu), GFP_KERNEL | __GFP_COMP | __GFP_ZERO,
> cpu_buffer->buffer->subbuf_order);
> if (!page)
> goto fail_free_reader;
> @@ -5579,7 +5579,7 @@ ring_buffer_alloc_read_page(struct trace_buffer *buffer, int cpu)
> goto out;
>
> page = alloc_pages_node(cpu_to_node(cpu),
> - GFP_KERNEL | __GFP_NORETRY | __GFP_ZERO,
> + GFP_KERNEL | __GFP_NORETRY | __GFP_COMP | __GFP_ZERO,
> cpu_buffer->buffer->subbuf_order);
> if (!page) {
> kfree(bpage);
next prev parent reply other threads:[~2024-04-10 17:33 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-06 17:36 [PATCH v20 0/5] Introducing trace buffer mapping by user-space Vincent Donnefort
2024-04-06 17:36 ` [PATCH v20 1/5] ring-buffer: allocate sub-buffers with __GFP_COMP Vincent Donnefort
2024-04-10 17:36 ` Steven Rostedt [this message]
2024-04-06 17:36 ` [PATCH v20 2/5] ring-buffer: Introducing ring-buffer mapping functions Vincent Donnefort
2024-04-10 17:43 ` Steven Rostedt
2024-04-23 16:04 ` Liam R. Howlett
2024-04-28 21:24 ` Steven Rostedt
2024-04-18 6:55 ` Mike Rapoport
2024-04-19 3:43 ` Steven Rostedt
2024-04-22 18:01 ` Vincent Donnefort
2024-04-19 18:25 ` David Hildenbrand
2024-04-22 9:27 ` David Hildenbrand
2024-04-22 18:20 ` Vincent Donnefort
2024-04-22 18:27 ` David Hildenbrand
2024-04-22 20:31 ` Vincent Donnefort
2024-04-23 15:18 ` David Hildenbrand
2024-04-06 17:36 ` [PATCH v20 3/5] tracing: Allow user-space mapping of the ring-buffer Vincent Donnefort
2024-04-06 17:36 ` [PATCH v20 4/5] Documentation: tracing: Add ring-buffer mapping Vincent Donnefort
2024-04-06 17:36 ` [PATCH v20 5/5] ring-buffer/selftest: Add ring-buffer mapping test Vincent Donnefort
2024-04-06 20:46 ` Muhammad Usama Anjum
2024-04-10 17:56 ` [PATCH v20 0/5] Introducing trace buffer mapping by user-space Steven Rostedt
2024-04-17 4:55 ` 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=20240410133613.0a6bd6fb@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=rdunlap@infradead.org \
--cc=vdonnefort@google.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;
as well as URLs for NNTP newsgroup(s).