[Ksummit-2008-discuss] topic proposal
Roland Dreier
rdreier at cisco.com
Wed Aug 27 08:19:13 PDT 2008
> > Take a look at, say, drivers/net/mlx4/cmd.c. That uses a semaphore to
> > count how many firmware commands are outstanding, and block until a
> > command completes when the maximum number of commands are already
> > queued. Which of your cases does that fall into? It's not a mutex,
> > it's not a completion, and I really don't think it's anything that's
> > wild or un-maintainable.
> The poll_sem looks like a mutex, and the event_sem falls into the same
> case as what I outlined to Greg, which would be a completion (with some
> modifications to completions) ..
Except that poll_sem can't be converted to a mutex because it is
locked/unlocked from different threads. And it's not clear to me what
the advantage of changing event_sem to a counting completion would be,
even if such objects were implemented -- how does a counting completion
differ from a semaphore really?
- R.
More information about the Ksummit-2008-discuss
mailing list