Skip to content

Commit

Permalink
ZEN: Restore dirty (background) ratios to mainline default
Browse files Browse the repository at this point in the history
As recently discovered in an issue with Zen Kernel swapping excessively
with mgLRU on [1], the high dirty ratio values configured with
ZEN_INTERACTIVE cause this new LRU feature to misbehave.

Even if there's an issue with the implementation of Multigenerational
LRU itself, using a high dirty ratio does not make sense anymore in
2021.  When the high ratios were initially selected, most systems core
drive was spinning rust.  Now-a-days, nearly all systems are sold with a
solid state drive with some systems having hard drives for non essential
storage or backups.

Not to mention, the storage subsystem completely changed with the
introduction of blkmq [2], and interactivity optimized IO schedulers
like BFQ matured and went mainline.  With all of the above, there's no
reason to keep the our custom ratios any longer.

[1] #216
[2] https://www.kernel.org/doc/html/latest/block/blk-mq.html
  • Loading branch information
damentz committed Jul 18, 2021
1 parent 67850ef commit efe513d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
2 changes: 0 additions & 2 deletions init/Kconfig
Expand Up @@ -116,8 +116,6 @@ config ZEN_INTERACTIVE

--- Virtual Memory Subsystem ---------------------------

Mem dirty before bg writeback..: 10 % -> 20 %
Mem dirty before sync writeback: 20 % -> 50 %
Background-reclaim hugepages...: no -> yes

--- CFS CPU Scheduler ----------------------------------
Expand Down
8 changes: 0 additions & 8 deletions mm/page-writeback.c
Expand Up @@ -71,11 +71,7 @@ static long ratelimit_pages = 32;
/*
* Start background writeback (via writeback threads) at this percentage
*/
#ifdef CONFIG_ZEN_INTERACTIVE
int dirty_background_ratio = 20;
#else
int dirty_background_ratio = 10;
#endif

/*
* dirty_background_bytes starts at 0 (disabled) so that it is a function of
Expand All @@ -92,11 +88,7 @@ int vm_highmem_is_dirtyable;
/*
* The generator of dirty data starts writeback at this percentage
*/
#ifdef CONFIG_ZEN_INTERACTIVE
int vm_dirty_ratio = 50;
#else
int vm_dirty_ratio = 20;
#endif

/*
* vm_dirty_bytes starts at 0 (disabled) so that it is a function of
Expand Down

0 comments on commit efe513d

Please sign in to comment.