lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1349456348.6755.59.camel@gandalf.local.home>
Date:	Fri, 05 Oct 2012 12:59:08 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Hiraku Toyooka <hiraku.toyooka.gu@...achi.com>
Cc:	linux-kernel@...r.kernel.org, yrl.pp-manager.tt@...achi.com,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH -tip 2/4] tracing: add a resize function for making one
 buffer equivalent to the other buffer

On Tue, 2012-10-02 at 17:27 +0900, Hiraku Toyooka wrote:
> Trace buffer size is now per-cpu, so that there are following two
> patterns in resize of the buffers.
> 
>   (1) resize per-cpu buffers to same given size
>   (2) resize per-cpu buffers to the other trace_array's buffer size
>       for each CPU (such as preparing the max_tr which is equivalent
>       to the global_trace's size)
> 
> __tracing_resize_ring_buffer() can be used for (1), and had
> implemented (2) inside it for resetting the global_trace to the
> original size.
> 
> (2) was also implemented in other place. So this patch assembles
> them in a new function - resize_buffer_even().
> 
> Signed-off-by: Hiraku Toyooka <hiraku.toyooka.gu@...achi.com>
> Cc: Steven Rostedt <rostedt@...dmis.org>
> Cc: Frederic Weisbecker <fweisbec@...il.com>
> Cc: Ingo Molnar <mingo@...hat.com>
> Cc: linux-kernel@...r.kernel.org
> ---
> 
>  kernel/trace/trace.c |   57 ++++++++++++++++++++++++++------------------------
>  1 files changed, 30 insertions(+), 27 deletions(-)
> 
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index 08acf42..1e599e6 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -3017,6 +3017,31 @@ static void set_buffer_entries(struct trace_array *tr, unsigned long val)
>  		tr->data[cpu]->entries = val;
>  }
>  
> +/* resize @tr's buffer to the size of @size_tr's entries */
> +static int resize_buffer_even(struct trace_array *tr,

I don't mind this patch, but I just hate the name "resize_buffer_even".
What about "resize_buffer_duplicate_size"?

-- Steve


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ