From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
"Keir (Xen.org)" <keir@xen.org>
Subject: Re: [PATCH 1/2] IRQ: allocate CPU masks dynamically
Date: Thu, 3 Nov 2011 16:02:10 +0000 [thread overview]
Message-ID: <4EB2BB02.5030107@citrix.com> (raw)
In-Reply-To: <4EB2C688020000780005ECDF@nat28.tlf.novell.com>
On 03/11/11 15:51, Jan Beulich wrote:
>>>> On 03.11.11 at 16:43, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
>> On 03/11/11 15:17, Jan Beulich wrote:
>>>>>> On 03.11.11 at 15:49, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
>>>> On 03/11/11 14:26, Jan Beulich wrote:
>>>>> IRQ: allocate CPU masks dynamically
>>>>>
>>>>> This includes delaying the initialization of dynamically created IRQs
>>>>> until their actual first use and some further elimination of uses of
>>>>> struct irq_cfg.
>>>>>
>>>>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>>>> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
>>>>
>>>> One query which may or may not affect the patch. Would we get better
>>>> caching characteristics if all cpumasks were allocated in consecutive
>>>> memory, rather than having 3 individual allocs in arch_init_one_irq_desc ?
>>> That was what the first version of the patch did, rejected by Keir
>>> (and not liked too much by me either).
>>>
>>> Jan
>> My understanding of the objection was hiding the variables themselves as
>> an array in the code.
>>
>> An alternative approach such as alloc'ing 3*sizeof(cpu mask) (cache
>> aligned) and assigning the relevant pointers to the current
>> cpumask_var_t's would be a suitable approach which causes the cpumasks
>> to be in contiguous memory, but not changing how they are referenced in
>> the code.
> That would mean just open-coding what the former patch did by
> abstraction. In my opinion that is even worse - either we want a
> generally usable mechanism to do this, or we don't do it at all.
>
> Jan
That is an interesting point, but I dont think it is worse.
There are very few cases where we want to be doing this, so open coding
is not too bad. With a comment explaining why, I would have thought it
would be fine.
--
Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer
T: +44 (0)1223 225 900, http://www.citrix.com
next prev parent reply other threads:[~2011-11-03 16:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-03 14:26 [PATCH 1/2] IRQ: allocate CPU masks dynamically Jan Beulich
2011-11-03 14:49 ` Andrew Cooper
2011-11-03 15:17 ` Jan Beulich
2011-11-03 15:43 ` Andrew Cooper
2011-11-03 15:51 ` Jan Beulich
2011-11-03 16:02 ` Andrew Cooper [this message]
2011-11-03 16:13 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EB2BB02.5030107@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=keir@xen.org \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.