lkml.org 
[lkml]   [2007]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] [PATCH] A clean approach to writeout throttling
On Thu, 6 Dec 2007 03:55:11 -0800
Andrew Morton <akpm@linux-foundation.org> wrote:

> - We a-priori decide to limit a particular stack's peak memory usage to
> 1MB
>
> - We empirically discover that the maximum amount of memory which is
> allocated by that stack on behalf of a single BIO is 16kb. (ie: that's
> the most it has ever used for a single BIO).
>
> - Now, we refuse to feed any more BIOs into the stack when its
> instantaneous memory usage exceeds (1MB - 16kb).
>
> Of course, the _average_ memory-per-BIO is much less than 16kb. So there
> are a lot of BIOs in flight - probably hundreds, but a minimum of 63.

There is only one problem I can see with this. With network block
IO, some memory will be consumed upon IO completion. We need to
make sure we reserve (number of in flight BIOs * maximum amount of
memory consumed upon IO completion) memory, in addition to the
memory you're accounting in your example above.

--
All Rights Reversed


\
 
 \ /
  Last update: 2007-12-06 17:18    [W:0.092 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site