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: <84d3b41a72bd43dbb9d44921ef535c92@AcuMS.aculab.com>
Date: Wed, 20 Dec 2023 08:48:02 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Steven Rostedt' <rostedt@...dmis.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "linux-trace-kernel@...r.kernel.org"
	<linux-trace-kernel@...r.kernel.org>
CC: Masami Hiramatsu <mhiramat@...nel.org>, Mark Rutland
	<mark.rutland@....com>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	Andrew Morton <akpm@...ux-foundation.org>, Tzvetomir Stoyanov
	<tz.stoyanov@...il.com>, Vincent Donnefort <vdonnefort@...gle.com>, "Kent
 Overstreet" <kent.overstreet@...il.com>
Subject: RE: [PATCH v5 02/15] ring-buffer: Page size per ring buffer

From: Steven Rostedt
> Sent: 19 December 2023 18:54
> From: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@...il.com>
> 
> Currently the size of one sub buffer page is global for all buffers and
> it is hard coded to one system page. In order to introduce configurable
> ring buffer sub page size, the internal logic should be refactored to
> work with sub page size per ring buffer.
> 
...
> -	nr_pages = DIV_ROUND_UP(size, BUF_PAGE_SIZE);
> +	/* Default buffer page size - one system page */
> +	buffer->subbuf_size = PAGE_SIZE - BUF_PAGE_HDR_SIZE;
> +
> +	/* Max payload is buffer page size - header (8bytes) */
> +	buffer->max_data_size = buffer->subbuf_size - (sizeof(u32) * 2);
> +
> +	nr_pages = DIV_ROUND_UP(size, buffer->subbuf_size);

While not new, does this really make any sense for systems with 64k pages?
Wouldn't it be better to have units of 4k?

...
> @@ -5102,14 +5110,14 @@ unsigned long ring_buffer_size(struct trace_buffer *buffer, int cpu)
>  {
>  	/*
>  	 * Earlier, this method returned
> -	 *	BUF_PAGE_SIZE * buffer->nr_pages
> +	 *	buffer->subbuf_size * buffer->nr_pages
>  	 * Since the nr_pages field is now removed, we have converted this to
>  	 * return the per cpu buffer value.

Overenthusiastic global replace...

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ