public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
	linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
	Mark Rutland <mark.rutland@arm.com>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH v3 0/2] tracing: Make persistent ring buffer freeable
Date: Tue, 11 Feb 2025 23:46:54 +0900	[thread overview]
Message-ID: <173928521419.906035.17750338150436695675.stgit@devnote2> (raw)

Hi,

Here is a pair of patches for making the persistent ring buffer
freeable. These were splitted from another series for improving
persistent ring buffer [1].

[1] https://lore.kernel.org/all/173920222697.826592.3726270716809214055.stgit@devnote2/

Anyway, this series allows us to release the memory for the persistent
ring buffer if it is not used anymore without changing kernel cmdline
and reboot. This allows us to enable the persistent ring buffer by
default boot, but disable it according to the user setting after boot
and recycle the memory for the persistent ring buffer.

This is important for the secure system which signs kernel cmdline with
the kernel image, because user can not change the cmdline easily
(usually, it is not possible unless changing kernel image.) Thus, to
use the persistent ring buffer, we need to enable it by default on such
system. However, in that case, some amount of memory is locked by the
persistent ring buffer even if it is not used by user setting.

This feature is useful for such case, because if user setting is
disabled the persistent tracing, we can release the persistent ring
buffer to free page pool.

Thank you,
---

Masami Hiramatsu (Google) (2):
      mm/memblock: Add reserved memory release function
      tracing: Freeable reserved ring buffer


 include/linux/mm.h   |    1 +
 kernel/trace/trace.c |   13 ++++++++-
 kernel/trace/trace.h |    1 +
 mm/memblock.c        |   72 ++++++++++++++++++++++++++++++++++++++++++--------
 4 files changed, 74 insertions(+), 13 deletions(-)

--
Masami Hiramatsu (Google) <mhiramat@kernel.org>

             reply	other threads:[~2025-02-11 14:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-11 14:46 Masami Hiramatsu (Google) [this message]
2025-02-11 14:47 ` [PATCH v3 1/2] mm/memblock: Add reserved memory release function Masami Hiramatsu (Google)
2025-02-11 17:52   ` Steven Rostedt
2025-02-11 23:39     ` Masami Hiramatsu
2025-02-18  7:24   ` Mike Rapoport
2025-02-18  8:42     ` Masami Hiramatsu
2025-02-18  9:47       ` Mike Rapoport
2025-02-18 11:34         ` Mike Rapoport
2025-02-18 13:06           ` Masami Hiramatsu
2025-02-11 14:47 ` [PATCH v3 2/2] tracing: Freeable reserved ring buffer Masami Hiramatsu (Google)

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=173928521419.906035.17750338150436695675.stgit@devnote2 \
    --to=mhiramat@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=rostedt@goodmis.org \
    /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