4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #include <sys/types.h>
27 #include <sys/cmn_err.h>
28 #include <sys/errno.h>
29 #include <sys/debug.h>
31 #include <sys/mem_config.h>
32 #include <sys/mem_cage.h>
34 /* These should be in a platform stubs file. */
37 kthread_id_t kcage_cageout_thread
;
38 pgcnt_t kcage_freemem
;
39 pgcnt_t kcage_throttlefree
;
40 pgcnt_t kcage_minfree
;
41 pgcnt_t kcage_desfree
;
42 pgcnt_t kcage_needfree
;
43 pgcnt_t kcage_lotsfree
= 1;
45 #if !defined(__x86) || defined(__xpv)
48 kphysm_setup_func_register(kphysm_setup_vector_t
*vec
, void *arg
)
55 kphysm_setup_func_unregister(kphysm_setup_vector_t
*vec
, void *arg
)
62 kcage_create_throttle(pgcnt_t npages
, int flags
)
68 kcage_cageout_init(void)
73 kcage_cageout_wakeup()
84 kcage_current_pfn(pfn_t
*pfn
)