From: Paul Jackson <pj@sgi.com>
To: Zwane Mwaikambo <zwane@fsmlabs.com>
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: Re: [PATCH][2.6] first/next_cpu returns values > NR_CPUS
Date: Sat, 31 Jul 2004 23:21:26 -0700 [thread overview]
Message-ID: <20040731232126.1901760b.pj@sgi.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0407311347270.4094@montezuma.fsmlabs.com>
> Zwane, William proposed:
> + return min(NR_CPUS, find_first_bit(srcp->bits, nbits));
Could you check the kernel text size, for some NUMA config, before and
after adding these min() calls in first_cpu() and next_cpu(). These two
macros are critical to the for_*_cpu() macros.
When I tried it just now on an ia64 sn2_defconfig, NR_CPUS == 512, it
increased each for_*_cpu() loop about 28 bytes of text, for a kernel
text size increase of 1352 bytes (this is on a private kernel I have,
your results will vary).
> The following caused some fireworks whilst merging i386 cpu hotplug.
> any_online_cpu(0x2) returns 32 on i386 if we're forced to continue past
> the only set bit due to the additional find_first_bit in the
> find_next_bit i386 implementation.
Could you explain this a bit more? What value of NR_CPUS were you
using -- if NR_CPUS == 32, then I'd _expect_ any_online_cpu() to return
32 if none of the bits provided it were online. The way you phrase
this, it sure seems that you are hinting at a bug in the i386 implementation
of find_next_bit(). But I can't quite make out the code, nor what you're
saying, so I'm still confused.
A specific example might help -- NR_CPUS is this, what's online is that,
called "any_online_cpu()" with so-and-so, expected thus as a return, got
something else instead.
I'd hate to see a bug in i386 find_next_bit() left to stand, at the
expense of increasing sometimes fairly interesting code loops by 28
bytes of text each. If that's what's happening here ...
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.650.933.1373
next prev parent reply other threads:[~2004-08-01 6:21 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-31 20:52 [PATCH][2.6] first/next_cpu returns values > NR_CPUS Zwane Mwaikambo
2004-07-31 20:57 ` William Lee Irwin III
2004-07-31 23:02 ` Zwane Mwaikambo
2004-08-01 6:21 ` Paul Jackson [this message]
2004-08-01 7:22 ` Zwane Mwaikambo
2004-08-01 11:20 ` Paul Jackson
2004-08-01 14:51 ` Zwane Mwaikambo
2004-08-01 12:40 ` William Lee Irwin III
2004-08-01 13:05 ` Paul Jackson
2004-08-01 13:10 ` William Lee Irwin III
2004-08-01 13:36 ` Paul Jackson
2004-08-01 13:41 ` William Lee Irwin III
2004-08-01 13:47 ` Paul Jackson
2004-08-02 22:00 ` Matthew Dobson
2004-08-05 16:50 ` OGAWA Hirofumi
2004-08-05 17:01 ` William Lee Irwin III
2004-08-05 17:42 ` Andrew Morton
2004-08-05 18:13 ` Roman Zippel
2004-08-01 14:54 ` Zwane Mwaikambo
2004-08-01 15:05 ` William Lee Irwin III
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=20040731232126.1901760b.pj@sgi.com \
--to=pj@sgi.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zwane@fsmlabs.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.