From: "Yinghai Lu" <yhlu.kernel@gmail.com>
To: "Jeremy Fitzhardinge" <jeremy@goop.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
"Ingo Molnar" <mingo@elte.hu>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: TARGET_CPUS in assign_irq_vector
Date: Tue, 9 Sep 2008 18:24:03 -0700 [thread overview]
Message-ID: <86802c440809091824u715ef2a0o6dc772f66212c38f@mail.gmail.com> (raw)
In-Reply-To: <48C719C0.6060201@goop.org>
On Tue, Sep 9, 2008 at 5:50 PM, Jeremy Fitzhardinge <jeremy@goop.org> wrote:
> Yinghai Lu wrote:
>> On Tue, Sep 9, 2008 at 4:46 PM, Jeremy Fitzhardinge <jeremy@goop.org> wrote:
>>
>>> Yinghai Lu wrote:
>>>
>>>> target_cpus is the cpus that could be possible to used to take vector
>>>> and process that irq. so at least it should be online.
>>>>
>>>>
>>> Would it be wrong to make it possible_cpu_mask?
>>>
>>>
>> it is wrong
>
> What happens if you online a new cpu and migrate the irq to it? Does it
> get allocated a new vector?
for phys_flat mode: it will get new vector for on new cpu.
>
> I'm using create_irq() as a general irq and vector allocation mechanism
> for Xen interrupts. I'd like to be able to allocate a vector across all
> possible cpus so I can bind Xen event channels to vectors. Should I: 1)
> add a create_irq_cpus() which takes a cpu mask rather than defaulting to
> TARGET_CPUS, 2) modify struct genapic to insert by own target_cpus(),
> 3) give up because the idea is fundamentally ill-conceived, or 4)
> something else?
seems need to rework __assign_irq_vector a little bit.
to
cpumask_t (*vector_allocation_domain_t)(int cpu)
static int __assign_irq_vector(int irq, cpumask_t mask,
vector_allocation_domain_t p)
...
and you could have your own
static cpumask_t vec_domain_alloc(int cpu)
{
cpumask_t domain = cpu_possible_map;
return domain;
}
static int assign_irq_vector_all(int irq)
{
int err;
unsigned long flags;
cpumask_t mask = cpu_possible_map;
spin_lock_irqsave(&vector_lock, flags);
err = __assign_irq_vector(irq, mask, vec_domain_alloc);
spin_unlock_irqrestore(&vector_lock, flags);
return err;
}
YH
next prev parent reply other threads:[~2008-09-10 1:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-09 22:30 Jeremy Fitzhardinge
2008-09-09 22:54 ` Yinghai Lu
2008-09-09 23:46 ` Jeremy Fitzhardinge
2008-09-10 0:26 ` Yinghai Lu
2008-09-10 0:50 ` Jeremy Fitzhardinge
2008-09-10 1:24 ` Yinghai Lu [this message]
2008-09-10 6:45 ` Eric W. Biederman
2008-09-10 19:44 ` Jeremy Fitzhardinge
2008-09-10 20:07 ` Eric W. Biederman
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=86802c440809091824u715ef2a0o6dc772f66212c38f@mail.gmail.com \
--to=yhlu.kernel@gmail.com \
--cc=ebiederm@xmission.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®