Re: RT and XFS

From: Ingo Molnar
Date: Tue Jul 19 2005 - 08:53:03 EST



* Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:

> On Tue, Jul 19, 2005 at 02:34:57PM +0200, Ingo Molnar wrote:
> > (I do disagree with Christoph on another point: i do think we eventually
> > want to change the standard semaphore type in a similar fashion upstream
> > as well - but that probably has to come with a s/struct semaphore/struct
> > mutex/ change as well.)
>
> Actually having a mutex_t in mainline would be a good idea even
> without preempt rt, to document better what kind of locking we expect.

cool! I'll cook up a patch for that. Right now these are the numbers:
there are 526 uses of struct semaphore in 2.6.12. In the -RT tree i had
to change 23 of them to be compat_semaphore - i.e. 23 uses were
definitely non-mutex.

(We sure have missed some cases - but it would be fair to say that the
expected number of cases is less than 50, and that we've mapped the most
common ones already. That makes it a 90%/10% splitup: more than 90% of
all struct semaphore use is pure mutex.)

Of the remaining <10% cases, the majority is of the type of completions,
and there are a handful of (<10) cases of 'counted semaphore' uses:
semaphores with a count larger than 1. (e.g. ACPI uses it to count
resources, some audio code too - but it's very rare) Btw., that's the
only 'true' (in terms of CS) semaphore use.

Ingo
-
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/