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 002/196] Chinese: rephrase English introduction in HOWTO
Kok, Auke
Re: Linux 2.6.21-rc1
Greg KH
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Jeff Garzik
Re: [Patch v2] Make PCI extended config space (MMCONFIG) a driver opt-in
git
:
linux-netdev
:
David Miller
[GIT]: Networking
Gerrit Renker
[PATCH 15/37] dccp: Set per-connection CCIDs via socket options
Jarek Poplawski
[PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Eric Dumazet
[PATCH] net: remove superfluous call to synchronize_net()
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
6 users
and
782 guests
online.
Online users
bestlaptopbags
sharon0610
jhitch6
qq1035886355
altabusrrty
bowiehunti14
Syndicate