Skip to content

Commit b7a2441

Browse files
author
Wu Fengguang
committed
writeback: remove writeback_control.more_io
When wbc.more_io was first introduced, it indicates whether there are at least one superblock whose s_more_io contains more IO work. Now with the per-bdi writeback, it can be replaced with a simple b_more_io test. Acked-by: Jan Kara <jack@suse.cz> Acked-by: Mel Gorman <mel@csn.ul.ie> Reviewed-by: Minchan Kim <minchan.kim@gmail.com> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
1 parent 3efaf0f commit b7a2441

4 files changed

Lines changed: 5 additions & 16 deletions

File tree

‎fs/fs-writeback.c‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -560,12 +560,8 @@ static int writeback_sb_inodes(struct super_block *sb, struct bdi_writeback *wb,
560560
iput(inode);
561561
cond_resched();
562562
spin_lock(&wb->list_lock);
563-
if (wbc->nr_to_write <= 0) {
564-
wbc->more_io = 1;
563+
if (wbc->nr_to_write <= 0)
565564
return 1;
566-
}
567-
if (!list_empty(&wb->b_more_io))
568-
wbc->more_io = 1;
569565
}
570566
/* b_io is empty */
571567
return 1;
@@ -708,7 +704,6 @@ static long wb_writeback(struct bdi_writeback *wb,
708704
wbc.older_than_this = &oldest_jif;
709705
}
710706

711-
wbc.more_io = 0;
712707
wbc.nr_to_write = write_chunk;
713708
wbc.pages_skipped = 0;
714709
wbc.inodes_written = 0;
@@ -740,7 +735,7 @@ static long wb_writeback(struct bdi_writeback *wb,
740735
/*
741736
* No more inodes for IO, bail
742737
*/
743-
if (!wbc.more_io)
738+
if (list_empty(&wb->b_more_io))
744739
break;
745740
/*
746741
* Nothing written. Wait for some inode to

‎include/linux/writeback.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ struct writeback_control {
4646
unsigned tagged_writepages:1; /* tag-and-write to avoid livelock */
4747
unsigned for_reclaim:1; /* Invoked from the page allocator */
4848
unsigned range_cyclic:1; /* range_start is cyclic */
49-
unsigned more_io:1; /* more io to be dispatched */
5049
};
5150

5251
/*

‎include/trace/events/ext4.h‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,6 @@ TRACE_EVENT(ext4_da_writepages_result,
404404
__field( int, pages_written )
405405
__field( long, pages_skipped )
406406
__field( int, sync_mode )
407-
__field( char, more_io )
408407
__field( pgoff_t, writeback_index )
409408
),
410409

@@ -415,16 +414,15 @@ TRACE_EVENT(ext4_da_writepages_result,
415414
__entry->pages_written = pages_written;
416415
__entry->pages_skipped = wbc->pages_skipped;
417416
__entry->sync_mode = wbc->sync_mode;
418-
__entry->more_io = wbc->more_io;
419417
__entry->writeback_index = inode->i_mapping->writeback_index;
420418
),
421419

422420
TP_printk("dev %d,%d ino %lu ret %d pages_written %d pages_skipped %ld "
423-
" more_io %d sync_mode %d writeback_index %lu",
421+
"sync_mode %d writeback_index %lu",
424422
MAJOR(__entry->dev), MINOR(__entry->dev),
425423
(unsigned long) __entry->ino, __entry->ret,
426424
__entry->pages_written, __entry->pages_skipped,
427-
__entry->more_io, __entry->sync_mode,
425+
__entry->sync_mode,
428426
(unsigned long) __entry->writeback_index)
429427
);
430428

‎include/trace/events/writeback.h‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ DECLARE_EVENT_CLASS(wbc_class,
101101
__field(int, for_background)
102102
__field(int, for_reclaim)
103103
__field(int, range_cyclic)
104-
__field(int, more_io)
105104
__field(unsigned long, older_than_this)
106105
__field(long, range_start)
107106
__field(long, range_end)
@@ -116,15 +115,14 @@ DECLARE_EVENT_CLASS(wbc_class,
116115
__entry->for_background = wbc->for_background;
117116
__entry->for_reclaim = wbc->for_reclaim;
118117
__entry->range_cyclic = wbc->range_cyclic;
119-
__entry->more_io = wbc->more_io;
120118
__entry->older_than_this = wbc->older_than_this ?
121119
*wbc->older_than_this : 0;
122120
__entry->range_start = (long)wbc->range_start;
123121
__entry->range_end = (long)wbc->range_end;
124122
),
125123

126124
TP_printk("bdi %s: towrt=%ld skip=%ld mode=%d kupd=%d "
127-
"bgrd=%d reclm=%d cyclic=%d more=%d older=0x%lx "
125+
"bgrd=%d reclm=%d cyclic=%d older=0x%lx "
128126
"start=0x%lx end=0x%lx",
129127
__entry->name,
130128
__entry->nr_to_write,
@@ -134,7 +132,6 @@ DECLARE_EVENT_CLASS(wbc_class,
134132
__entry->for_background,
135133
__entry->for_reclaim,
136134
__entry->range_cyclic,
137-
__entry->more_io,
138135
__entry->older_than_this,
139136
__entry->range_start,
140137
__entry->range_end)

0 commit comments

Comments
 (0)