On Wed, Nov 11, 2009 at 09:38:17AM -0500, James Carlson wrote:
> Blake Jones wrote:
> >> Is this new class usable only by ZFS, or is it potentially usable by
> >> other kernel tasks as well?  It looks to me like it could be used to
> >> make work done by networking squeues and STREAMS service procedures more
> >> observable.
> > 
> > It is potentially usable by other kernel tasks.  There is nothing
> > ZFS-specific about the class right now, although it makes some very mild
> > assumptions about the characteristics of ZFS' workload (e.g. that it's
> > processing many fairly small tasks, rather than a few large ones).
> > These assumptions basically just have performance implications, rather
> > than correctness ones, and changing them would be fairly straightforward
> > -- on the order of adding of a new flag to an interface -- but we didn't
> > do so because there were no other current consumers of such
> > generalization.
> 
> Nifty; thanks!  It sounds like it could end up being quite useful.

The system process and associated LWPs are what give you observability;
the regular process framework handles reporting all of the CPU use and
microstate accounting data.  The trade-off is the cost of microstate
accounting; currently, kernel threads don't have it.  Once you have an
LWP, its recorded.

The SDC class itself has no direct effect on observability; it is
entirely about CPU-intensive kernel threads "playing well with others".
SDC does require microstate accounting, though, which implies an LWP and
the attendant observability.

> > The "zpool-<poolname>" process is created separately from the scheduling
> > class.  It allows the CPU time from the ZFS task queues (which are now
> > running under SDC) to be more easily observed.
> 
> Just curious: is that process created with a non-zero zoneid_t when the
> pool is inside a zone?

No;  one future direction would be to make zone-created pools both show up
as children of zsched and have their worker threads bound to the processor
set the zone is bound to.

Cheers,
- jonathan

Reply via email to