[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 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.

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().

But apart from that it all looks quite good now. Does it also do
what we hope it would?

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.