[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian on Pine64 H64B?

On Tuesday 21 September 2021 07:59:42 Lennart Sorensen wrote:

I'm subbed, no need to CC: me.

> On Tue, Sep 21, 2021 at 05:00:12AM -0400, Gene Heskett wrote:
> > No, in fact disabling that is a bios setting done before even
> > installing LinuxCNC. It may make winderz seem to be better, but that
> > context switch, done by the relatively slow bios memory is a
> > performance killer even if the code is stashed in L1 cache. I've 5
> > i5's of various builds here, and none of them have that enabled even
> > if its not running machinery. This cheap 6 core i5 certainly doesn't
> > need it and its actually running at 800 MHz, but capable of 3.7 GHz.
> > Close to zero heat, all 6 cores are below 32C right now.
> The BIOS has nothing to do with context switching.  Hyperthreading
> doesn't even do context switching, it has two sets of registers so it
> can do free context switching while the other thread is waiting for
> something.

Humph, idea borrowed from the Z-80 of the very late 70's, or possibly 
from the TI 9900's, which had no registers, all in memory and it changed 
context by resetting the index counter to a different address for a new 
set of registers. Same idea, different execution but it worked well.

But it in 3 examples of the Z-80 in about 1981 while I was coding up an 
ATS that looked like a transmitter remote control (different FCC rules) 
only 1 would reliably swap registers when it read an E6 command. I paid 
for two more as the warranty had expired by the time I discovered it, so 
in 5 examples, I actually got two that worked. They were about $35/copy 
at the time. I mistakenly thought it might have been a step up from the 
first micro-controller I used to make a commercial production tool at a 
tv station, an RCA 1802.

That was in 1979-80, and turned out to be so handy they were still using 
it in 1995. Thats a couple eons in tv station control room gear life. 
The RCA Just Worked, the Zilog not so much. I've done several other tv 
production related projects since, never touched a Zilog product again. 
Very bad aftertaste.

Motorola's 6809, now the smarter Hitachi 6309, a cmos workalike until we 
discovered it had more registers than the moto version. A fact that 
hitachi is still contractually enjoined from ever confirming the 
existance of, they had permission to clone it, but never saw the moto 
masks, so they microcoded it, filling up the empty spaces in the 6809 
mapping. So that was my fav small cpu for 30 years.

In any event, it sure screws things up in terms of IRQ latency. The other 
thing we turn off if we can is the SMS stuff, it can throw a several 
millisecond monkey wrench into the gears if software stepping. Not very 
often, but will leave its mark (litteraly) on the part being carved at 
the time. A gear tooth out of position, which since cutting a gear tooth 
is a repetitive operation, means that tooth may be narrower by .001".

> Hyperthreading's only big problems are that it makes execution speed
> of each thread unpredictable and since two threads are sharing a core,
> it reduces the performance of single threaded code on that core.

Another item that impinges on the arm speed is that the arm doesn't have 
the concept, so we've been told, of "isolcpus", where a cpu core is 
removed from the schedulers execution pool, and later given the job of 
handling the irq's. This works well on the wintels, but not as 
effectively on the AMD stuff.

My understanding is that you can isolate an arm core but cannot later 
assign it a task until a powerdown reset is done.  So code that can 
service an irq on x86-64 in 4 microseconds, can only do it in about 12 
microseconds on arm because a core to do it on has to be selected and 
the context switch performed. Fireing up firefox might extend that lag 
to 200 microseconds, but otherwise the worst case on the rpi4 is around 
50 microseconds but it might take several minutes to record that big a 
lag with the kernel I'm using. That has not been a problem with the work 
I've done with it.

Is that understanding correct ?

Thanks Lennart. An interesting discussion indeed.

Cheers, Gene Heskett
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>

Reply to: