public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <dada1@cosmosbay.com>
To: dipankar@in.ibm.com
Cc: paulmck@linux.vnet.ibm.com,
	Arjan van de Ven <arjan@infradead.org>,
	linux-input@vger.kernel.org, dmitry.torokhov@gmail.com,
	linux-kernel@vger.kernel.org
Subject: Re: Question about usage of RCU in the input layer
Date: Fri, 20 Mar 2009 07:35:20 +0100	[thread overview]
Message-ID: <49C33928.1050806@cosmosbay.com> (raw)
In-Reply-To: <20090320060128.GC6167@in.ibm.com>

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


  reply	other threads:[~2009-03-20  6:36 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-19  4:58 Question about usage of RCU in the input layer Arjan van de Ven
2009-03-19  7:23 ` Dmitry Torokhov
2009-03-19 14:02   ` Arjan van de Ven
2009-03-19  8:56 ` Dipankar Sarma
2009-03-19 14:18   ` Arjan van de Ven
2009-03-20  2:07     ` Paul E. McKenney
2009-03-20  3:20       ` Arjan van de Ven
2009-03-20  4:45         ` Paul E. McKenney
2009-03-20  5:28           ` Eric Dumazet
2009-03-20  6:01             ` Dipankar Sarma
2009-03-20  6:35               ` Eric Dumazet [this message]
2009-03-20 13:50           ` Arjan van de Ven
2009-03-20 14:31             ` Paul E. McKenney
2009-03-20 18:13               ` Arjan van de Ven
2009-03-21  1:27                 ` Paul E. McKenney
2009-03-21  4:58                   ` Arjan van de Ven
2009-03-21 18:58                     ` Paul E. McKenney
2009-03-21 19:51                   ` Arjan van de Ven
2009-03-21 20:26                     ` Eric Dumazet
2009-03-21 21:07                       ` Paul E. McKenney
2009-03-22  3:40                         ` Arjan van de Ven
2009-03-22  4:38                           ` Paul E. McKenney
2009-03-22  4:51                             ` Arjan van de Ven
2009-03-22  5:18                               ` Paul E. McKenney
2009-03-22  5:53                                 ` Arjan van de Ven
2009-03-22 16:53                                   ` Paul E. McKenney
2009-03-22 19:46                                     ` Arjan van de Ven
2009-03-22 20:52                                       ` Paul E. McKenney
2009-03-22 22:44                                         ` Arjan van de Ven
2009-03-22 23:03                                           ` Paul E. McKenney
2009-03-22 23:16                                             ` Arjan van de Ven
2009-03-23  1:27                                               ` Paul E. McKenney
2009-04-03  1:27                                                 ` Paul E. McKenney
2009-03-21 21:13                       ` Arjan van de Ven
2009-03-20 22:21               ` Paul E. McKenney
2009-03-21  5:46         ` Dmitry Torokhov
2009-03-21  9:13           ` Eric Dumazet
2009-03-21 18:58             ` Paul E. McKenney

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=49C33928.1050806@cosmosbay.com \
    --to=dada1@cosmosbay.com \
    --cc=arjan@infradead.org \
    --cc=dipankar@in.ibm.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    /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