Subject: Re: workqueue(9), per-CPU queues [was: Re: soc zfs: taskqueue /
To: None <rmind@NetBSD.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 07/11/2007 21:50:19
> yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi) wrote:
> > - i'm not happy with iterating a list on each enqueue operations.
> >   probably it's ok for now, but, at least, please make it a function
> >   rather than having two copies.
> Inline it?

just let a compiler decide?

> >   for long term, probably it's useful to have "dense" cpuid which can be
> >   used as an array index.
> I was thinking how to make it friendly for dynamic CPU attaching/detaching,
> and considered ci->ci_cpuid. But AFAIK, currently, it is not OK to use it as
> an array index, is it?

iirc, right, ci_cpuid can be sparse.

> > - why s/kmem_alloc/kmem_zalloc/ ?
> To make sure, that structure will always be zeroed.
> 
> > - why removed the check of kmem_alloc failure?
> >   iirc, at least currently, it can fail.
> It has KM_SLEEP flag. How can it fail?

i forgot details.  on kva starvation?

> > - i doubt if it's worth to have a pool for workqueue_queue.
> You would suggest to use kmem?

yes.

> In general - are you OK with the patch?

yes.

YAMAMOTO Takashi