Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 208339
b: refs/heads/master
c: ecd5840
h: refs/heads/master
i:
  208337: 8d52e25
  208335: 5760715
v: v3
  • Loading branch information
Artem Bityutskiy authored and Jens Axboe committed Aug 7, 2010
1 parent d492a71 commit 54d9248
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 78c40cb6581a74adc48821f3de6b864a54d4c34d
refs/heads/master: ecd584030da67ede1bf17955746a6ce834d9fc6b
6 changes: 3 additions & 3 deletions trunk/fs/fs-writeback.c
Original file line number Diff line number Diff line change
Expand Up @@ -800,12 +800,12 @@ int bdi_writeback_thread(void *data)
{
struct bdi_writeback *wb = data;
struct backing_dev_info *bdi = wb->bdi;
unsigned long last_active = jiffies;
unsigned long wait_jiffies = -1UL;
long pages_written;

current->flags |= PF_FLUSHER | PF_SWAPWRITE;
set_freezable();
wb->last_active = jiffies;

/*
* Our parent may run at a different priority, just set us to normal
Expand All @@ -827,7 +827,7 @@ int bdi_writeback_thread(void *data)
trace_writeback_pages_written(pages_written);

if (pages_written)
last_active = jiffies;
wb->last_active = jiffies;
else if (wait_jiffies != -1UL) {
unsigned long max_idle;

Expand All @@ -837,7 +837,7 @@ int bdi_writeback_thread(void *data)
* recreated automatically.
*/
max_idle = max(5UL * 60 * HZ, wait_jiffies);
if (time_after(jiffies, max_idle + last_active))
if (time_after(jiffies, max_idle + wb->last_active))
break;
}

Expand Down
13 changes: 7 additions & 6 deletions trunk/include/linux/backing-dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,16 @@ enum bdi_stat_item {
#define BDI_STAT_BATCH (8*(1+ilog2(nr_cpu_ids)))

struct bdi_writeback {
struct backing_dev_info *bdi; /* our parent bdi */
struct backing_dev_info *bdi; /* our parent bdi */
unsigned int nr;

unsigned long last_old_flush; /* last old data flush */
unsigned long last_old_flush; /* last old data flush */
unsigned long last_active; /* last time bdi thread was active */

struct task_struct *task; /* writeback thread */
struct list_head b_dirty; /* dirty inodes */
struct list_head b_io; /* parked for writeback */
struct list_head b_more_io; /* parked for more writeback */
struct task_struct *task; /* writeback thread */
struct list_head b_dirty; /* dirty inodes */
struct list_head b_io; /* parked for writeback */
struct list_head b_more_io; /* parked for more writeback */
};

struct backing_dev_info {
Expand Down

0 comments on commit 54d9248

Please sign in to comment.