Bug #959
closedzsleep() and serializer msgport backend
0%
Description
Hi,
http://leaf.dragonflybsd.org/~sephe/msgport_slize.diff
The above patch create:
1) zsleep(), similar to msleep(), expect serializer is involved
2) serializer msgport backend, similar to spin msgport backend, except
that serializer is involved and caller is assumed to hold serializer
Please review it.
I will need these to make Intel wireless devices work properly: use
one thread to pipeline all firmware operations. The driver uses the
serializer msgport is at:
http://leaf.dragonflybsd.org/~sephe/iwl.tbz
Best Regards,
sephe
Updated by TGEN over 16 years ago
Looks good and very useful. I can imagine all sorts of uses for drivers
with serialized interrupt handlers... I'm not sure whether 'slize' is a
well-chosen abbreviation though, but that's merely cosmetics. Good to go
imho!
Cheers,
--
Thomas E. Spanjaard
tgen@netphreax.net
Updated by corecode over 16 years ago
I thought we wanted to move to more expressive names, like
serialize_sleep() [as proposed by aggelos]?
cheers
simon
Updated by dillon over 16 years ago
:
:Sepherosa Ziehau wrote:
:> The above patch create:
:> 1) zsleep(), similar to msleep(), expect serializer is involved
:
:I thought we wanted to move to more expressive names, like
:serialize_sleep() [as proposed by aggelos]?
:
:cheers
: simon
Patch looks great. I don't mind 'slize' (though it kinda sounds like
sleeze, heheheh). serialized_ is a rather large prefix, lets try to
find something shorter. 'z' works in a crunch but it would be nice
if we could find a prefix that was in the 3-5 character range.
How about 'serlz' ?
-Matt
Matthew Dillon
<dillon@backplane.com>
Updated by aoiko over 16 years ago
Actually, it was Matt (quoting from
http://leaf.dragonflybsd.org/mailarchive/submit/2008-01/msg00016.html):
"If we're gonna start throwing around different types of sleeps maybe
we should make the names more verbose. spin_sleep(), lockmgr_sleep(),
etc. We don't use them so often that they'll clutter up the code and
the longer names will make the code more readable."
So, your point is that a short prefix is appropriate for *sleep(), but
lwkt_serialize_{enter,exit}() and friends make sense? :)
Maybe sleep with serializer is (will be) used so often zsleep() makes sense,
or maybe a one letter prefix is better for historical reasons. But on the
off chance I need to refer to such a function in a face to face conversation,
I'd prefer it to have a pronouncable name. If it's just a tiny bit consistent
with the rest of the serializer api, so much the better.
Aggelos
Updated by dillon over 16 years ago
:..
:>
:> How about 'serlz' ?
:
:So, your point is that a short prefix is appropriate for *sleep(), but
:lwkt_serialize_{enter,exit}() and friends make sense? :)
:
:Maybe sleep with serializer is (will be) used so often zsleep() makes sense,
:or maybe a one letter prefix is better for historical reasons. But on the
:off chance I need to refer to such a function in a face to face conversation,
:I'd prefer it to have a pronouncable name. If it's just a tiny bit consistent
:with the rest of the serializer api, so much the better.
:
:Aggelos
I never liked the long names for the serializer calls, but I couldn't
think of a better name.
In anycase, you are absolutely correct. If the serializer API uses
'serializer' then the sleep API ought to as well.
-Matt
Matthew Dillon
<dillon@backplane.com>
Updated by TGEN over 16 years ago
That reminds me of the awful 'brelse', 1. What's the issue with long
names, besides not fitting in wchan?
-
Thomas E. Spanjaard
tgen@netphreax.net
Updated by c.turner over 16 years ago
Matthew Dillon wrote:
>
How about 'serlz' ?
slz_ ?