All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pekka Enberg <penberg@cs.helsinki.fi>
To: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
Cc: tzanussi@gmail.com, akpm@linux-foundation.org,
	compudj@krystal.dyndns.org, linux-kernel@vger.kernel.org,
	righi.andrea@gmail.com
Subject: Re: [PATCH 3/3] relay: Add buffer-only channels; useful for early logging.
Date: Fri, 13 Jun 2008 10:04:57 +0300	[thread overview]
Message-ID: <48521C19.6070001@cs.helsinki.fi> (raw)
In-Reply-To: <20080613041013.274ccb28@linux360.ro>

Hi Eduard,

Eduard - Gabriel Munteanu wrote:
> @@ -578,12 +592,15 @@ struct rchan *relay_open(const char *base_filename,
>  	chan->alloc_size = FIX_SIZE(subbuf_size * n_subbufs);
>  	chan->parent = parent;
>  	chan->private_data = private_data;
> -	strlcpy(chan->base_filename, base_filename, NAME_MAX);
> +	if (base_filename) {
> +		chan->has_base_filename = 1;
> +		strlcpy(chan->base_filename, base_filename, NAME_MAX);
> +	}
>  	setup_callbacks(chan, cb);
>  	kref_init(&chan->kref);
>  
>  	mutex_lock(&relay_channels_mutex);
> -	for_each_online_cpu(i) {
> +	for_each_present_cpu(i) {
>  		chan->buf[i] = relay_open_buf(chan, i);
>  		if (!chan->buf[i])
>  			goto free_bufs;
> @@ -594,7 +611,7 @@ struct rchan *relay_open(const char *base_filename,
>  	return chan;
>  
>  free_bufs:
> -	for_each_online_cpu(i) {
> +	for_each_present_cpu(i) {
>  		if (!chan->buf[i])
>  			break;
>  		relay_close_buf(chan->buf[i]);

Why do we need to change for_each_online_cpu to for_each_present_cpu?
I guess it's because we don't have all the CPUs online at early
boot? Wouldn't it then be better to implement CPU hotplug support
instead?

		Pekka

  reply	other threads:[~2008-06-13  7:07 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-13  1:10 [PATCH 3/3] relay: Add buffer-only channels; useful for early logging Eduard - Gabriel Munteanu
2008-06-13  7:04 ` Pekka Enberg [this message]
2008-06-13 15:54   ` Eduard - Gabriel Munteanu
2008-06-16 12:30     ` Mathieu Desnoyers
2008-06-16 13:37       ` Eduard - Gabriel Munteanu
2008-06-17 13:53         ` Mathieu Desnoyers
2008-06-14 16:10   ` Eduard - Gabriel Munteanu
2008-06-16 12:35 ` Mathieu Desnoyers
2008-06-16 13:30   ` Eduard - Gabriel Munteanu
  -- strict thread matches above, loose matches on Subject: below --
2008-06-23 12:31 Eduard - Gabriel Munteanu
2008-07-03  6:06 ` Andrew Morton
2008-07-05  4:14   ` Eduard - Gabriel Munteanu
2008-07-05  6:32     ` Andrew Morton
2008-08-06 17:32 ` Mathieu Desnoyers
2008-06-21 14:11 Eduard - Gabriel Munteanu
2008-06-22 19:24 ` Pekka Enberg
2008-06-22 19:29 ` Pekka Enberg
2008-06-22 20:51   ` Eduard - Gabriel Munteanu
2008-06-15 15:05 Eduard - Gabriel Munteanu
2008-06-17 14:35 ` Mathieu Desnoyers
2008-06-12 20:26 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=48521C19.6070001@cs.helsinki.fi \
    --to=penberg@cs.helsinki.fi \
    --cc=akpm@linux-foundation.org \
    --cc=compudj@krystal.dyndns.org \
    --cc=eduard.munteanu@linux360.ro \
    --cc=linux-kernel@vger.kernel.org \
    --cc=righi.andrea@gmail.com \
    --cc=tzanussi@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.