Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Dec 2007 12:35:12 +0000 (GMT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        Attilio Rao <attilio@freebsd.org>, arch@freebsd.org, Andre Oppermann <andre@freebsd.org>
Subject:   Re: New "timeout" api, to replace callout 
Message-ID:  <20071202123231.G74097@fledge.watson.org>
In-Reply-To: <18443.1196596969@critter.freebsd.dk>
References:  <18443.1196596969@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 2 Dec 2007, Poul-Henning Kamp wrote:

> I guess I need to elaborate that point some more:
>
> If we want CPU affinity, what happens that that we pass a per-cpu timeout 
> provider:
>
> 	timeout_init(&pcpu->timouts, ...)
>
> If we want a private timeout group for NFS we pass that in:
>
> 	timeout_init(&nfs_timeouts, ...)
>
> Think of the implmentation of the timeouts as an object of which we can have 
> multiple instances with various private properties...

The reason affinity is getting raised in particular is that quite a few people 
are running around thinking that affinity is something that they do want and 
plan to use.  In the above, affinity is a property of the consumer in the 
event that the consumer has its own timeout instance.  If it's a common 
property across many consmers, it's not something we want every consumer to 
deal with as it adds a significant degree of complexity to each consumer. 
I.e., rather than nfs_timeouts, it's pcpu.nfs_timeouts, or nfs_timeouts[cpu], 
leading to every consumer defining MAXCPUs or a related constant instances 
instead of a single instance that knows about affinity.  Also, if there are 
multiple instances, that means "migrating" a callout from one CPU to another 
involves moving it from one instance to another, rather than simply asking the 
instance to move it in the way it understands best (which might involve less 
overhead).

Robert N M Watson
Computer Laboratory
University of Cambridge



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071202123231.G74097>