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] [thread-next>] [day] [month] [year] [list]
Message-ID: <492D9668.1030904@kernel.org>
Date:	Wed, 26 Nov 2008 10:33:12 -0800
From:	Yinghai Lu <yinghai@...nel.org>
To:	Ingo Molnar <mingo@...e.hu>
CC:	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] irq: sparseirq enabling v2

Ingo Molnar wrote:
> * Yinghai Lu <yinghai@...nel.org> wrote:
> 
>> Ingo Molnar wrote:
>>> * Yinghai Lu <yinghai@...nel.org> wrote:
>>>
>>>> impact: new feature sparseirq
>>>> v2: use pointer array instead of hash
>>> ok, this looks pretty good!
>>>
>>> A few details:
>>>
>>>> +#ifdef CONFIG_SPARSE_IRQ
>>>> +#define set_ioapic_affinity_irq set_ioapic_affinity_irq_desc
>>>> +#else
>>>> +static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t mask)
>>>> +{
>>>> +	struct irq_desc *desc;
>>>> +
>>>> +	desc = irq_to_desc(irq);
>>>> +
>>>> +	set_ioapic_affinity_irq_desc(desc, mask);
>>>> +}
>>>> +#endif
>>> i think this distinction can now go away?.
>> i may miss sth in your previous mail. you said we may put full hash 
>> back later, so need keep those change to avoid lookup costs later.
> 
> full hash as in no NR_IRQS limit?

32 bit irqs.

> 
> I dont think that's a good idea even in the far future: we can always 
> make NR_IRQS large enough, and turn the current array-of-pointers into 
> array-of-arrays-of-pointers scheme or an outright hash - but without 
> losing the fundamental abstraction that it's a 0..NR_IRQS array (just 
> accessed abstractly).

> 
>> also if we need move_irq_desc between node?
> 
> i'm not sure i understand. Do you mean we should deallocate and 
> reallocate the irq_desc to another node?

yes. the patch 2/2. [PATCH 2/2] irq: move irq_desc according to smp_affinity v2

> 
>>>> +#ifdef CONFIG_SPARSE_IRQ
>>>> +	irq_want = nr_irqs;
>>>> +#else
>>>> +	irq_want = NR_IRQS - 1;
>>>> +#endif
>>> ditto. I think we dont want 'nr_irqs' anymore - just remain with 
>>> NR_IRQS, right?
>>>
>> nr_irqs is the total GSI number when sparseirq is used. so MSI irq 
>> will start from that. ...
> 
> ah, okay. I think we should renumber MSIs to the scheme Thomas 
> suggested, independently of CONFIG_SPARSE_IRQ.

good, will add one local nr_irqs_gsi there..., and not touch nr_irqs.

> 
> CONFIG_SPARSE_IRQ should _only_ impact the irq_desc[] data structure: 
> it turns from a flat C array of irq_desc into an array of irq_desc 
> pointers.
> 
> No other semantic changes. Possibly all hidden away completely in the 
> irq-desc-array accessors.

YH
--
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