diff options
author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2018-02-16 22:51:58 +0000 |
---|---|---|
committer | Patrick Mooney <pmooney@pfmooney.com> | 2020-04-21 19:29:06 +0000 |
commit | 0418219cf21334a9c6712bbb2cec543b2ee4f989 (patch) | |
tree | 23528655f5a543c532a858263e5f6884e350feb8 /usr/src/uts/common/vm | |
parent | ee73640b6a4781aa745f3868c448d1b9dd1c29f6 (diff) | |
download | illumos-joyent-0418219cf21334a9c6712bbb2cec543b2ee4f989.tar.gz |
12552 increase get_max_pages
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Reviewed by: Mike Gerdts <mike.gerdts@joyent.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/uts/common/vm')
-rw-r--r-- | usr/src/uts/common/vm/vm_page.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/usr/src/uts/common/vm/vm_page.c b/usr/src/uts/common/vm/vm_page.c index 78d1cb1a58..0588d50a6c 100644 --- a/usr/src/uts/common/vm/vm_page.c +++ b/usr/src/uts/common/vm/vm_page.c @@ -22,6 +22,7 @@ * Copyright (c) 1986, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2015, Josef 'Jeff' Sipek <jeffpc@josefsipek.net> * Copyright (c) 2015, 2016 by Delphix. All rights reserved. + * Copyright 2018 Joyent, Inc. */ /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ @@ -440,10 +441,26 @@ init_pages_pp_maximum() } } +/* + * In the past, we limited the maximum pages that could be gotten to essentially + * 1/2 of the total pages on the system. However, this is too conservative for + * some cases. For example, if we want to host a large virtual machine which + * needs to use a significant portion of the system's memory. In practice, + * allowing more than 1/2 of the total pages is fine, but becomes problematic + * as we approach or exceed 75% of the pages on the system. Thus, we limit the + * maximum to 23/32 of the total pages, which is ~72%. + */ void set_max_page_get(pgcnt_t target_total_pages) { - max_page_get = target_total_pages / 2; + max_page_get = (target_total_pages >> 5) * 23; + ASSERT3U(max_page_get, >, 0); +} + +pgcnt_t +get_max_page_get() +{ + return (max_page_get); } static pgcnt_t pending_delete; |