Re: [PATCH] Replace completions with semaphores

From: Arjan van de Ven
Date: Wed Apr 16 2008 - 12:51:25 EST


On Wed, 16 Apr 2008 18:31:08 +0200
Oliver Neukum <oliver@xxxxxxxxxx> wrote:

> Am Mittwoch, 16. April 2008 18:16:52 schrieb Matthew Wilcox:
> > The basic idea is that you get back a cookie from the
> > kcounter_claim() which you have to hand to the kcounter_release()
> > function so it knows which one you released. ÂIt's similar to mutex
> > debugging except
>
> So in addition to the kcounter we need to save a token in a data
> structure? In fact, there must be a data structure that can house
> that token. So you can no longer live with a pointer just to a device
> descriptor, but every individual use of a resource must have an
> associated data structure?

yup. For kcounters there is a clear owner for each "slot".
[This is the part that makes it debugable again)

Now for non-debug builds, the space taken for the token can be.. zero
depending on how we define the types for it.

>
> Regards
> Oliver
>
> --
> 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/


--
If you want to reach me at my work email, use arjan@xxxxxxxxxxxxxxx
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
--
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/