Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139156
b: refs/heads/master
c: 704503d
h: refs/heads/master
v: v3
  • Loading branch information
Alexey Dobriyan authored and Linus Torvalds committed Apr 1, 2009
1 parent 97c800e commit 4e1e644
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 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: 6a11f75b6a17b5d9ac5025f8d048382fd1f47377
refs/heads/master: 704503d836042d4a4c7685b7036e7de0418fbc0f
4 changes: 2 additions & 2 deletions trunk/include/linux/writeback.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ extern int dirty_background_ratio;
extern unsigned long dirty_background_bytes;
extern int vm_dirty_ratio;
extern unsigned long vm_dirty_bytes;
extern int dirty_writeback_interval;
extern int dirty_expire_interval;
extern unsigned int dirty_writeback_interval;
extern unsigned int dirty_expire_interval;
extern int vm_highmem_is_dirtyable;
extern int block_dump;
extern int laptop_mode;
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ static struct ctl_table vm_table[] = {
.data = &dirty_expire_interval,
.maxlen = sizeof(dirty_expire_interval),
.mode = 0644,
.proc_handler = &proc_dointvec_userhz_jiffies,
.proc_handler = &proc_dointvec,
},
{
.ctl_name = VM_NR_PDFLUSH_THREADS,
Expand Down
20 changes: 11 additions & 9 deletions trunk/mm/page-writeback.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ int vm_dirty_ratio = 20;
unsigned long vm_dirty_bytes;

/*
* The interval between `kupdate'-style writebacks, in jiffies
* The interval between `kupdate'-style writebacks
*/
int dirty_writeback_interval = 5 * HZ;
unsigned int dirty_writeback_interval = 5 * 100; /* sentiseconds */

/*
* The longest number of jiffies for which data is allowed to remain dirty
* The longest time for which data is allowed to remain dirty
*/
int dirty_expire_interval = 30 * HZ;
unsigned int dirty_expire_interval = 30 * 100; /* sentiseconds */

/*
* Flag that makes the machine dump writes/reads and block dirtyings.
Expand Down Expand Up @@ -770,9 +770,9 @@ static void wb_kupdate(unsigned long arg)

sync_supers();

oldest_jif = jiffies - dirty_expire_interval;
oldest_jif = jiffies - msecs_to_jiffies(dirty_expire_interval);
start_jif = jiffies;
next_jif = start_jif + dirty_writeback_interval;
next_jif = start_jif + msecs_to_jiffies(dirty_writeback_interval * 10);
nr_to_write = global_page_state(NR_FILE_DIRTY) +
global_page_state(NR_UNSTABLE_NFS) +
(inodes_stat.nr_inodes - inodes_stat.nr_unused);
Expand Down Expand Up @@ -801,9 +801,10 @@ static void wb_kupdate(unsigned long arg)
int dirty_writeback_centisecs_handler(ctl_table *table, int write,
struct file *file, void __user *buffer, size_t *length, loff_t *ppos)
{
proc_dointvec_userhz_jiffies(table, write, file, buffer, length, ppos);
proc_dointvec(table, write, file, buffer, length, ppos);
if (dirty_writeback_interval)
mod_timer(&wb_timer, jiffies + dirty_writeback_interval);
mod_timer(&wb_timer, jiffies +
msecs_to_jiffies(dirty_writeback_interval * 10));
else
del_timer(&wb_timer);
return 0;
Expand Down Expand Up @@ -905,7 +906,8 @@ void __init page_writeback_init(void)
{
int shift;

mod_timer(&wb_timer, jiffies + dirty_writeback_interval);
mod_timer(&wb_timer,
jiffies + msecs_to_jiffies(dirty_writeback_interval * 10));
writeback_set_ratelimit();
register_cpu_notifier(&ratelimit_nb);

Expand Down

0 comments on commit 4e1e644

Please sign in to comment.