From: Julien Grall <julien.grall@linaro.org>
To: Anup Patel <anup.patel@linaro.org>
Cc: Ian Campbell <Ian.Campbell@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
patches <patches@apm.com>, xen-devel <xen-devel@lists.xen.org>,
"stefano.stabellini" <stefano.stabellini@citrix.com>,
Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
Subject: Re: [PATCH] xen/arm: minor improvement in smp_send_call_function_mask()
Date: Wed, 20 Aug 2014 10:07:32 -0500 [thread overview]
Message-ID: <53F4B9B4.5090303@linaro.org> (raw)
In-Reply-To: <CALrVBku4D6NVrAQkry0JqN5ongvc6ko77QOdh_238tYU=_Dhbw@mail.gmail.com>
On 20/08/14 01:14, Anup Patel wrote:
>> Is it necessary? What happen if Xen tries to send an SGI with an empty mask?
>
> If Xen tries to send SGI with empty mask then target_mask will be empty
> hence cpumask_weight(&target_mask) will return 0
The GIC documentation says:
"If this field is 0x00 when TargetListFilter is 0b00 , the Distributor
does not forward the interrupt to any
CPU interface."
TargetListFilter == 0b00 => Forward interrupt to a specific list of CPUs.
>>
>> AFAIU, the function cpumask_weight is complex so if we can avoid it, it
>> would be better.
>
> Can you explain more about how cpumask_weight is complex ??
cpumask_weight contains a loop and multiple addition. I doubt the case
where the mask only contains the current cpu happens often.
As the GIC won't forward the interrupt if the list of CPUs is empty, I
don't think it's worth to add this check.
> Other alternative is to use "cpumask_first(&target_mask) != NR_CPUS".
The best alternative would be cpumask_empty.
Regards,
--
Julien Grall
next prev parent reply other threads:[~2014-08-20 15:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-19 4:48 [PATCH] xen/arm: minor improvement in smp_send_call_function_mask() Anup Patel
2014-08-19 21:06 ` Julien Grall
2014-08-20 6:14 ` Anup Patel
2014-08-20 15:07 ` Julien Grall [this message]
2014-08-21 11:04 ` Anup Patel
2014-08-21 16:54 ` Julien Grall
2014-08-21 17:22 ` Andrew Cooper
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=53F4B9B4.5090303@linaro.org \
--to=julien.grall@linaro.org \
--cc=Ian.Campbell@citrix.com \
--cc=anup.patel@linaro.org \
--cc=patches@apm.com \
--cc=pranavkumar@linaro.org \
--cc=stefano.stabellini@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
/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.