From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Ian Campbell <Ian.Campbell@eu.citrix.com>,
xen-devel <xen-devel@lists.xenproject.org>,
Keir Fraser <keir@xen.org>,
Ian Jackson <Ian.Jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>
Subject: Re: [PATCH 2/2] x86/HVM: batch vCPU wakeups
Date: Thu, 11 Sep 2014 12:11:46 +0100 [thread overview]
Message-ID: <54118372.4000202@citrix.com> (raw)
In-Reply-To: <54119D850200007800033CBD@mail.emea.novell.com>
On 11/09/14 12:03, Jan Beulich wrote:
>>>> On 11.09.14 at 12:48, <andrew.cooper3@citrix.com> wrote:
>> On 11/09/14 10:40, Jan Beulich wrote:
>>> void cpu_raise_softirq(unsigned int cpu, unsigned int nr)
>>> {
>>> - if ( !test_and_set_bit(nr, &softirq_pending(cpu))
>>> - && (cpu != smp_processor_id())
>>> - && !arch_skip_send_event_check(cpu) )
>>> + unsigned int this_cpu = smp_processor_id();
>>> +
>>> + if ( test_and_set_bit(nr, &softirq_pending(cpu))
>>> + || (cpu == this_cpu)
>>> + || arch_skip_send_event_check(cpu) )
>>> + return;
>>> +
>>> + if ( !per_cpu(batching, this_cpu) || in_irq() )
>>> smp_send_event_check_cpu(cpu);
>>> + else
>>> + set_bit(nr, &per_cpu(batch_mask, this_cpu));
>> Under what circumstances would it be sensible to batch calls to
>> cpu_raise_softirq()?
>>
>> All of the current callers are singleshot events, and their use in a
>> batched period would only be as a result of a timer interrupt, which
>> bypasses the batching.
> You shouldn't be looking at the immediate callers of
> cpu_raise_softirq(), but at those much higher up the stack.
> Rooted at vlapic_ipi(), depending on the scheduler you might
> end up in credit1's __runq_tickle() (calling cpumask_raise_softirq())
> or credit2's runq_tickle() (calling cpu_raise_softirq()).
>
> Jan
>
Ah true, which is valid to batch.
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
next prev parent reply other threads:[~2014-09-11 11:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-11 9:36 [PATCH 0/2] x86: improve remote CPU wakeup Jan Beulich
2014-09-11 9:40 ` [PATCH 1/2] x86: suppress event check IPI to MWAITing CPUs Jan Beulich
2014-09-11 10:02 ` Andrew Cooper
2014-09-11 10:07 ` Jan Beulich
2014-09-11 10:09 ` Andrew Cooper
2014-09-11 10:26 ` Jan Beulich
2014-09-11 9:40 ` [PATCH 2/2] x86/HVM: batch vCPU wakeups Jan Beulich
2014-09-11 10:48 ` Andrew Cooper
2014-09-11 11:03 ` Jan Beulich
2014-09-11 11:11 ` Andrew Cooper [this message]
2014-09-18 10:59 ` [PATCH 0/2] x86: improve remote CPU wakeup Tim Deegan
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=54118372.4000202@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Ian.Campbell@eu.citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=keir@xen.org \
--cc=tim@xen.org \
--cc=xen-devel@lists.xenproject.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).