lkml.org 
[lkml]   [2008]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] X86: Change the default value of nr_irqs from 32 to NR_IRQs
On Tue, Aug 19, 2008 at 12:50 PM, Alex Nixon <alex.nixon@citrix.com> wrote:
> Yinghai Lu wrote:
>>
>> On Tue, Aug 19, 2008 at 11:32 AM, Alex Nixon <alex.nixon@citrix.com>
>> wrote:
>>>
>>> Yinghai Lu wrote:
>>>>
>>>> On Tue, Aug 19, 2008 at 11:13 AM, Alex Nixon (Intern)
>>>> <Alex.Nixon@citrix.com> wrote:
>>>>>
>>>>> Yinghai Lu <yhlu.kernel@gmail.com> wrote:
>>>>>>
>>>>>> On Tue, Aug 19, 2008 at 9:55 AM, Alex Nixon <alex.nixon@citrix.com>
>>>>>> wrote:
>>>>>>>
>>>>>>> If the number of discovered IRQs is suspiciously low, this patch
>>>>>>> causes
>>>>>>> the number reported to default to NR_IRQS, rather than 32. NR_IRQS
>>>>>>> has
>>>>>>> already been defined to be a >sensible value for the current system
>>>>>>> (in
>>>>>>> particular, at least 224 when paravirtualisation is involved).
>>>>>>>
>>>>>> if only one ioapic, nr will be 24<<1, you will get 48. Does pv has io
>>>>>> apic
>>>>>> ?
>>>>>>
>>>>>> YH
>>>>>>
>>>>> I'm not sure about the general case, but Xen does not (Jeremy correct
>>>>> me
>>>>> if
>>>>> I'm wrong).
>>>>>
>>>>> Unless I'm missing something (which I may well be; I'm new to this area
>>>>> of
>>>>> code), it seems more logical anyway to default back to the calculated
>>>>> system-specific value (NR_IRQS), instead of 32, which seems rather
>>>>> arbitrary.
>>>>
>>>> can you try !CONFIG_HAVE_SPARSE_IRQ and CONFIG_HAVE_SPARSE_IRQ ?
>>>>
>>>> YH
>>>
>>> Sorry I should have mentioned originally - the bug occurs both with
>>> CONFIG_HAVE_SPARSE_IRQ enabled, and disabled.
>>
>> maybe we need special probe_nr_irqs for PV or not call that in
>> setup_arch for xen -- it will leave nr_irqs == NR_IRQS
>>
>> YH
>
> That would be one solution, but would be more involved than this trivial
> patch (although if considered more 'correct' then it is of course worth the
> effort).
> But attempting to keep things simple, is there a reason it's preferable to
> fall back to 32 rather NR_IRQS?

when !CONFIG_HAVE_SPARSE_IRQ, with dyn_array, could allocate irq_desc
and etc as less as possible.
when CONFIG_HAVE_SPARESE_IRQ, no actually meaning for nr_irqs.

YH


\
 
 \ /
  Last update: 2008-08-19 22:55    [W:0.097 / U:0.580 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site