4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _SYS_POOL_PSET_H
28 #define _SYS_POOL_PSET_H
30 #pragma ident "%Z%%M% %I% %E% SMI"
32 #include <sys/types.h>
33 #include <sys/cpupart.h>
34 #include <sys/procset.h>
35 #include <sys/nvpair.h>
36 #include <sys/exacct.h>
48 typedef struct pool_pset
{
49 psetid_t pset_id
; /* pset ID */
50 uint_t pset_npools
; /* # of pools we belong to */
51 list_node_t pset_link
; /* link to next/prev pset */
52 nvlist_t
*pset_props
; /* pset properties */
55 extern pool_pset_t
*pool_pset_default
; /* default pset */
56 extern hrtime_t pool_pset_mod
; /* pset modification time */
57 extern hrtime_t pool_cpu_mod
; /* cpu modification time */
59 extern void pool_pset_init(void);
60 extern int pool_pset_enable(void);
61 extern int pool_pset_disable(void);
62 extern int pool_pset_create(psetid_t
*);
63 extern int pool_pset_destroy(psetid_t
);
64 extern int pool_pset_assoc(poolid_t
, psetid_t
);
65 extern void pool_pset_bind(proc_t
*, psetid_t
, void *, void *);
66 extern int pool_pset_xtransfer(id_t
, id_t
, size_t, id_t
*);
67 extern int pool_pset_proprm(psetid_t
, char *);
68 extern int pool_pset_propput(psetid_t
, nvpair_t
*);
69 extern int pool_pset_propget(psetid_t
, char *, nvlist_t
*);
70 extern int pool_cpu_proprm(processorid_t
, char *);
71 extern int pool_cpu_propput(processorid_t
, nvpair_t
*);
72 extern int pool_cpu_propget(processorid_t
, char *, nvlist_t
*);
73 extern int pool_pset_pack(ea_object_t
*);
75 extern int pset_bind_start(struct proc
**, struct pool
*);
76 extern void pset_bind_abort(struct proc
**, struct pool
*);
77 extern void pset_bind_finish(void);
79 extern boolean_t
pool_pset_enabled(void);
81 extern void pool_pset_visibility_add(psetid_t
, struct zone
*);
82 extern void pool_pset_visibility_remove(psetid_t
, struct zone
*);
90 #endif /* _SYS_POOL_PSET_H */