lkml.org 
[lkml]   [2011]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] writeback: avoid extra sync work at enqueue time
On Mon 02-05-11 11:17:53, Wu Fengguang wrote:
> This removes writeback_control.wb_start and does more straightforward
> sync livelock prevention by setting .older_than_this to prevent extra
> inodes from being enqueued in the first place.
>
> --- linux-next.orig/fs/fs-writeback.c 2011-05-02 11:17:24.000000000 +0800
> +++ linux-next/fs/fs-writeback.c 2011-05-02 11:17:27.000000000 +0800
> @@ -683,10 +672,12 @@ static long wb_writeback(struct bdi_writ
> * (quickly) tag currently dirty pages
> * (maybe slowly) sync all tagged pages
> */
> - if (wbc.sync_mode == WB_SYNC_ALL || wbc.tagged_sync)
> + if (wbc.sync_mode == WB_SYNC_ALL || wbc.tagged_sync) {
> write_chunk = LONG_MAX;
> + oldest_jif = jiffies;
> + wbc.older_than_this = &oldest_jif;
> + }
What are the implications of not doing dirty-time livelock avoidance for
other types of writeback? Is that a mistake? I'd prefer to have in
wb_writeback():
if (wbc.for_kupdate)
oldest_jif = jiffies - msecs_to_jiffies(dirty_expire_interval * 10);
else
oldest_jif = jiffies;
wbc.older_than_this = &oldest_jif;
And when you have this, you can make wbc.older_than_this just a plain
number and remove all those checks for wbc.older_than_this == NULL.

Honza

--
Jan Kara <jack@suse.cz>
SUSE Labs, CR


\
 
 \ /
  Last update: 2011-05-04 23:27    [from the cache]
©2003-2011 Jasper Spaans