#linuxcnc-devel Logs

Mar 22 2018

#linuxcnc-devel Calendar

09:32 AM mozmck: I wonder how much effect on latency (if any) the CONFIG_RETPOLINE (spectre fix) option has in a preempt-rt kernel?
09:34 AM seb_kuzminsky: good question!
09:34 AM mozmck: I'm building a kernel and thinking about disabling it. Seems like machine controls should not need it?
09:36 AM mozmck: Looks like it doesn't do much if I'm not using GCC 7.3 or so anyhow.
09:48 AM seb_kuzminsky: my understanding is there's retpoline support in all(?) the parts of the kernel that are implemented in assembly, so you get that anytime you enable CONFIG_RETPOLINE, no matter what compiler you use
09:49 AM seb_kuzminsky: but the parts of the kernel that are written in C (which is almost all of it) need compiler support (and CONFIG_RETPOLINE) to get retpoline support
09:49 AM seb_kuzminsky: i think all these meltdown/specter problems are only problems if someone can run malicious code on your machine
09:50 AM seb_kuzminsky: if you have an isolated ("airgapped") machine, or one where you restrict logins and listening demons and cgi scripts and stuff, then you can probably turn it off
09:51 AM seb_kuzminsky: i'd be super curious to hear what it does to latency though, please let me know if you do that experiment!
09:52 AM mozmck: I asked the realtime guys and they said that RETPOLINE without compiler support is "minimal and you probably wont notice", and: "with a retpoline enabled compiler its larger but not really bad"
09:53 AM mozmck: They said PAGE_TABLE_ISOLATION is much worse
09:55 AM mozmck: Unless someone is doing banking and etc on their cnc machine, I would think there would not be much information worth stealing?
09:59 AM seb_kuzminsky: the sci-fi thriller writer in me is imagining state-level actors spying on the parts that grassroots hobbyist-fabricators are making
10:02 AM mozmck: Yeah, which they are putting the designs for on the internet under open-source licenses :-)
10:02 AM seb_kuzminsky: lol
10:03 AM mozmck: I think I will leave in the meltdown/spectre fixes and see what latency is like. If it is not good, I may recompile one with those disabled and check.
10:03 AM mozmck: Or maybe I'll just do both anyhow and see.
10:04 AM seb_kuzminsky: no, this is later, during the resistance, when they've gone underground and are fabbing gear to throw off the yoke
10:04 AM mozmck: I'm getting fairly poor results with 4.9.76 64-bit on i3-7100 computers, but great latency on the same computers with my 4.1.7 32-bit kernel
10:05 AM seb_kuzminsky: i wonder how 4.9 64-bit does
10:05 AM mozmck: So now I'm trying the latest RT 4.14.x 64-bit so see if it helps.
10:05 AM seb_kuzminsky: err, 4.9 32-bit
10:05 AM seb_kuzminsky: i mean, is it 4.9 vs 4.1 that makes it slow, or is it 32-bit vs 64-bit?
10:05 AM mozmck: I don't know - I'm trying to go to 64 bit because various stuff is beginning to drop 32-bit support.
10:06 AM seb_kuzminsky: yeah, it seems to be about that time
10:06 AM mozmck: I don't really think it is the 64-bit. I get great results on other CPUs. An N3050 celeron did great.
10:07 AM seb_kuzminsky: i'm really curious how the new risc-v soc does. single issue, no branch prediction (as i understand it), 1.5 GHz, could be really great for realtime applications
10:10 AM mozmck: That would sure be interesting. I don't think they quite have a complete chip out yet though last I saw.
10:10 AM seb_kuzminsky: they do now
10:11 AM seb_kuzminsky: the "Hi-Five Unleashed": https://www.sifive.com/products/hifive-unleashed/
10:11 AM seb_kuzminsky: a mere $999
10:11 AM seb_kuzminsky: Early Access boards will be available March 2018.
10:12 AM mozmck: I saw the video where they introduced that, and it seemed like there were some things missing, but I don't remember for sure now. I have to run for now - bbl
10:12 AM seb_kuzminsky: a friend of mine just came back from the Embedded Linux Conference in Portland, he said they had a hackathon with many of those boards out for people to play with
10:12 AM mozmck: Interesting!
10:13 AM seb_kuzminsky: there's a fedora port underway: https://lwn.net/SubscriberLink/749443/deefbe0bd5ed5286/
10:15 AM seb_kuzminsky: coffee time!
12:50 PM seb_kuzminsky: ugh, i was hasty and spread lies :-(
01:22 PM jepler: seb_kuzminsky: which part?
01:22 PM seb_kuzminsky: i said that time numbers reported by halcmd are in ns, but they're in whatever rtapi_get_clocks() gives you, which is sometimes ns and sometimes cpu clock cycles
01:36 PM pcw_mesa: Most of the times/tmaxes that interest me are in CPU clocks
06:33 PM andypugh: Well, this is embarassing. I have changed the Z servo on my mill and now it runs backwards. And I can’t remember how to reverse an axis with resolvers and an 8i20.
06:34 PM andypugh: (Well, I have managed to reverse it, but the PID tuning went horrible, so I think I did it wrongly)
06:39 PM seb_kuzminsky: yikes
06:39 PM seb_kuzminsky: is your config in a local git?
07:07 PM andypugh: No, it exists only on the machine
07:07 PM andypugh: And, if anyone shouldbe able to figure it out, it’s me. I wrote both the resolver driver and the 8i20 driver.
07:09 PM skunkworks_: there is a disconnect usually between the developer and the user.. even if it is the same person