Re: [patch 00/62] sem2mutex: -V1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2006-01-14 at 14:16 +0100, Ingo Oeser wrote:
> On Friday 13 January 2006 20:56, Ingo Molnar wrote:
> > * Ingo Oeser <[email protected]> wrote:
> > > On Friday 13 January 2006 14:44, Ingo Molnar wrote:
> > > Could we get for each of these and a mutex:
> > > 
> > >  - description 
> > >  - common use case
> > >  - small argument why this and nothing else should be used there
> > 
> > like ... Documentation/mutex-design.txt?
> 
> Much simpler. 
> 
> Take your favorite conversion 

ok the most simple case is really simple.

ALL uses of it have a down() ..... ip() scenario, where all down's are
matched with up's in the same function, no trylocks in sight.

That case is the simple (and most common) case. Since it uses down()
only, it can't be irq context. (trylock could be a sign of irq context
use), and all up()'s are 1) not in irq context either because they're in
the same function as the down() which isn;t and 2) perfectly matched to
the down(), eg each down gets one up ---> perfect semaphore.


The other case on the other side of the spectrum is a down in one
function and an up in an irq function. Which is a pretty good sign of a
completion.... (same is true for a specific scenario where kernel thread
creation is involved and the up() is done in the just created thread).



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux