login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
October
»
11
Re: [patch 1/5] wait: use lock bitops for __wait_on_bit_lock
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From:
Pavel Machek <pavel@...>
To: Nick Piggin <nickpiggin@...>
Cc: Andrew Morton <akpm@...>, <linux-kernel@...>
Subject:
Re: [patch 1/5] wait: use lock bitops for __wait_on_bit_lock
Date: Thursday, October 11, 2007 - 4:56 pm
Hi!
quoted text
> > Sorry, I'm just not going to apply a patch like that. > > > > I mean, how the heck is anyone else supposed to understand what you're up > > to? > > Hmm, I might just withdraw this patch 1/5. This is generally a slowpath, > and it's hard to guarantee that any exported user doesn't rely on the > full barrier here (not that they would know whether they do or not, let > alone document the fact). > > I think all the others are pretty clear, though? (read on if no)
...
quoted text
> > There's a bit of documentation in Documentation/atomic_ops.txt > > (probably enough, I guess) but it is totally unobvious to 98.3% of kernel > > developers when they should use test_and_set_bit() versus > > test_and_set_bit_lock() and it is far too much work to work out why it was > > used in __wait_on_bit_lock(), whether it is correct, what advantages it > > brings and whether and where others should emulate it. > > If you set a bit for the purpose of opening a critical section, then > you can use this. And clear_bit_unlock to close it. > > The advantages are that it is faster, and the hapless driver writer > doesn't have to butcher or forget about doing the correct > smp_mb__before_clear_bit(), or have reviewers wondering exactly WTF > that barrier is for, etc.
Actually, I'd expect *_lock() ro be slower than *()...
quoted text
> Basically, it is faster, harder to get wrong, and more self-docuemnting.
So I'd not call it self-documenting. -- (english)
http://www.livejournal.com/~pavelmachek
(cesky, pictures)
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[patch 1/5] wait: use lock bitops for __wait_on_bit_lock
,
, (Wed Oct 24, 4:13 am)
Re: [patch 1/5] wait: use lock bitops for __wait_on_bit_lock
, Andrew Morton
, (Wed Oct 24, 9:14 pm)
Re: [patch 1/5] wait: use lock bitops for __wait_on_bit_lock
, Nick Piggin
, (Wed Oct 24, 10:17 pm)
Re: [patch 1/5] wait: use lock bitops for __wait_on_bit_lock
, Pavel Machek
, (Thu Oct 11, 4:56 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg Kroah-Hartman
[PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO
Tarkan Erimer
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Christoph Lameter
[00/41] Large Blocksize Support V7 (adds memmap support)
Linus Torvalds
Linux 2.6.27-rc5
git
:
linux-netdev
:
David Miller
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
David Miller
[GIT]: Networking
Gerrit Renker
[PATCH 15/37] dccp: Set per-connection CCIDs via socket options
Nick Piggin
Re: Mainline kernel OLTP performance update
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
1 user
and
1038 guests
online.
Online users
mycarinsura
Syndicate