Print this page
OS-4915 want FX high priority zone configuration option
OS-4925 ps pri shows misleading value for zone in RT scheduling class
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>


   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.
   7  *
   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.
  12  *
  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]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.

  24  */
  25 
  26 #ifndef _SYS_FX_H
  27 #define _SYS_FX_H
  28 
  29 #pragma ident   "%Z%%M% %I%     %E% SMI"
  30 
  31 #include <sys/types.h>
  32 #include <sys/thread.h>
  33 #include <sys/ddi.h>
  34 #include <sys/sunddi.h>
  35 #include <sys/cpucaps.h>
  36 
  37 #ifdef  __cplusplus
  38 extern "C" {
  39 #endif
  40 
  41 /*
  42  * Fixed-priority dispatcher parameter table entry
  43  */
  44 typedef struct fxdpent {
  45         pri_t   fx_globpri;     /* global (class independent) priority */
  46         int     fx_quantum;     /* time quantum given to procs at this level */
  47 } fxdpent_t;
  48 
  49 #ifdef _KERNEL
  50 


 128         caps_sc_t       fx_caps;        /* CPU caps specific data */
 129 } fxproc_t;
 130 
 131 
 132 #define FX_CALLB(fxpp)  fxpp->fx_callback
 133 
 134 
 135 /* flags */
 136 #define FXBACKQ 0x02    /* thread goes to back of disp q when preempted */
 137 
 138 /*
 139  * Kernel version of fixed-priority class specific parameter structure
 140  */
 141 typedef struct  fxkparms {
 142         pri_t   fx_upri;
 143         pri_t   fx_uprilim;
 144         int     fx_tqntm;
 145         uint_t  fx_cflags;
 146 } fxkparms_t;
 147 






 148 

 149 
 150 /*
 151  * Interface for partner private code. This is not a public interface.
 152  */
 153 extern int fx_register_callbacks(fx_callbacks_t *, fx_cookie_t, pri_t, clock_t);
 154 extern int fx_unregister_callbacks();
 155 extern int fx_modify_priority(kt_did_t, clock_t, pri_t);
 156 extern void *fx_get_mutex_cookie();
 157 extern pri_t fx_get_maxpri();
 158 
 159 #endif  /* _KERNEL */
 160 
 161 #ifdef  __cplusplus
 162 }
 163 #endif
 164 
 165 #endif  /* _SYS_FX_H */


   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.
   7  *
   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.
  12  *
  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]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  * Copyright 2015 Joyent, Inc.
  25  */
  26 
  27 #ifndef _SYS_FX_H
  28 #define _SYS_FX_H
  29 


  30 #include <sys/types.h>
  31 #include <sys/thread.h>
  32 #include <sys/ddi.h>
  33 #include <sys/sunddi.h>
  34 #include <sys/cpucaps.h>
  35 
  36 #ifdef  __cplusplus
  37 extern "C" {
  38 #endif
  39 
  40 /*
  41  * Fixed-priority dispatcher parameter table entry
  42  */
  43 typedef struct fxdpent {
  44         pri_t   fx_globpri;     /* global (class independent) priority */
  45         int     fx_quantum;     /* time quantum given to procs at this level */
  46 } fxdpent_t;
  47 
  48 #ifdef _KERNEL
  49 


 127         caps_sc_t       fx_caps;        /* CPU caps specific data */
 128 } fxproc_t;
 129 
 130 
 131 #define FX_CALLB(fxpp)  fxpp->fx_callback
 132 
 133 
 134 /* flags */
 135 #define FXBACKQ 0x02    /* thread goes to back of disp q when preempted */
 136 
 137 /*
 138  * Kernel version of fixed-priority class specific parameter structure
 139  */
 140 typedef struct  fxkparms {
 141         pri_t   fx_upri;
 142         pri_t   fx_uprilim;
 143         int     fx_tqntm;
 144         uint_t  fx_cflags;
 145 } fxkparms_t;
 146 
 147 /*
 148  * control flags (kparms->fx_cflags).
 149  */
 150 #define FX_DOUPRILIM    0x01    /* change user priority limit */
 151 #define FX_DOUPRI       0x02    /* change user priority */
 152 #define FX_DOTQ         0x04    /* change FX time quantum */
 153 
 154 #define FXMAXUPRI       60      /* maximum user priority setting */
 155 
 156 /*
 157  * Interface for partner private code. This is not a public interface.
 158  */
 159 extern int fx_register_callbacks(fx_callbacks_t *, fx_cookie_t, pri_t, clock_t);
 160 extern int fx_unregister_callbacks();
 161 extern int fx_modify_priority(kt_did_t, clock_t, pri_t);
 162 extern void *fx_get_mutex_cookie();
 163 extern pri_t fx_get_maxpri();
 164 
 165 #endif  /* _KERNEL */
 166 
 167 #ifdef  __cplusplus
 168 }
 169 #endif
 170 
 171 #endif  /* _SYS_FX_H */