login
Header Space

 
 

Re: [RFC] [PATCH] A clean approach to writeout throttling

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jonathan Corbet <corbet@...>
Cc: Andrew Morton <akpm@...>, Peter Zijlstra <peterz@...>, <linux-kernel@...>
Date: Tuesday, December 11, 2007 - 12:21 am

On Monday 10 December 2007 13:31, Jonathan Corbet wrote:

Hi Jon,

Don't you know?  These days we optimize all our code for modern
processors with tunnelling instructions and metaphysical cache.
On such processors, setting a register to zero does not entirely
destroy all the data that used to be in the register, so subsequent
instructions can make further use of the overwritten data by
reconstructing it from remnants of bits left attached to the edges of
the register.

Um, yeah, that's it.

Actually, I fat-fingered it in the merge to -mm.  Thanks for the catch,
corrected patch attached.

The offending line isn't even a functional part of the algorithm, it is
just supposed to defend against the possibility that, somehow,
->bi_endio gets called multiple times.  Probably it should really be
something like:

		BUG_ON(bio->bi_throttle == -1);
		if (bio->bi_throttle) {
			...
			bio->bi_throttle = -1;

Or perhaps we should just rely on nobody ever making that mistake
and let somebody else catch it if it does.

Regards,

Daniel
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC] [PATCH] A clean approach to writeout throttling, Daniel Phillips, (Wed Dec 5, 8:03 pm)
Re: [RFC] [PATCH] A clean approach to writeout throttling , Jonathan Corbet, (Mon Dec 10, 5:31 pm)
Re: [RFC] [PATCH] A clean approach to writeout throttling, Daniel Phillips, (Tue Dec 11, 12:21 am)
Re: [RFC] [PATCH] A clean approach to writeout throttling, Daniel Phillips, (Mon Dec 10, 7:33 am)
Re: [RFC] [PATCH] A clean approach to writeout throttling, Daniel Phillips, (Thu Dec 6, 2:21 am)
Re: [RFC] [PATCH] A clean approach to writeout throttling, Daniel Phillips, (Thu Dec 6, 8:04 pm)
Re: [RFC] [PATCH] A clean approach to writeout throttling, Daniel Phillips, (Fri Dec 7, 3:13 am)
Re: [RFC] [PATCH] A clean approach to writeout throttling, Daniel Phillips, (Mon Dec 10, 5:20 am)
Re: [RFC] [PATCH] A clean approach to writeout throttling, Daniel Phillips, (Thu Dec 6, 5:48 am)
Re: [RFC] [PATCH] A clean approach to writeout throttling, Daniel Phillips, (Thu Dec 6, 4:04 pm)
Re: [RFC] [PATCH] A clean approach to writeout throttling, Daniel Phillips, (Thu Dec 6, 5:27 pm)
speck-geostationary