Re: Question about usage of RCU in the input layer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dipankar Sarma a écrit :
> On Fri, Mar 20, 2009 at 06:28:11AM +0100, Eric Dumazet wrote:
>> Paul E. McKenney a écrit :
>> Hmm... point is to make linux boot as fast as possible, so ...
>>
>> Use a special variant of udelay() in offending drivers that make appropriate
>> RCU call to increment quiescent state ?
> 
> It may not be safe to do this it is in a RCU read-side critical section.

Yes, this is why I suggested a variant of udelay, not udelay() itself,
used by selected drivers (probably not so many drivers hog cpu so long)

void udelay_rcu_quiescent(unsigned long usecs)
{
	preempt_disable();
	rcu_qsctr_inc(smp_processor_id());
	preempt_enable();

	udelay(usecs);
}


Or maybe we have a way to detect we are in a RCU-side critical section at runtime ?

void __udelay(unsigned long usecs)
{
	if (!in_rcu_critical_section()) {
		preempt_disable();
		rcu_qsctr_inc(smp_processor_id());
		preempt_enable();
	}
	...
}


Thank you

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux