lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <48DF0EFA.1010904@goop.org>
Date:	Sat, 27 Sep 2008 21:58:34 -0700
From:	Jeremy Fitzhardinge <jeremy@...p.org>
To:	Ingo Molnar <mingo@...e.hu>
CC:	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Yinghai Lu <yhlu.kernel@...il.com>
Subject: Re: Should irq_chip->mask disable percpu interrupts to all cpus,
 or just to this cpu?

Ingo Molnar wrote:
> * Eric W. Biederman <ebiederm@...ssion.com> wrote:
>
>   
>> Jeremy Fitzhardinge <jeremy@...p.org> writes:
>>
>>     
>>> I found handle_percpu_irq() which addresses my concerns.  It doesn't
>>> attempt to mask the interrupt, takes no locks, and doesn't set or test
>>> IRQ_INPROGRESS in desc->status, so it will scale perfectly across
>>> multiple cpus.  It makes no changes to the desc structure, so there
>>> isn't even any cacheline bouncing.
>>>       
>> kstat_irqs.  Is arguably part of the irq structure.
>> And kstat_irqs is a major pain in my book.
>>
>> And for a rare event you have a cacheline read.
>> I don't think we are quite there yet but we really want to allocate
>> irq_desc on the right NUMA node in a multi socket system, to reduce
>> the cache miss times.
>>     
>
> note that we already do _almost_ that in tip/irq/sparseirq. dyn_array[] 
> will extend itself in a NUMA-aware fashion. (normal device irq_desc 
> entries will be allocated via kmalloc)
>
> what would be needed is to deallocate/reallocate irq_desc when the IRQ 
> affinity is changed? (i.e. when a device is migrated to a specific NUMA 
> node)
>
>   
>> Is it a big deal?  Probably not.  But I think it would be a bad idea 
>> to increasingly use infrastructure that will make it hard to optimize 
>> the code.
>>
>> Especially since the common case in high performance drivers is going 
>> to be, individually routable irq sources.  Having one queue per cpu 
>> and one irq per queue.  Which sounds like the same case you have.
>>     
>
> agreed - the kstat_irqs cacheline bounce would show up in Xen benchmarks 
> i'm sure.
>   

I've put that approach aside anyway, since I couldn't get it to work
after a day of fiddling and I didn't want to waste too much time on it. 
I've just restricted myself to avoiding the normal interrupt delivery
path, and going direct from event channel to irq to desc->handler.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ