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: <86802c441001041103s5abd6d3ai4e6ccbfc68323f3c@mail.gmail.com>
Date:	Mon, 4 Jan 2010 11:03:02 -0800
From:	Yinghai Lu <yinghai@...nel.org>
To:	"Eric W. Biederman" <ebiederm@...ssion.com>
Cc:	Jesse Brandeburg <jesse.brandeburg@...il.com>,
	Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	NetDEV list <netdev@...r.kernel.org>,
	Jesse Brandeburg <jesse.brandeburg@...el.com>
Subject: Re: [PATCH 2/2] x86: get more exact nr_irqs

On Mon, Jan 4, 2010 at 8:55 AM, Eric W. Biederman <ebiederm@...ssion.com> wrote:
> Yinghai Lu <yinghai@...nel.org> writes:
>
>> first check with NR_VECTORS - FIRST_EXTERNAL_VECTOR - 0x20
>> aka minus exceptions and system vectors.
>>
>> NR_CPUS = 512, and nr_cpu_ids = 128
>> will have NR_IRQS = 256 + 512 * 64 = 33024
>>
>> assume we have 20 intel ixgbe 6 port cards (with sriov and ixgbevf)
>>       20 * 6 * 64 * 3 = 23040
>>
>> first will get:
>>       128 * (256 - 64) = 24576
>> then with nr_irqs_gsi will get
>>       (120 + 8 * 128 + 120 * 256) = 31864
>>
>> so 24576 will be used for nr_irqs.
>>
>> 24576 * 8 = 196608 bytes will be used for irq_desc_ptrs[]
>>
>> before this patch:
>>     have nr_irqs = 120 + 8 * 128 + 120 * 64 = 8824
>>       and irq_desc_ptrs[] is 70592
>>
>> Signed-off-by: Yinghai Lu <yinghai@...nel.org>
>
> I am lost.    arch_probe_nr_irqs appears to be total nonsense.
>
> We have three concepts.
> - The number of irq sources we can talk about.  ( nr_irqs)
> - The number of irqs we can possibly service.   ((NR_VECTORS - 0x30) *nr_cpu_ids)
> - The number of irqs we actually connected up to cards in the
>  system that we need to do something with.
>
> Why do we need to allocate arrays at all?
>

irq_desc is allocated dynamically.

but irq_desc_ptrs is pointer array, it need to be allocated after
nr_irqs is probed.

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