Re: [PATCH][RFT] noirqbalance still doesn't do anything

Martin J. Bligh (mbligh@aracnet.com)
Fri, 07 Mar 2003 00:02:22 -0800


> I didn't get a response to my other patch to do this so i'm guessing that
> people want a simpler patch(??) This one simply sets TARGET_CPUS to
> cpu_callout_map instead of cpu_online_map so that when we finally do boot
> we actually use the other cpus for servicing interrupts.

Actually, I think your first patch is correct. TARGET_CPUS seems like the
wrong thing to be changing (for example, if we take a CPU offline later)
However, doesn't this:

> +/*
> + * This function currently is only a helper for the i386 smp boot process where
> + * we need to reprogram the ioredtbls to cater for the cpus which have come online
> + * so mask in all cases should simply be TARGET_CPUS
> + */
> +void __devinit set_ioapic_logical_dest (unsigned long mask)
> +{
> + struct IO_APIC_route_entry entry;
> + unsigned long flags;
> + int apic, pin;
> +
> + spin_lock_irqsave(&ioapic_lock, flags);
> + for (apic = 0; apic < nr_ioapics; apic++) {
> + for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) {
> + *(((int *)&entry)+0) = io_apic_read(apic, 0x10+pin*2);
> + *(((int *)&entry)+1) = io_apic_read(apic, 0x11+pin*2);
> + entry.dest.logical.logical_dest = mask;
> + io_apic_write(apic, 0x10 + 2 * pin, *(((int *)&entry) + 0));
> + io_apic_write(apic, 0x11 + 2 * pin, *(((int *)&entry) + 1));
> + }
> +
> + }
> + spin_unlock_irqrestore(&ioapic_lock, flags);
> +}

do more or less the same as set_ioapic_affinity? And even if not, don't
you have to do "mask << 24" instead of "mask" ... or am I just confused?

M.

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