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]
Date:	Tue, 16 Aug 2011 14:46:14 -0700
From:	Vaibhav Nagarnaik <vnagarnaik@...gle.com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	Michael Rubin <mrubin@...gle.com>,
	David Sharp <dhsharp@...gle.com>, linux-kernel@...r.kernel.org,
	Vaibhav Nagarnaik <vnagarnaik@...gle.com>
Subject: [PATCH v2 0/5] Add dynamic updates to trace ring buffer

These patches are in response to the fact that sometimes there is higher
rate of events generated on some CPUs as compared to others. This makes
it inefficient to have equal memory size allocated to each of the
per-cpu ring buffers.

This patch series adds 3 things to achieve this:
* Add a way to measure the rate of events generated on a CPU. This is a
  part of patch#2 which makes the 'stats' files print out the number of
  bytes in the ring buffer, the oldest time stamp ("head ts"), and the
  current time stamp ("now ts"). The rate is measured as: bytes /
  (now-head)

* The next patch#3 adds the flexibility to assign different sizes to
  individual per-cpu ring buffers. This is done by adding a
  "buffer_size_kb" debugfs file entry under per_cpu/* directories.

* The final two patches provide a way to change the size of ring
  buffer concurrent to events being added to the ring buffer. Patch#4
  adds functionality to remove pages from the ring buffer and patch#5
  adds functionality to add pages to the ring buffer.

Patch#1 adds a debugfs entry "buffer_total_size_kb" which provides the
total memory allocated for the ring buffer.

This makes it easy for a user process to monitor the rate at which the
ring buffers are being filled up and update the individual per-cpu ring
buffer sizes in response to it.

Changelog v2-v1:
* This changes the logic of page removal from the ring buffer, based on
  comments from Steven Rostedt about the racey behavior of earlier code.
* Some other changes to the functionality and variable names as asked by
  Steven Rostedt.

Vaibhav Nagarnaik (5):
  trace: Add a new readonly entry to report total buffer size
  trace: Add ring buffer stats to measure rate of events
  trace: Add per_cpu ring buffer control files
  trace: Make removal of ring buffer pages atomic
  trace: Make addition of pages in ring buffer atomic

 include/linux/ring_buffer.h |    8 +-
 kernel/trace/ring_buffer.c  |  543 ++++++++++++++++++++++++++++++-------------
 kernel/trace/trace.c        |  247 +++++++++++++++-----
 kernel/trace/trace.h        |    2 +-
 4 files changed, 583 insertions(+), 217 deletions(-)

-- 
1.7.3.1

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