From: Mike Travis <travis@sgi.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
Andrew Morton <akpm@linux-foundation.org>,
"H. Peter Anvin" <hpa@zytor.com>,
Christoph Lameter <cl@linux-foundation.org>,
Jack Steiner <steiner@sgi.com>,
linux-kernel@vger.kernel.org, Len Brown <len.brown@intel.com>,
Dave Jones <davej@codemonkey.org.uk>, Paul Jackson <pj@sgi.com>,
Tigran Aivazian <tigran@aivazian.fsnet.co.uk>,
Robert Richter <robert.richter@amd.com>, Greg Banks <gnb@sgi.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Adrian Bunk <bunk@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Andreas Schwab <schwab@suse.de>,
Johannes Weiner <hannes@saeurebad.de>
Subject: Re: [PATCH 1/8] cpumask: Replace cpumask_of_cpu with cpumask_of_cpu_ptr
Date: Wed, 23 Jul 2008 07:16:21 -0700 [thread overview]
Message-ID: <48873D35.9030204@sgi.com> (raw)
In-Reply-To: <20080723112042.GA16420@elte.hu>
Ingo Molnar wrote:
> * Rusty Russell <rusty@rustcorp.com.au> wrote:
>
>>> I wouldn't mind it at all, and since it's almost always calling a
>>> function that requires a cpumask_t pointer (like the cpu_* ops or
>>> set_cpus_allowed_ptr) then there shouldn't be too many "pointer
>>> dereference" penalties. I'm just always a bit hesitant to make too
>>> many generic changes since I have only x86 and ia64 machines to test
>>> with.
>> The simple version is just a static array of [NR_CPUS] cpumask_t's.
>> Do that, with an override for smarter archs?
>>
>> I really REALLY prefer that over the fairly tortuous macros.
>
> a fresh commit in -git has exposed the topology.h mess - see the hack
> below. We now have diverging versions of topology_core_siblings()
> semantics - that sure cannot be right. Mike?
>
> Ingo
>
> ------->
> commit 695a6b456307455a10059512208e8ed0d376ecd3
> Author: Ingo Molnar <mingo@elte.hu>
> Date: Wed Jul 23 13:19:44 2008 +0200
>
> topology: work around topology_core_siblings() breakage
>
> work around:
>
> drivers/net/sfc/efx.c: In function ‘efx_probe_interrupts':
> drivers/net/sfc/efx.c:845: error: lvalue required as unary ‘&' operand
>
> the topology API is a mess right now ...
>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
> ---
> drivers/net/sfc/efx.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c
> index 45c72ee..1ababfa 100644
> --- a/drivers/net/sfc/efx.c
> +++ b/drivers/net/sfc/efx.c
> @@ -842,8 +842,10 @@ static void efx_probe_interrupts(struct efx_nic *efx)
> for_each_online_cpu(cpu) {
> if (!cpu_isset(cpu, core_mask)) {
> ++efx->rss_queues;
> +#if 0
> cpus_or(core_mask, core_mask,
> topology_core_siblings(cpu));
> +#endif
> }
> }
> } else {
Ahh, yes, I see it now. If you don't define topology_core_siblings then you get:
#ifndef topology_core_siblings
#define topology_core_siblings(cpu) cpumask_of_cpu(cpu)
#endif
And of course this is no longer an lvalue.
Rusty - if you don't think there'll be objections from other arches I can put in
a generic cpumask_of_cpu_map[].
Thanks,
Mike
next prev parent reply other threads:[~2008-07-23 14:16 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-15 21:14 [PATCH 0/8] cpumask: Replace/optimize cpumask_of_cpu & cpumask_t operations Mike Travis
2008-07-15 21:14 ` [PATCH 1/8] cpumask: Replace cpumask_of_cpu with cpumask_of_cpu_ptr Mike Travis
2008-07-18 5:30 ` Rusty Russell
2008-07-18 13:43 ` Mike Travis
2008-07-20 10:03 ` Rusty Russell
2008-07-23 11:20 ` Ingo Molnar
2008-07-23 11:23 ` Ingo Molnar
2008-07-23 14:26 ` Mike Travis
2008-07-24 0:46 ` Rusty Russell
2008-07-23 14:16 ` Mike Travis [this message]
2008-07-23 17:45 ` Mike Travis
2008-07-15 21:14 ` [PATCH 2/8] cpumask: Optimize cpumask_of_cpu in arch/x86/kernel/io_apic_64.c Mike Travis
2008-07-15 21:14 ` [PATCH 3/8] cpumask: Optimize cpumask_of_cpu in arch/x86/kernel/ldt.c Mike Travis
2008-07-15 21:14 ` [PATCH 4/8] cpumask: Optimize cpumask_of_cpu in drivers/misc/sgi-xp/xpc_main.c Mike Travis
2008-07-16 11:17 ` Dean Nelson
2008-07-15 21:14 ` [PATCH 5/8] cpumask: Optimize cpumask_of_cpu in kernel/time/tick-common.c Mike Travis
2008-07-15 21:14 ` [PATCH 6/8] cpumask: Optimize cpumask_of_cpu in lib/smp_processor_id.c Mike Travis
2008-07-18 20:33 ` Ingo Molnar
2008-07-18 20:35 ` Ingo Molnar
2008-07-18 22:36 ` Mike Travis
2008-07-15 21:14 ` [PATCH 7/8] cpumask: Provide a generic set of CPUMASK_ALLOC macros Mike Travis
2008-07-16 6:41 ` Bert Wesarg
2008-07-16 12:25 ` Mike Travis
2008-07-16 13:01 ` Mike Travis
2008-07-15 21:14 ` [PATCH 8/8] cpumask: Use optimized CPUMASK_ALLOC macros in the centrino_target Mike Travis
2008-07-18 20:04 ` [PATCH 0/8] cpumask: Replace/optimize cpumask_of_cpu & cpumask_t operations Ingo Molnar
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=48873D35.9030204@sgi.com \
--to=travis@sgi.com \
--cc=akpm@linux-foundation.org \
--cc=bunk@kernel.org \
--cc=cl@linux-foundation.org \
--cc=davej@codemonkey.org.uk \
--cc=ebiederm@xmission.com \
--cc=gnb@sgi.com \
--cc=hannes@saeurebad.de \
--cc=hpa@zytor.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=pj@sgi.com \
--cc=robert.richter@amd.com \
--cc=rusty@rustcorp.com.au \
--cc=schwab@suse.de \
--cc=steiner@sgi.com \
--cc=tglx@linutronix.de \
--cc=tigran@aivazian.fsnet.co.uk \
/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.