Skip to content

Commit 6029fb9

Browse files
tytydracoExactExampl
authored andcommitted
mm: Never allow allocations more than our physical memory
This should provide faster allocations than OVERCOMMIT_GUESS, without the significant OOM risk of OVERCOMMIT_ALWAYS. Signed-off-by: Tyler Nijmeh <tylernij@gmail.com>
1 parent 5ede91f commit 6029fb9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

mm/util.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,8 @@ int __page_mapcount(struct page *page)
486486
}
487487
EXPORT_SYMBOL_GPL(__page_mapcount);
488488

489-
int sysctl_overcommit_memory __read_mostly = OVERCOMMIT_GUESS;
490-
int sysctl_overcommit_ratio __read_mostly = 50;
489+
int sysctl_overcommit_memory __read_mostly = OVERCOMMIT_NEVER;
490+
int sysctl_overcommit_ratio __read_mostly = 100;
491491
unsigned long sysctl_overcommit_kbytes __read_mostly;
492492
int sysctl_max_map_count __read_mostly = DEFAULT_MAX_MAP_COUNT;
493493
unsigned long sysctl_user_reserve_kbytes __read_mostly = 1UL << 17; /* 128MB */

0 commit comments

Comments
 (0)