Re: [PATCH 1/8] cpumask: Replace cpumask_of_cpu withcpumask_of_cpu_ptr

From: Ingo Molnar
Date: Wed Jul 23 2008 - 07:21:58 EST



* Rusty Russell <rusty@xxxxxxxxxxxxxxx> 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@xxxxxxx>
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@xxxxxxx>
---
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 {

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/