Thread (75 messages) 75 messages, 7 authors, 2007-08-27

Re: [1/1] Block device throttling [Re: Distributed storage.]

From: Daniel Phillips <hidden>
Date: 2007-08-27 21:57:37
Also in: linux-fsdevel, lkml

Say Evgeniy, something I was curious about but forgot to ask you 
earlier...

On Wednesday 08 August 2007 03:17, Evgeniy Polyakov wrote:
...All oerations are not atomic, since we do not care about precise
number of bios, but a fact, that we are close or close enough to the
limit. 
... in bio->endio
+			q->bio_queued--;
In your proposed patch, what prevents the race:

			cpu1						cpu2

	read q->bio_queued
									q->bio_queued--
	write q->bio_queued - 1
	Whoops! We leaked a throttle count.

Regards,

Daniel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help