Re: [PATCH 2/3] x86: x2apic/cluster: Make use of lowest prioritydelivery mode

From: Ingo Molnar
Date: Mon May 21 2012 - 10:59:06 EST



* Alexander Gordeev <agordeev@xxxxxxxxxx> wrote:

> > So I think we need to tread carefully here.
>
> Kernel parameter? IRQ line flag? Totally opposed? :)

Undecided and sceptical, because: -ENONUMBERS :-)

The kernel actually tries to have as much locality as we can
hide from the user.

For example we don't execute tasks for 100 usecs on one CPU,
then jump to another CPU and execute 100 usecs there, then to
yet another CPU to create an 'absolutely balanced use of CPU
resources'. Why? Because the cache-misses would be killing us.

When a device is generating ten thousand irqs a second then
round-robining the IRQs is equivalent to switching a CPU every
100 usecs.

There's another cost: tasks tend to try to migrate to sources of
wakeups. So if an IRQ wakes up a task then we will try to
execute the task locally, to have locality of access between the
data that the IRQ handler has touched, and the task that makes
use of it. Round-robining the IRQ in that situations means that
the task either follows the IRQ and round-robins (bad), or that
it stays remote to the IRQ data (not good either).

So, I'm sceptical :-/

Your other two patches looked sensible - will they apply fine
after each other, without the round-robin patch which is still
under discussion, or is there a dependency?

Thanks,

Ingo
--
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/