Project

General

Profile

Actions

Bug #959

closed

zsleep() and serializer msgport backend

Added by sepherosa about 16 years ago. Updated about 16 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

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

Actions #1

Updated by TGEN about 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

Actions #2

Updated by corecode about 16 years ago

I thought we wanted to move to more expressive names, like
serialize_sleep() [as proposed by aggelos]?

cheers
simon

Actions #3

Updated by dillon about 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
<>
Actions #4

Updated by aoiko about 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

Actions #5

Updated by dillon about 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
<>
Actions #6

Updated by TGEN about 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

Actions #7

Updated by c.turner about 16 years ago

Matthew Dillon wrote:
>

How about 'serlz' ?

slz_ ?

Actions

Also available in: Atom PDF