Re: [PATCH 5/7] irq_work: Don't stop the tick with pending works

From: Frederic Weisbecker
Date: Thu Nov 15 2012 - 10:38:38 EST


2012/11/15 Steven Rostedt <rostedt@xxxxxxxxxxx>:
> On Wed, 2012-11-14 at 21:37 +0100, Frederic Weisbecker wrote:
>> diff --git a/kernel/irq_work.c b/kernel/irq_work.c
>> index 64eddd5..b3c113a 100644
>> --- a/kernel/irq_work.c
>> +++ b/kernel/irq_work.c
>> @@ -99,6 +99,17 @@ bool irq_work_queue(struct irq_work *work)
>> }
>> EXPORT_SYMBOL_GPL(irq_work_queue);
>>
>> +bool irq_work_needs_cpu(void)
>> +{
>> + struct llist_head *this_list;
>> +
>> + this_list = &__get_cpu_var(irq_work_list);
>> + if (llist_empty(this_list))
>> + return false;
>> +
>
> I wounder if this should just be:
>
> return !llist_empty(&this_cpu_read(irq_work_list));

Yeah I'll simplify that way.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/