Re: [PATCH] Replace completions with semaphores

From: Arjan van de Ven
Date: Wed Apr 16 2008 - 13:12:47 EST


On Wed, 16 Apr 2008 10:58:11 -0600
Matthew Wilcox <matthew@xxxxxx> wrote:

> On Wed, Apr 16, 2008 at 09:50:26AM -0700, Arjan van de Ven wrote:
> > 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.
>
> Hm. That might be worth changing the API for. Right now, I'm
> overloading the return value of kcounter_claim with an errno and a
> cookie. Maybe we should go for:
>
> extern int __must_check kcounter_claim(struct kcounter *kc,
> kcounter_cookie_t *resource);
>
> with the return value being 0 or errno and on success, kcounter_claim
> writes a cookie to 'resource'?

or we return a cookie, and define some sort of "cookie_is_error()" thing

>


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