From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel@lists.xenproject.org, keir@xen.org
Subject: Re: [RFC PATCH v1] Replace tasklets with per-cpu implementation.
Date: Wed, 10 Sep 2014 12:35:49 -0400 [thread overview]
Message-ID: <20140910163549.GA16190@laptop.dumpdata.com> (raw)
In-Reply-To: <5410979D0200007800033781@mail.emea.novell.com>
On Wed, Sep 10, 2014 at 05:25:33PM +0100, Jan Beulich wrote:
> >>> On 10.09.14 at 18:03, <konrad.wilk@oracle.com> wrote:
> > +static void dpci_softirq(void)
> > +{
> > +
> > + struct domain *d;
> > + struct list_head *list;
> > + struct list_head our_list;
> > +
> > + local_irq_disable();
> > + list = &__get_cpu_var(dpci_list);
> > +
> > + INIT_LIST_HEAD(&our_list);
> > + list_splice(list, &our_list);
> > +
> > + INIT_LIST_HEAD(&__get_cpu_var(dpci_list));
> > +
> > + local_irq_enable();
> > +
> > + while (!list_empty(&our_list))
> > + {
> > + d = list_entry(our_list.next, struct domain, list);
> > + list_del(&d->list);
> > +
> > + if ( !test_and_set_bit(STATE_RUN, &(d)->state) )
> > + {
> > + if ( !test_and_clear_bit(STATE_SCHED, &d->state) )
> > + BUG();
> > + hvm_dirq_assist((unsigned long)d);
>
> You surely want to change the parameter type of that function to
> no longer need such a cast.
Duh!
>
> Also the parentheses around d (above and below) as well as the
> formatting of the while() above will need cleaning up. And the
> __get_cpu_var()s want replacing with this_cpu() or per_cpu().
Right.
>
> But apart from that it all looks quite good now. Does it also do
> what we hope it would?
Oh yes!. The test results show that this patch and the original
(" [RFC PATCH v1 1/5] tasklet: Introduce per-cpu taskle for softirq.",
see http://lists.xen.org/archives/html/xen-devel/2014-08/msg02662.html)
have the same performance effect - and make a huge improvement with
PCI passthrough.
>
> Jan
>
next prev parent reply other threads:[~2014-09-10 16:35 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-27 17:58 [RFC PATCH v1] Replace tasklets with per-cpu implementation Konrad Rzeszutek Wilk
2014-08-27 17:58 ` [RFC PATCH v1 1/5] tasklet: Introduce per-cpu tasklet for softirq Konrad Rzeszutek Wilk
2014-08-27 18:53 ` Andrew Cooper
2014-08-27 19:06 ` Konrad Rzeszutek Wilk
2014-08-28 8:17 ` Jan Beulich
2014-08-27 17:58 ` [RFC PATCH v1 2/5] tasklet: Add cross CPU feeding of per-cpu tasklets Konrad Rzeszutek Wilk
2014-08-27 17:58 ` [RFC PATCH v1 3/5] tasklet: Remove the old-softirq implementation Konrad Rzeszutek Wilk
2014-08-27 17:58 ` [RFC PATCH v1 4/5] tasklet: Introduce per-cpu tasklet for schedule tasklet Konrad Rzeszutek Wilk
2014-08-27 17:58 ` [RFC PATCH v1 5/5] tasklet: Remove the scaffolding Konrad Rzeszutek Wilk
2014-08-28 12:39 ` [RFC PATCH v1] Replace tasklets with per-cpu implementation Jan Beulich
2014-08-29 13:46 ` Konrad Rzeszutek Wilk
2014-08-29 14:10 ` Jan Beulich
2014-09-02 20:28 ` Konrad Rzeszutek Wilk
2014-09-03 8:03 ` Jan Beulich
2014-09-08 19:01 ` Konrad Rzeszutek Wilk
2014-09-09 9:01 ` Jan Beulich
2014-09-09 14:37 ` Konrad Rzeszutek Wilk
2014-09-09 16:37 ` Jan Beulich
2014-09-10 16:03 ` Konrad Rzeszutek Wilk
2014-09-10 16:25 ` Jan Beulich
2014-09-10 16:35 ` Konrad Rzeszutek Wilk [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-08-29 20:58 Arianna Avanzini
2014-09-02 20:10 ` Konrad Rzeszutek Wilk
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=20140910163549.GA16190@laptop.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=JBeulich@suse.com \
--cc=keir@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).