<div dir="ltr">I'm pleased to report that I've found and fixed the problem.<div>In the "base-kl" rule of src/Makefile.mk, the following settings were in effect:</div><div><div>-DKLH10_ITIME_SYNC=1</div><div>-DKLH10_CTYIO_INT=0</div></div><div><br></div><div>The first one is crucially wrong, and is only really for testing things related to the interval timer. The second isn't related to idling, but should be enabled for interrupt-driven console tty i/o.</div><div>I compared this to a stock KLH10 Makefile.mk to see the differences, and corrected accordingly. No idea when or why these got set that way, but I must've been testing something quite a while ago and forgot about it.</div><div>The optimal settings are:</div><div><div>-DKLH10_ITIME_INTRP=1</div><div>-DKLH10_CTYIO_INT=1</div></div><div>...with the "-DKLH10_ITIME_SYNC=1" line deleted entirely.<br></div><div><br></div><div>After doing this and recompiling, KLH10 is now correctly idling the CPU in TOPS-20.</div><div>If anyone else is experiencing idling problems, I recommend they check these Makefile options.</div><div><br></div><div>Regards,</div><div>Mark</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 5, 2018 at 5:46 PM, Mark Abene <span dir="ltr"><<a href="mailto:phiber@phiber.com" target="_blank">phiber@phiber.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I have this to report:<div>On the test system where cpu idling appears to work, time interval is set to "INTRP", and internal clock is set to "OSINT".</div><div>On my production system (where idling is failing), time interval is "SYNCH", and internal clock is "COUNT".</div><div>These are conditionally detected compile-time options of KLH10, if I'm not mistaken, and I can only conclude are the source of the problem.</div><div>I'll investigate why, on my production machine, these options were detected differently.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-Mark</div><div><br></div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 5, 2018 at 5:07 PM, Mark Abene <span dir="ltr"><<a href="mailto:phiber@phiber.com" target="_blank">phiber@phiber.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks for confirming that, Johnny. On my test linux machine with a clean KLH10 build, I can confirm that the CPU idling IS in fact working once TOPS-20 is booted. I was being misled by the 100% CPU usage at the BOOT prompt.  Now that I've confirmed that the KLH10 code isn't at fault in its interaction with this version of linux, I need to track down why, on my production machine, the interval timer isn't working correctly to support idling.<div><br></div><div>I'll report back with my findings since I'm sure this has affected other folks seemingly "at random".</div><div><br></div><div>Regards,</div><div>Mark</div><div><br></div></div><div class="m_1326666101108711185HOEnZb"><div class="m_1326666101108711185h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 5, 2018 at 10:11 AM, Johnny Eriksson <span dir="ltr"><<a href="mailto:bygg@cafax.se" target="_blank">bygg@cafax.se</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>Mark Abene <<a href="mailto:phiber@phiber.com" target="_blank">phiber@phiber.com</a>> wrote:<br>
<br>
> I'm posting this here in the hopes that there are other KLH10 emulator<br>
> users on HECnet.<br>
<br>
</span>There are, I am one of them.<br>
<span><br>
> I've been using KLH10 with the tap patches for years and years, and idling<br>
> has always worked fine. At some point over the recent couple of years,<br>
> idling stopped working for me on linux (I run ubuntu 16.04.4 LTS with<br>
> latest updates as of yesterday, on a 64-bit intel machine). My CPU is stuck<br>
> at 100% utilization, without even starting an emulated OS (I run TOPS-20).<br>
> In fact, as soon as I type "GO" in KLH10 and before doing anything else,<br>
> the CPU immediately shoots to 100%. Is anyone else seeing this? In older<br>
> versions of ubuntu/linux this didn't happen.<br>
<br>
</span>Handful of points:<br>
<br>
* the idling is done by modifying the idle loop in the guest operating<br>
  system to interact with the KLH10 idler device, not by identifying<br>
  the idle loop like SIMH does.<br>
<br>
* until the OS is up and running, there is no idling.  In other words,<br>
  while at the BOOT> prompt there will be a loop consuming 100% CPU<br>
  waiting for terminal input.  This is normal, and it has always been<br>
  that way.<br>
<br>
* if you have had the same TOPS20 system running, with idling, earlier<br>
  everything points at your host os (ubuntu) no longer cooperating with<br>
  KLH10.  I myself run (mostly) FreeBSD, and I have never had problems<br>
  with idling the TOPSxx systems.<br>
<br>
* for TOPS10, there are a couple of more things to consider, one of them<br>
  is that the idler device by default is at device code 700, which can't<br>
  be accessed from the mode the -10 idle code runs in.  Using 740 works.<br>
<br>
I would look for what has changed in your host os (ubuntu) regarding<br>
system timers and such.  Your setup *should* work.<br>
<br>
> Thanks,<br>
> Mark<br>
<span class="m_1326666101108711185m_-7170374704085781271HOEnZb"><font color="#888888"><br>
--Johnny<br>
</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>