Commit bf175bc4 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] rename /proc/sys/vm/dirty_async_ratio to dirty_ratio

Since /proc/sys/vm/dirty_sync_ratio went away, the name
"dirty_async_ratio" makes no sense.

So rename it to just /proc/sys/vm/dirty_ratio.
parent a5bef68d
...@@ -966,7 +966,7 @@ dirty_background_ratio ...@@ -966,7 +966,7 @@ dirty_background_ratio
Contains, as a percentage of total system memory, the number of pages at which Contains, as a percentage of total system memory, the number of pages at which
the pdflush background writeback daemon will start writing out dirty data. the pdflush background writeback daemon will start writing out dirty data.
dirty_async_ratio dirty_ratio
----------------- -----------------
Contains, as a percentage of total system memory, the number of pages at which Contains, as a percentage of total system memory, the number of pages at which
......
...@@ -18,14 +18,14 @@ files can be found in mm/swap.c. ...@@ -18,14 +18,14 @@ files can be found in mm/swap.c.
Currently, these files are in /proc/sys/vm: Currently, these files are in /proc/sys/vm:
- overcommit_memory - overcommit_memory
- page-cluster - page-cluster
- dirty_async_ratio - dirty_ratio
- dirty_background_ratio - dirty_background_ratio
- dirty_expire_centisecs - dirty_expire_centisecs
- dirty_writeback_centisecs - dirty_writeback_centisecs
============================================================== ==============================================================
dirty_async_ratio, dirty_background_ratio, dirty_expire_centisecs, dirty_ratio, dirty_background_ratio, dirty_expire_centisecs,
dirty_writeback_centisecs: dirty_writeback_centisecs:
See Documentation/filesystems/proc.txt See Documentation/filesystems/proc.txt
......
...@@ -146,7 +146,7 @@ enum ...@@ -146,7 +146,7 @@ enum
VM_UNUSED9=9, /* was: struct: Set page table cache parameters */ VM_UNUSED9=9, /* was: struct: Set page table cache parameters */
VM_PAGE_CLUSTER=10, /* int: set number of pages to swap together */ VM_PAGE_CLUSTER=10, /* int: set number of pages to swap together */
VM_DIRTY_BACKGROUND=11, /* dirty_background_ratio */ VM_DIRTY_BACKGROUND=11, /* dirty_background_ratio */
VM_DIRTY_ASYNC=12, /* dirty_async_ratio */ VM_DIRTY_RATIO=12, /* dirty_ratio */
VM_DIRTY_WB_CS=13, /* dirty_writeback_centisecs */ VM_DIRTY_WB_CS=13, /* dirty_writeback_centisecs */
VM_DIRTY_EXPIRE_CS=14, /* dirty_expire_centisecs */ VM_DIRTY_EXPIRE_CS=14, /* dirty_expire_centisecs */
VM_NR_PDFLUSH_THREADS=15, /* nr_pdflush_threads */ VM_NR_PDFLUSH_THREADS=15, /* nr_pdflush_threads */
......
...@@ -67,7 +67,7 @@ int wakeup_bdflush(long nr_pages); ...@@ -67,7 +67,7 @@ int wakeup_bdflush(long nr_pages);
/* These 5 are exported to sysctl. */ /* These 5 are exported to sysctl. */
extern int dirty_background_ratio; extern int dirty_background_ratio;
extern int dirty_async_ratio; extern int vm_dirty_ratio;
extern int dirty_writeback_centisecs; extern int dirty_writeback_centisecs;
extern int dirty_expire_centisecs; extern int dirty_expire_centisecs;
......
...@@ -286,8 +286,8 @@ static ctl_table vm_table[] = { ...@@ -286,8 +286,8 @@ static ctl_table vm_table[] = {
&dirty_background_ratio, sizeof(dirty_background_ratio), &dirty_background_ratio, sizeof(dirty_background_ratio),
0644, NULL, &proc_dointvec_minmax, &sysctl_intvec, NULL, 0644, NULL, &proc_dointvec_minmax, &sysctl_intvec, NULL,
&zero, &one_hundred }, &zero, &one_hundred },
{VM_DIRTY_ASYNC, "dirty_async_ratio", &dirty_async_ratio, {VM_DIRTY_RATIO, "dirty_ratio", &vm_dirty_ratio,
sizeof(dirty_async_ratio), 0644, NULL, &proc_dointvec_minmax, sizeof(vm_dirty_ratio), 0644, NULL, &proc_dointvec_minmax,
&sysctl_intvec, NULL, &zero, &one_hundred }, &sysctl_intvec, NULL, &zero, &one_hundred },
{VM_DIRTY_WB_CS, "dirty_writeback_centisecs", {VM_DIRTY_WB_CS, "dirty_writeback_centisecs",
&dirty_writeback_centisecs, sizeof(dirty_writeback_centisecs), 0644, &dirty_writeback_centisecs, sizeof(dirty_writeback_centisecs), 0644,
......
...@@ -63,9 +63,9 @@ static inline long sync_writeback_pages(void) ...@@ -63,9 +63,9 @@ static inline long sync_writeback_pages(void)
int dirty_background_ratio = 10; int dirty_background_ratio = 10;
/* /*
* The generator of dirty data starts async writeback at this percentage * The generator of dirty data starts writeback at this percentage
*/ */
int dirty_async_ratio = 40; int vm_dirty_ratio = 40;
/* /*
* The interval between `kupdate'-style writebacks, in centiseconds * The interval between `kupdate'-style writebacks, in centiseconds
...@@ -86,7 +86,7 @@ static void background_writeout(unsigned long _min_pages); ...@@ -86,7 +86,7 @@ static void background_writeout(unsigned long _min_pages);
/* /*
* balance_dirty_pages() must be called by processes which are generating dirty * balance_dirty_pages() must be called by processes which are generating dirty
* data. It looks at the number of dirty pages in the machine and will force * data. It looks at the number of dirty pages in the machine and will force
* the caller to perform writeback if the system is over `async_thresh'. * the caller to perform writeback if the system is over `vm_dirty_ratio'.
* If we're over `background_thresh' then pdflush is woken to perform some * If we're over `background_thresh' then pdflush is woken to perform some
* writeout. * writeout.
*/ */
...@@ -94,15 +94,15 @@ void balance_dirty_pages(struct address_space *mapping) ...@@ -94,15 +94,15 @@ void balance_dirty_pages(struct address_space *mapping)
{ {
struct page_state ps; struct page_state ps;
long background_thresh; long background_thresh;
long async_thresh; long dirty_thresh;
struct backing_dev_info *bdi = mapping->backing_dev_info; struct backing_dev_info *bdi = mapping->backing_dev_info;
background_thresh = (dirty_background_ratio * total_pages) / 100; background_thresh = (dirty_background_ratio * total_pages) / 100;
async_thresh = (dirty_async_ratio * total_pages) / 100; dirty_thresh = (vm_dirty_ratio * total_pages) / 100;
get_page_state(&ps); get_page_state(&ps);
while (ps.nr_dirty + ps.nr_writeback > async_thresh) { while (ps.nr_dirty + ps.nr_writeback > dirty_thresh) {
struct writeback_control wbc = { struct writeback_control wbc = {
.bdi = bdi, .bdi = bdi,
.sync_mode = WB_SYNC_NONE, .sync_mode = WB_SYNC_NONE,
...@@ -116,7 +116,7 @@ void balance_dirty_pages(struct address_space *mapping) ...@@ -116,7 +116,7 @@ void balance_dirty_pages(struct address_space *mapping)
writeback_inodes(&wbc); writeback_inodes(&wbc);
get_page_state(&ps); get_page_state(&ps);
if (ps.nr_dirty + ps.nr_writeback <= async_thresh) if (ps.nr_dirty + ps.nr_writeback <= dirty_thresh)
break; break;
blk_congestion_wait(WRITE, HZ/10); blk_congestion_wait(WRITE, HZ/10);
} }
...@@ -338,8 +338,8 @@ static int __init page_writeback_init(void) ...@@ -338,8 +338,8 @@ static int __init page_writeback_init(void)
if (correction < 100) { if (correction < 100) {
dirty_background_ratio *= correction; dirty_background_ratio *= correction;
dirty_background_ratio /= 100; dirty_background_ratio /= 100;
dirty_async_ratio *= correction; vm_dirty_ratio *= correction;
dirty_async_ratio /= 100; vm_dirty_ratio /= 100;
} }
init_timer(&wb_timer); init_timer(&wb_timer);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment