public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: adobriyan@gmail.com, menage@google.com, pj@sgi.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] seq_file: Add seq_cpumask_list(), seq_nodemask_list()
Date: Thu, 16 Oct 2008 12:58:27 -0700	[thread overview]
Message-ID: <20081016125827.d72c52c8.akpm@linux-foundation.org> (raw)
In-Reply-To: <48F1C375.5020105@cn.fujitsu.com>

On Sun, 12 Oct 2008 17:29:25 +0800
Lai Jiangshan <laijs@cn.fujitsu.com> wrote:

> +static inline int seq_cpumask_list(struct seq_file *m, cpumask_t *mask)
> +{
> +	return seq_bitmap_list(m, mask->bits, NR_CPUS);
> +}

Is it possible to avoid using NR_CPUS?  In some situations it'd be much
more efficient to use the runtime-determined max possible cpu index.

But I don't immediately recall how to get at that number. 
num_possible_cpus() assumes that there are no holes in the CPU
identifier list.


  reply	other threads:[~2008-10-16 19:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-12  9:29 [PATCH 2/4] seq_file: Add seq_cpumask_list(), seq_nodemask_list() Lai Jiangshan
2008-10-16 19:58 ` Andrew Morton [this message]
2008-10-16 22:56   ` Mike Travis
2008-10-16 23:08     ` Andrew Morton

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=20081016125827.d72c52c8.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=adobriyan@gmail.com \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=menage@google.com \
    --cc=pj@sgi.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