linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
To: Mathieu Desnoyers <compudj@krystal.dyndns.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Pekka Enberg <penberg@cs.helsinki.fi>,
	Tom Zanussi <zanussi@us.ibm.com>,
	Randy Dunlap <randy.dunlap@oracle.com>
Subject: Re: [PATCH] relay: add buffer-only functionality, allowing for early kernel tracing
Date: Fri, 4 Apr 2008 20:06:10 +0300	[thread overview]
Message-ID: <20080404200610.747d02cd@linux360.ro> (raw)
In-Reply-To: <20080404164022.GA1762@Krystal>

On Fri, 4 Apr 2008 12:40:22 -0400
Mathieu Desnoyers <compudj@krystal.dyndns.org> wrote:
 
> Then I guess we would depend on page_alloc_init(). It's not that bad,
> but I guess the question is : do we prefer to let users specify the
> buffer size to reserve for tracing on the kernel command line (that
> would require __get_free_pages()) or do we compile-in a static buffer
> size, which can be specified in the kernel configuration. I think
> providing both could be an option : flexibility _and_ *very* early
> tracing.

I wasn't referring to the kernel's users specifying the buffer on the
command line. For example, LTTng code (I'm not familiar with it) could
allocate a buffer, by itself or using a helper function, and pass it to
relay_early_open(). Of course, it could read the command line and call
that helper function, passing the size required by the user as an
argument.

Basically, I'm saying that having relay code manage a large buffer,
allocating memory from it for each of its callers, could be very
complex. It would be easier and less complex to let each tracing
subsystem allocate memory on its own, either through a static buffer or
with __get_free_pages().

> So making this relay interface flexible enough to receive a buffer
> either reserved by __get_free_pages() or a static buffer seems like a
> good compromise. It would also have to receive the buffer size from
> the caller.

Yes, it shouldn't matter to the relay interface whether the buffer was
statically or dynamically allocated. All it needs to know is where it
starts and how long it is.

BTW, I'll resubmit a modified patch soon, as suggested by Randy Dunlap.


Eduard

  reply	other threads:[~2008-04-04 17:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-04 15:33 [PATCH] relay: add buffer-only functionality, allowing for early kernel tracing Eduard - Gabriel Munteanu
2008-04-04 16:06 ` Mathieu Desnoyers
2008-04-04 16:19   ` Eduard - Gabriel Munteanu
2008-04-04 16:40     ` Mathieu Desnoyers
2008-04-04 17:06       ` Eduard - Gabriel Munteanu [this message]
2008-04-06  1:27       ` Eduard - Gabriel Munteanu
2008-04-04 16:08 ` Randy Dunlap
2008-04-04 16:28   ` Eduard - Gabriel Munteanu

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=20080404200610.747d02cd@linux360.ro \
    --to=eduard.munteanu@linux360.ro \
    --cc=compudj@krystal.dyndns.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@cs.helsinki.fi \
    --cc=randy.dunlap@oracle.com \
    --cc=zanussi@us.ibm.com \
    /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;
as well as URLs for NNTP newsgroup(s).