From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: question about disabling interrupts for workqueue pool? Date: Tue, 25 Jun 2013 16:01:29 -0700 Message-ID: <20130625230129.GA30407@mtj.dyndns.org> References: <1372200754.18733.236.camel@gandalf.local.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: LKML , RT , Thomas Gleixner , Sebastian Andrzej Siewior , Clark Williams , "Paul E. McKenney" To: Steven Rostedt Return-path: Received: from mail-pb0-f45.google.com ([209.85.160.45]:48827 "EHLO mail-pb0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751005Ab3FYXBd (ORCPT ); Tue, 25 Jun 2013 19:01:33 -0400 Content-Disposition: inline In-Reply-To: <1372200754.18733.236.camel@gandalf.local.home> Sender: linux-rt-users-owner@vger.kernel.org List-ID: Hello, Steven. On Tue, Jun 25, 2013 at 06:52:34PM -0400, Steven Rostedt wrote: > Now my question is, are those local_irq_*() calls just for synchronizing > with sched RCU? If so, can you use rcu_read_lock_sched() instead? Hmmm... using local_irq_disable/enable() is more consistent as irq-safe locks are used widely in workqueue. Also, using rcu_read_lock_sched() would mean that we'll have spin_lock_irq_save/restore() nested inside preempt_disable/enable(), which is a bit silly in upstream kernel. That said, both paths you pointed out are rather cold, so I don't think it'd matter. Please feel free to send a patch with comment explaining why local irq flipping, which fits better there, isn't being used. Thanks. -- tejun