Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Jul 2005 18:13:56 -0700
From:      Luigi Rizzo <rizzo@icir.org>
To:        Scott Long <scottl@samsco.org>
Cc:        s223560@studenti.ing.unipi.it, Robert Watson <rwatson@freebsd.org>, current@freebsd.org
Subject:   Re: location of bioq lock
Message-ID:  <20050714181356.A58300@xorpc.icir.org>
In-Reply-To: <42D7075F.5070907@samsco.org>; from scottl@samsco.org on Thu, Jul 14, 2005 at 06:46:23PM -0600
References:  <20050705053114.A96381@xorpc.icir.org> <35386.1120575587@phk.freebsd.dk> <20050705103353.A8185@xorpc.icir.org> <20050708110742.A6284@xorpc.icir.org> <20050708203537.H34251@fledge.watson.org> <20050708155827.A10658@xorpc.icir.org> <42D419C2.6040606@samsco.org> <20050712160935.A58434@xorpc.icir.org> <20050714155616.A56618@xorpc.icir.org> <42D7075F.5070907@samsco.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jul 14, 2005 at 06:46:23PM -0600, Scott Long wrote:
...
> How often are you going to be changing the scheduler at runtime?  Is

in general, almost never. However, suppose you have per-device
schedulers as phk was suggesting, then you'd really like
to decouple the devices so reconfiguring one of them does not
affect the others.

Anyways there might be a way out...
requests go from dev_strategy()
to the individual disksort routine where, during the switch,
the scheduler can 'absorb' them
while the real queue drains (assuming the subsequent device_start()
routine does not complain too much for finding the queue empty!).
Then, when the device queue becomes empty (the scheduler knows because
it is serving the bio_remove() requests) it can switch to the new one,
and resubmit old requests through dev_strategy().

This would also solve the problem of implementing non-work-conserving
schedulers. Basically it's the same approach followed in dummynet,
you steal the packets from ip_{input,output}() and resubmit them
later.

Does any of you know what are the assumptions (locks held etc.)
for calling dev_strategy() in 5.x and above ?

	cheers
	luigi

> the scheduler meant to be aware of individual devices?  Again, I'm
> not advocating that the upper layers be able to look at or manipulate
> the driver bioq's.
> 
> Scott
> _______________________________________________
> freebsd-current@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"



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