Re: [PATCH] PPP synchronous tty: convert dead_sem to completion

From: Matthias Kaehlcke
Date: Sun Dec 09 2007 - 14:53:20 EST


El Sun, Dec 09, 2007 at 12:04:48PM -0500 Charlie Brady ha dit:

>
> On Sat, 8 Dec 2007, Matthias Kaehlcke wrote:
>
>> PPP synchronous tty channel driver: convert the semaphore dead_sem to
>> a completion
>>
>> Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@xxxxxxxxx>
>
> Excuse my ignorance please, but why is this a good idea? Should we not
> record the reason for changes?

Semaphores can be used to signal completion of a job, but aren't the
optimal way to do so. According to LDD3 semaphores are optimized for
the 'available' case and performance suffers when using them as
completion.

It is also clearer to use each synchronization mechanism according to
its purpose, i.e. semaphores for protection of critical sections and
completions for signalling that a job is done.

--
Matthias Kaehlcke
Linux System Developer
Barcelona

You can't separate peace from freedom because no
one can be at peace unless he has his freedom
(Malcolm X)
.''`.
using free software / Debian GNU/Linux | http://debian.org : :' :
`. `'`
gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4 `-
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/