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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Daniel Phillips
Date: Wednesday, December 5, 2007 - 11:21 pm

On Wednesday 05 December 2007 17:24, Andrew Morton wrote:

Ah, and how do you ensure that you do not deadlock while making this
inquiry?  Perhaps send a dummy transaction down the pipe?  Even so,
deadlock is possible, quite evidently so in the real life example I have
at hand.

Yours is essentially one of the strategies I had in mind, the other major
one being simply to examine the whole stack, which presupposes some
as-yet-nonexistant kernel wide method of representing block device
stacks in all there glorious possible topology variations.


We do not wait for high block device resource usage to subside before
submitting more requests.  The improvement you suggest is aimed at
automatically determining resource requirements by sampling a
running system, rather than requiring a programmer to determine them
arduously by hand.  Something like automatically determining a
workable locking strategy by analyzing running code, wouldn't that be
a treat?  I will hope for one of those under my tree at Christmas.

More practically, I can see a debug mode implemented along the lines
you describe where we automatically detect that a writeout path has
violated its covenant as expressed by its throttle_metric.
 

Two reasons.  The minor one is that device mapper bypasses that
mechanism (no elevator) and the major one is that number of requests
does not map well to the amount of resources consumed.  In ddsnap for
example, the amount of memory used by the userspace ddsnapd is
roughly linear vs the number of pages transferred, not the number of
requests.


Yes, as a first order repair.  To be done properly I need to express this
in terms of the guts of wait_event_*, and get rid of that race, maybe that
changes the equation.

It would be nice if threads didn't get stuck in D state here, though
_interruptible is probably the wrong idea, we should instead ensure that
whatever is being waited on must respond to, e.g., SIGKILL.  This at the
limits of my scheduler knowledge, l would appreciate a better
suggestion.  I do detest hang in D state with SIGKILL immunity, which
behavior unfortunately does not seem all that rare.

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, 5:03 pm)
Re: [RFC] [PATCH] A clean approach to writeout throttling, Daniel Phillips, (Wed Dec 5, 11:21 pm)
Re: [RFC] [PATCH] A clean approach to writeout throttling, Andrew Morton, (Thu Dec 6, 12:31 am)
Re: [RFC] [PATCH] A clean approach to writeout throttling, Daniel Phillips, (Thu Dec 6, 2:48 am)
Re: [RFC] [PATCH] A clean approach to writeout throttling, Andrew Morton, (Thu Dec 6, 10:34 am)
Re: [RFC] [PATCH] A clean approach to writeout throttling, Daniel Phillips, (Thu Dec 6, 1:04 pm)
Re: [RFC] [PATCH] A clean approach to writeout throttling, Daniel Phillips, (Thu Dec 6, 2:27 pm)
Re: [RFC] [PATCH] A clean approach to writeout throttling, Daniel Phillips, (Fri Dec 7, 12:13 am)
Re: [RFC] [PATCH] A clean approach to writeout throttling, Daniel Phillips, (Mon Dec 10, 2:20 am)
Re: [RFC] [PATCH] A clean approach to writeout throttling, Daniel Phillips, (Mon Dec 10, 4:33 am)
Re: [RFC] [PATCH] A clean approach to writeout throttling , Jonathan Corbet, (Mon Dec 10, 2:31 pm)
Re: [RFC] [PATCH] A clean approach to writeout throttling, Daniel Phillips, (Mon Dec 10, 9:21 pm)