From: Andrew Morton <akpm@osdl.org>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] for_each_possible_cpu [1/19] defines for_each_possible_cpu
Date: Wed, 15 Mar 2006 19:40:06 -0800 [thread overview]
Message-ID: <20060315194006.17dd9e24.akpm@osdl.org> (raw)
In-Reply-To: <20060316122110.c00f4181.kamezawa.hiroyu@jp.fujitsu.com>
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
>
> Now,
> for_each_cpu() is for-loop cpu over cpu_possible_map.
> for_each_online_cpu is for-loop cpu over cpu_online_map.
> .....for_each_cpu() looks bad name.
>
> This patch renames for_each_cpu() as for_each_possible_cpu().
>
Sane.
> I also wrote patches to replace all for_each_cpu with for_each_possible_cpu.
> please confirm....
>
> BTW, when HOTPLUC_CPU is not suppoted, using for_each_possible_cpu()
> should be avoided, I think.
Sometimes. Sometimes it's valid though - allocating (small amounts of)
per-cpu storage, summing up per-cpu counters (poorly), etc.
> -#define for_each_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map)
> +#define for_each_possible_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map)
Nope, I'll change this to
#define for_each_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map)
#define for_each_possible_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map)
So both are valid. That way
a) The kernel continues to compile at each step of the patch series
(important!) and
b) We can remove for_each_cpu() later on, after all the various
out-of-tree usages have been converted.
next prev parent reply other threads:[~2006-03-16 3:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-16 3:21 [PATCH] for_each_possible_cpu [1/19] defines for_each_possible_cpu KAMEZAWA Hiroyuki
2006-03-16 3:40 ` Andrew Morton [this message]
2006-03-16 4:13 ` KAMEZAWA Hiroyuki
2006-03-16 3:43 ` Nick Piggin
2006-03-16 3:55 ` Andrew Morton
2006-03-16 4:08 ` Nick Piggin
2006-03-16 4:17 ` KAMEZAWA Hiroyuki
2006-03-16 4:24 ` Nick Piggin
2006-03-16 6:22 ` KAMEZAWA Hiroyuki
2006-03-16 6:49 ` Nick Piggin
2006-03-16 9:48 ` Andrew Morton
2006-03-16 10:04 ` Nick Piggin
2006-03-16 4:33 ` YOSHIFUJI Hideaki / 吉藤英明
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=20060315194006.17dd9e24.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.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