[Simh] SIMH 3.8-1 IDLE in VMS, interesting CPU usage

Jason Stevens neozeed at gmail.com
Tue Feb 17 14:53:57 EST 2009


Your graph is a 404...

Also I've noticed the 'old' idle code seems to work better...

I could give you a diff, or just spell out the change...

in vax_cpu.c

uint32 cpu_idle_ipl_mask = 0xB;                         /* idle if on IPL 3 */
uint32 cpu_idle_type = 1;                               /* default to VMS */
int32 cpu_idle_wait = 200;                             /* for these cycles */

static struct os_idle os_tab[] = {
    { "OLDVMS", 0xB },
    { "VMS", 0x8 },
    { "NETBSD", 0x2 },
    { "ULTRIX", 0x2 },
    { "OPENBSD", 0x1 },
    { "32V", 0x1 },
    { NULL, 0 }
    };

t_stat cpu_set_idle (UNIT *uptr, int32 val, char *cptr, void *desc)
{
uint32 i;

if (cptr != NULL) {
    for (i = 0; os_tab[i].name != NULL; i++) {
        if (strcmp (os_tab[i].name, cptr) == 0) {
            cpu_idle_type = i + 1;
            cpu_idle_ipl_mask = os_tab[i].mask;
                if(cpu_idle_ipl_mask==0xB)
                        cpu_idle_wait=200;
                else
                        cpu_idle_wait=1000;
            return sim_set_idle (uptr, val, cptr, desc);
            }
        }
    return SCPE_ARG;
    }
return sim_set_idle (uptr, val, cptr, desc);
}


this gives the code an 'oldvms' option, which has the timings from
3.7-3 and seems to work fine for me...

On Tue, Feb 17, 2009 at 2:47 PM, Marc Chametzky <marc at bluevine.net> wrote:
> I'm setting up an ESXi system into which I'm moving my Solaris server,
> and now setting up some ubuntu JeOS virtual systems to host some
> trailing-edge hardware emulations. One nice thing is that I can dedicate
> part of a CPU to the VAX emulator and prioritize it lower, so it can
> spin its wheels appropriately, leaving the overall server available for
> other tasks as needed.
>
> As a test, I turned on IDLE, and I got this very interesting graph:
> http://www.bluevine.net/~marc/CPUidle.jpg
>
> When IDLE is disabled, the CPU usage is a straight line, as it should
> be. I find it quite interesting that with IDLE, it slowly uses more CPU
> until it peaks out at 100% of its allotment, then it drops back down to
> just about 15% and starts climbing again.
>
> Between the two, I prefer the consistency of the straight line, so I'll
> probably disable IDLE again. I just thought this was interesting enough
> to share.
>
> --Marc
> _______________________________________________
> Simh mailing list
> Simh at trailing-edge.com
> http://mailman.trailing-edge.com/mailman/listinfo/simh
>



More information about the Simh mailing list