lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <487D98AC.3020005@kernel.org>
Date:	Wed, 16 Jul 2008 15:43:56 +0900
From:	Tejun Heo <tj@...nel.org>
To:	Peter Zijlstra <peterz@...radead.org>
CC:	dipankar@...ibm.com, Andrew Morton <akpm@...ux-foundation.org>,
	Jens Axboe <jens.axboe@...cle.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Paul E McKenney <paulmck@...ux.vnet.ibm.com>,
	Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH] RCU: implement rcu_read_[un]lock_preempt()

Peter Zijlstra wrote:
> On Mon, 2008-07-14 at 14:57 +0900, Tejun Heo wrote:
>> With the introduction of preemptible RCU, RCU doesn't gurantee that
>> its critical section runs on the CPU it started to run.  As there are
>> cases where non-preemptible RCU critical section makes sense, create
>> new RCU read lock variants which turns of preemption -
>> rcu_read_[un]lock_preempt() which are identical to rcu_read_[un]lock()
>> for classic implementation and have enclosing preempt disable/enable
>> for preemptible RCU.
>>
>> Signed-off-by: Tejun Heo <tj@...nel.org>
> 
> Sorry, NAK.
> 
> If you need preempt off you need it for other reasons than RCU, so
> mixing it in the interface doesn't make sense to me.

Hmmm... the point of the interface is avoiding doing double preemption
operations as on common configurations rcu_read_lock() disables
preemption.  Yes, it's for different purposes but we have two partially
overlapping ops and implementing combined / collapsed ops for such cases
is acceptable, I think.

Using get_cpu() or separate preempt_disable() wouldn't incur noticeable
performance difference as preemption is really cheap to manipulate but
both per-cpu and RCU are for performance optimization and I think having
combined ops is a good idea.

I wonder what other people think.  If it's agreed that having combined
ops is a bad idea, I'll convert it to get_cpu().

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ