/[pkg-src]/trunk/kernel26-magellan/patches-2.6.17-r6/0025-2.6.17-mm-decrease_minimum_dirty_ratio.patch |
Annotation of /trunk/kernel26-magellan/patches-2.6.17-r6/0025-2.6.17-mm-decrease_minimum_dirty_ratio.patch
Parent Directory | Revision Log
Revision 105 -
(hide annotations)
(download)
Sun Mar 11 16:17:56 2007 UTC (17 years, 6 months ago) by niro
File size: 1512 byte(s)
Sun Mar 11 16:17:56 2007 UTC (17 years, 6 months ago) by niro
File size: 1512 byte(s)
2.6.17-magellan-r6
1 | niro | 105 | Make it possible to set dirty_ratio to 0, setting it to MAX_WRITEBACK_PAGES |
2 | when the value is ultra low, and set background to 0 when that is the case. | ||
3 | |||
4 | Signed-off-by: Con Kolivas <kernel@kolivas.org> | ||
5 | |||
6 | --- | ||
7 | mm/page-writeback.c | 10 ++++------ | ||
8 | 1 files changed, 4 insertions(+), 6 deletions(-) | ||
9 | |||
10 | Index: linux-ck-dev/mm/page-writeback.c | ||
11 | =================================================================== | ||
12 | --- linux-ck-dev.orig/mm/page-writeback.c 2006-06-18 15:20:11.000000000 +1000 | ||
13 | +++ linux-ck-dev/mm/page-writeback.c 2006-06-18 15:25:16.000000000 +1000 | ||
14 | @@ -126,9 +126,6 @@ static void get_writeback_state(struct w | ||
15 | * | ||
16 | * We only allow 1/2 of the currently-unmapped memory to be dirtied. | ||
17 | * | ||
18 | - * We don't permit the clamping level to fall below 5% - that is getting rather | ||
19 | - * excessive. | ||
20 | - * | ||
21 | * We make sure that the background writeout level is below the adjusted | ||
22 | * clamping level. | ||
23 | */ | ||
24 | @@ -162,15 +159,16 @@ get_dirty_limits(struct writeback_state | ||
25 | if (dirty_ratio > unmapped_ratio / 2) | ||
26 | dirty_ratio = unmapped_ratio / 2; | ||
27 | |||
28 | - if (dirty_ratio < 5) | ||
29 | - dirty_ratio = 5; | ||
30 | - | ||
31 | background_ratio = dirty_background_ratio; | ||
32 | if (background_ratio >= dirty_ratio) | ||
33 | background_ratio = dirty_ratio / 2; | ||
34 | |||
35 | background = (background_ratio * available_memory) / 100; | ||
36 | dirty = (dirty_ratio * available_memory) / 100; | ||
37 | + if (dirty < MAX_WRITEBACK_PAGES) { | ||
38 | + dirty = MAX_WRITEBACK_PAGES; | ||
39 | + background = 0; | ||
40 | + } | ||
41 | tsk = current; | ||
42 | if (tsk->flags & PF_LESS_THROTTLE || rt_task(tsk)) { | ||
43 | background += background / 4; |