Subject: Re: Limiting disk I/O?
To: Jukka Marin <jmarin@embedtronics.fi>
From: Eric Haszlakiewicz <erh@nimenees.com>
List: netbsd-users
Date: 12/02/2007 15:58:21
On Sun, Dec 02, 2007 at 06:34:40PM +0200, Jukka Marin wrote:
> If I could limit the softdep flush to always keep some 10% of disk I/O
> available, the machine would not stop completely during the flush operation.
>
> while (something_to_be_flushed) {
> if (systat_disk_%busy >= 90) {
> sleep_before_next_flush(a_bit);
> }
> flush_some_data();
> };
except what you really need is more like:
while (something_to_be_flushed) {
if (systat_disk_%busy >= 90) {
temporarily_let_new_io_bypass_softdep()
}
else
turn_off_bypass()
flush_some_data();
};
eric