Mercurial > illumos > git > illumos-gate
changeset 20063:af8fee8a8d70
13094 systems have more kmem caches than they used to
Reviewed by: Andy Fiddaman <andy@omniosce.org>
Reviewed by: Jason King <jason.brian.king@gmail.com>
Reviewed by: Peter Tribble <peter.tribble@gmail.com>
Approved by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
author | Joshua M. Clulow <josh@sysmgr.org> |
---|---|
date | Mon, 21 Sep 2020 21:59:03 -0700 |
parents | 3757e6a94e62 |
children | 3180fbf99ab2 |
files | usr/src/uts/common/os/kmem.c |
diffstat | 1 files changed, 15 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/os/kmem.c Mon Sep 21 21:58:47 2020 -0700 +++ b/usr/src/uts/common/os/kmem.c Mon Sep 21 21:59:03 2020 -0700 @@ -23,6 +23,7 @@ * Copyright (c) 2012, 2017 by Delphix. All rights reserved. * Copyright 2015 Nexenta Systems, Inc. All rights reserved. * Copyright 2018, Joyent, Inc. + * Copyright 2020 Oxide Computer Company */ /* @@ -4529,8 +4530,21 @@ kmem_thread_init(void) { kmem_move_init(); + + /* + * This taskq is used for various kmem maintenance functions, including + * kmem_reap(). When maintenance is required on every cache, + * kmem_cache_applyall() dispatches one task per cache onto this queue. + * + * In the case of kmem_reap(), the system may be under increasingly + * dire memory pressure and may not be able to allocate a new task + * entry. The count of entries to prepopulate (below) should cover at + * least as many caches as we generally expect to exist on the system + * so that they may all be scheduled for reaping under those + * conditions. + */ kmem_taskq = taskq_create_instance("kmem_taskq", 0, 1, minclsyspri, - 300, INT_MAX, TASKQ_PREPOPULATE); + 600, INT_MAX, TASKQ_PREPOPULATE); } void