|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC PATCH v1] Replace tasklets with per-cpu implementation.
On Wed, Sep 10, 2014 at 05:25:33PM +0100, Jan Beulich wrote:
> >>> On 10.09.14 at 18:03, <konrad.wilk@xxxxxxxxxx> 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
>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |