Annotation of researchv9/sys/h/share.h, revision 1.1.1.2

1.1       root        1: /*
                      2: **     Share scheduling parameters
                      3: */
                      4: 
                      5: struct sh_consts
                      6: {
                      7:        /** Parameters **/
                      8: 
                      9:        u_short sc_fl;          /* Scheduling flags */
                     10:        u_short sc_delta;       /* Run rate for scheduler in secs. */
                     11:        u_short sc_maxusers;    /* Max. number of active users */
                     12:        u_short sc_maxgroups;   /* Max. group nesting */
1.1.1.2 ! root       13:        float   sc_ratedecay;   /* Decay rate for ``kl_rate'' */
1.1       root       14:        float   sc_maxpri;      /* Max. absolute priority */
                     15:        float   sc_maxupri;     /* Max. priority for a normal process */
                     16:        float   sc_maxusage;    /* Max. usage considered */
1.1.1.2 ! root       17:        float   sc_decay;       /* Decay rate for ``l_usage'' */
1.1       root       18:        u_long  sc_pridecbase;  /* Base for decay for ``p_sharepri'' */
                     19:        u_long  sc_syscall;     /* Cost of system call */
                     20:        u_long  sc_bio;         /*   "  "  logical block i/o */
                     21:        u_long  sc_tio;         /*   "  "  stream i/o */
                     22:        u_long  sc_tick;        /*   "  "  cpu tick */
                     23:        u_long  sc_click;       /*   "  "  memory tick */
1.1.1.2 ! root       24:        float   sc_pridecay;    /* Decay rate for max nice ``p_sharepri'' */
1.1       root       25:        float   sc_maxushare;   /* Factor for max effective user share */
                     26:        float   sc_mingshare;   /* Factor for min effective group share */
                     27:        u_long  sc_sparep[1];   /* <spare> */
                     28: 
                     29:        /** Feedback **/
                     30: 
                     31:        float   sc_totusage;    /* E{1/kl.l_usage} */
                     32:        float   sc_sparef0;     /* <spare> */
                     33:        u_short sc_users;       /* Number of active users */
                     34:        u_short sc_groups;      /* Number of active groups */
                     35:        float   sc_highshpri;   /* High value of p_sharepri */
                     36:        float   sc_maxcusage;   /* Max. current usage */
                     37:        u_long  sc_syscallc;    /* Total counts of system calls */
                     38:        u_long  sc_bioc;        /*   "     "    "  logical block i/o */
                     39:        u_long  sc_tioc;        /*   "     "    "  stream i/o */
                     40:        u_long  sc_tickc;       /*   "     "    "  cpu ticks */
                     41:        u_long  sc_clickc;      /*   "     "    "  memory ticks */
                     42:        u_long  sc_sparef[4];   /* <spare> */
                     43: };
                     44: 
                     45: extern struct sh_consts        shconsts;
                     46: 
1.1.1.2 ! root       47: #define        DecayRate       shconsts.sc_ratedecay
1.1       root       48: #define        DecayUsage      shconsts.sc_decay
                     49: #define        Delta           shconsts.sc_delta
                     50: #define        Groups          shconsts.sc_groups
                     51: #define        LASTPARAM       shconsts.sc_sparep[0]
                     52: #define        MAXGROUPS       shconsts.sc_maxgroups
                     53: #define        MAXPRI          shconsts.sc_maxpri
                     54: #define        MaxSharePri     shconsts.sc_highshpri
                     55: #define        MAXUPRI         shconsts.sc_maxupri
                     56: #define        MaxUsage        shconsts.sc_maxcusage
                     57: #define        MAXUSAGE        shconsts.sc_maxusage
                     58: #define        MAXUSERS        shconsts.sc_maxusers
                     59: #define        MAXUSHARE       shconsts.sc_maxushare
                     60: #define        MINGSHARE       shconsts.sc_mingshare
                     61: #define        PriDecay        shconsts.sc_pridecay
                     62: #define        PriDecayBase    shconsts.sc_pridecbase
                     63: #define        Shareflags      shconsts.sc_fl
                     64: #define        TotUsage        shconsts.sc_totusage
                     65: #define        Users           shconsts.sc_users
                     66: 
                     67: /*
                     68: **     Share scheduling flags
                     69: */
                     70: 
                     71: #define        NOSHARE         01      /* Don't run scheduler at all */
                     72: #define        ADJGROUPS       02      /* Adjust group usages */
                     73: #define        LIMSHARE        04      /* Limit maximum share */
                     74: 
                     75: #ifdef KERNEL
                     76: /*
                     77: **     Request software interrupt to run scheduler
                     78: */
                     79: 
                     80: #ifdef vax
                     81: #define        setshsched()    mtpr(SIRR, 0x1)
                     82: #define        splshsched()    splx(0x1)
                     83: #endif
                     84: #ifdef sun
                     85: #define        setshsched()    softcall(share, (caddr_t)0);
                     86: #define        splshsched()    spl1()
                     87: #endif
                     88: 
                     89: /*
                     90: **     Array of costs for a cpu tick biased by p_nice values.
                     91: */
                     92: 
                     93: extern long            NiceTicks[];
                     94: 
                     95: /*
1.1.1.2 ! root       96: **     Table for pre-calculated priority decays.
1.1       root       97: */
                     98: 
                     99: extern float           NiceDecays[];
1.1.1.2 ! root      100: 
        !           101: /*
        !           102: **     Table for pre-calculated rate increments.
        !           103: */
        !           104: 
        !           105: extern float           NiceRates[];
1.1       root      106: #endif KERNEL
                    107: 
                    108: #define        _SHARE_         1

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.