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: <CAL26m8JtwE0DcEL3JUs+a_boWbiZAzEvUfvCQ_z5aob2935pVQ@mail.gmail.com>
Date:	Fri, 29 Jul 2011 12:10:20 -0700
From:	Vaibhav Nagarnaik <vnagarnaik@...gle.com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...hat.com>,
	Michael Rubin <mrubin@...gle.com>,
	David Sharp <dhsharp@...gle.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/5] trace: Add ring buffer stats to measure rate of events

On Fri, Jul 29, 2011 at 11:10 AM, Steven Rostedt <rostedt@...dmis.org> wrote:
> On Tue, 2011-07-26 at 15:59 -0700, Vaibhav Nagarnaik wrote:
>> The stats file under per_cpu folder provides the number of entries,
>> overruns and other statistics about the CPU ring buffer. However, the
>> numbers do not provide any indication of how full the ring buffer is in
>> bytes compared to the overall size in bytes. Also, it is helpful to know
>> the rate at which the cpu buffer is filling up.
>>
>> This patch adds an entry "bytes: " in printed stats for per_cpu ring
>> buffer which provides the actual bytes consumed in the ring buffer. This
>> field includes the number of bytes used by recorded events and the
>> padding bytes added when moving the tail pointer to next page.
>>
>> It also adds the following time stamps:
>> "head ts:" - the oldest timestamp in the ring buffer
>
>
> I hate the name of "head_ts", as it really is meaningless. The head of
> our ring buffer is indeed the oldest events, but other ring buffers have
> head as the newest. This is an internal name that should not be used
> outside of the ring buffer code itself. Maybe call it "oldest_ts", or
> even more verbose (and what it actually is), "oldest_event_ts".
>
>
>> "now ts:"  - the timestamp at the time of reading
>>
>> The field "now ts" provides a consistent time snapshot to the userspace
>> when being read. This is read from the same trace clock used by tracing
>> event timestamps.
>>
>> Together, these values provide the rate at which the buffer is filling
>> up, from the formula:
>> bytes / (now_ts - head_ts)
>>
>> Signed-off-by: Vaibhav Nagarnaik <vnagarnaik@...gle.com>
>> ---
>
>>  /**
>> + * ring_buffer_head_ts - get the oldest event timestamp from the buffer
>> + * @buffer: The ring buffer
>> + * @cpu: The per CPU buffer to read from.
>> + */
>> +unsigned long ring_buffer_head_ts(struct ring_buffer *buffer, int cpu)
>
> Hence, replace head_ts, with something else here.
>
> Thanks,
>
> -- Steve
>

'oldest_event_ts' sounds good.


Vaibhav Nagarnaik
--
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