[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090921131138.GE1099@duck.suse.cz>
Date: Mon, 21 Sep 2009 15:11:38 +0200
From: Jan Kara <jack@...e.cz>
To: Jens Axboe <jens.axboe@...cle.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Linux Kernel <linux-kernel@...r.kernel.org>, jack@...e.cz,
fengguang.wu@...el.com
Subject: Re: [GIT PULL] a few writeback fixes
On Mon 21-09-09 14:56:20, Jens Axboe wrote:
Hi Jens,
> Jan, since we're not really sure on the inode wait yet, I dropped that
> patch. It's definitely something to look into, as are the congestion
> bits.
OK.
Honza
> diff --git a/mm/page-writeback.c b/mm/page-writeback.c
> index 1eea4fa..6bb510b 100644
> --- a/mm/page-writeback.c
> +++ b/mm/page-writeback.c
> @@ -485,6 +485,7 @@ static void balance_dirty_pages(struct address_space *mapping)
> unsigned long bdi_thresh;
> unsigned long pages_written = 0;
> unsigned long write_chunk = sync_writeback_pages();
> + unsigned long pause = 1;
>
> struct backing_dev_info *bdi = mapping->backing_dev_info;
>
> @@ -561,7 +562,15 @@ static void balance_dirty_pages(struct address_space *mapping)
> if (pages_written >= write_chunk)
> break; /* We've done our duty */
>
> - schedule_timeout(1);
> + schedule_timeout_interruptible(pause);
> +
> + /*
> + * Increase the delay for each loop, up to our previous
> + * default of taking a 100ms nap.
> + */
> + pause <<= 1;
> + if (pause < HZ / 10)
> + pause = HZ / 10;
Isn't this check the other way around?
> }
>
> if (bdi_nr_reclaimable + bdi_nr_writeback < bdi_thresh &&
Honza
--
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists