klange changed the topic of #osdev to: Operating System Development || Don't ask to ask---just ask! || For 3+ LoC, use a pastebin (for example https://gist.github.com/) || Stats + Old logs: http://osdev-logs.qzx.com New Logs: https://libera.irclog.whitequark.org/osdev || Visit https://wiki.osdev.org and https://forum.osdev.org || Books: https://wiki.osdev.org/Books
<kingoffrance> id be more worried about the ram
<clever> heat: i think i compiled it on 200mhz once or twice
<clever> well, not modern, it was maybe 2.6
<heat> i have 32 gigs of ram
<heat> 11th gen i7
<heat> permanently stuck throttling
<heat> because someone messed up power management
<heat> trying out the newest kernel which should fix the issue... but compiling it has been a pain
<mrvn> heat: because they weren't polymorphic until recently
thinkpol has quit [Remote host closed the connection]
thinkpol has joined #osdev
<mrvn> heat: One reason for the template is that a function pointer, a callable and a lambda have different types.
<mrvn> (which kind of sucks)
<heat> template <typename Type> struct deleter { virtual operator()(Type *) = 0 };
<mrvn> heat: but I can pass `::free` or `[](Type *t) {delete t;}` as deleter too
<heat> the drawback of defining a new deleter object is substancially smaller than not being able to have two unique_ptrs in a single array because their deleters are different
<mrvn> heat: oh yeah, they should be type erased for sure.
<mrvn> template <typename T> class unqiue_ptr { template <Deleter> unique_ptr() .... };
<bslsk05> ​github.com: capnproto/memory.h at master · capnproto/capnproto · GitHub
<heat> we use this in the workers runtime
<heat> non-releasable, deleter is not a part of the template
<mrvn> heat: the virtual deleter has overhead though.
<heat> sure
<heat> its a small tradeoff
<heat> for a lot more usability
<mrvn> type erasure can do it without the virtual.
<mrvn> and allow function pointers and lambdas
joukahainen has joined #osdev
<heat> how would you do type erasure here?
<mrvn> heat: like std::function
<zid> s/int //g
<heat> std::function isn't free as well
<heat> also allocates
<heat> that definitely has more overhead
<zid> heat can I have a kebab
<heat> i guess?
<zid> okay lmk when it's about to arrive so I can put on clothes
<mrvn> heat: there are lots of ways to do type erasure. One of them even is using your deleter.
gildasio has joined #osdev
<heat> well if you have a good idea, go ahead
<heat> kj is C++20 and open for contributions
<mrvn> I'm still building my own STL with intrusive data types for my kernel.
<mrvn> Main point is that the data types are aimed at composability.
gog has quit [Quit: byee]
gog has joined #osdev
gxt__ has quit [Remote host closed the connection]
gog` has joined #osdev
gxt__ has joined #osdev
gog` has quit [Client Quit]
gog` has joined #osdev
gildasio has quit [Remote host closed the connection]
gxt__ has quit [Write error: Connection reset by peer]
gxt__ has joined #osdev
gildasio has joined #osdev
gog` has quit [Client Quit]
CaCode_ has joined #osdev
CaCode has quit [Ping timeout: 244 seconds]
gxt___ has joined #osdev
gxt__ has quit [Ping timeout: 268 seconds]
gxt___ has quit [Remote host closed the connection]
gxt___ has joined #osdev
<moon-child> mrvn: don't rust mutexes work like that?
Vercas has quit [Ping timeout: 268 seconds]
FatAlbert has joined #osdev
Vercas has joined #osdev
gog has quit [Ping timeout: 276 seconds]
\Test_User has quit [Ping timeout: 244 seconds]
\Test_User has joined #osdev
joukahainen has quit [Quit: leaving]
doug16k has joined #osdev
heat has quit [Ping timeout: 240 seconds]
<doug16k> "Loongson SIMD instructions are semi-classified and are unavailable in publicly available compilers and assemblers". wow
<doug16k> good luck with that
<doug16k> as if it weren't already painful enough to use SIMD
arch_angel has joined #osdev
vai has joined #osdev
<geist> heh well okay, my interest went from 1 out of 10 to 0 out of 10
[itchyjunk] has quit [Remote host closed the connection]
opal has quit [Ping timeout: 268 seconds]
opal has joined #osdev
toluene has quit [Read error: Connection reset by peer]
Vercas has quit [Remote host closed the connection]
gxt___ has quit [Write error: Connection reset by peer]
gxt___ has joined #osdev
toluene has joined #osdev
Vercas has joined #osdev
arch_angel has quit [Ping timeout: 264 seconds]
FatAlbert has quit [Ping timeout: 260 seconds]
vai has quit [Ping timeout: 240 seconds]
arch_angel has joined #osdev
vai has joined #osdev
LostCarcosa has joined #osdev
FatAlbert has joined #osdev
LostCarcosa has quit [Client Quit]
liz has quit [Quit: Lost terminal]
opal has quit [Remote host closed the connection]
opal has joined #osdev
vai has quit [Ping timeout: 240 seconds]
the_lanetly_052 has joined #osdev
pretty_dumm_guy has joined #osdev
bauen1 has quit [Ping timeout: 244 seconds]
SGautam has joined #osdev
arch_angel has quit [Ping timeout: 244 seconds]
bauen1 has joined #osdev
ozarker_ has joined #osdev
ozarker has quit [Quit: ZNC 1.8.2 - https://znc.in]
mzxtuelkl has joined #osdev
FatAlbert has quit [Quit: WeeChat 3.5]
opal has quit [Remote host closed the connection]
opal has joined #osdev
mzxtuelkl_ has joined #osdev
wolfshappen_ has joined #osdev
mzxtuelkl has quit [Ping timeout: 276 seconds]
wolfshappen has quit [Ping timeout: 260 seconds]
ZipCPU_ has joined #osdev
ZipCPU has quit [Ping timeout: 256 seconds]
ZipCPU_ is now known as ZipCPU
GeDaMo has joined #osdev
gog has joined #osdev
qubasa has quit [Ping timeout: 276 seconds]
qubasa has joined #osdev
the_lanetly_052_ has joined #osdev
the_lanetly_052 has quit [Ping timeout: 256 seconds]
arch_angel has joined #osdev
heat has joined #osdev
Piraty has quit [Quit: No Ping reply in 180 seconds.]
Piraty has joined #osdev
CaCode_ has quit [Ping timeout: 244 seconds]
bauen1 has quit [Ping timeout: 240 seconds]
joukahainen has joined #osdev
bauen1 has joined #osdev
terminalpusher has joined #osdev
bauen1 has quit [Ping timeout: 255 seconds]
bauen1 has joined #osdev
dennis95 has joined #osdev
SGautam has quit [Quit: Connection closed for inactivity]
<mrvn> doug16k: it's like they don't want us to buy their CPUs
ethrl has joined #osdev
[itchyjunk] has joined #osdev
terminalpusher has quit [Remote host closed the connection]
Vercas has quit [Quit: buh bye]
Vercas has joined #osdev
<heat> i don't understand the point of loongarch tbh
<heat> I think that the only point of it is CHINA NUMBER 1
<heat> and for CHINA NUMBER 1, you could just use riscv
<zid> TAIWAN #1
Vercas has quit [Quit: buh bye]
Vercas has joined #osdev
dude12312414 has joined #osdev
<gog> meowarch
<gog> gog number 1
<zid> You're not a real country until my country has invaded you
<gog> we did have a war
<gog> sort of
<gog> the cod wars
<zid> The republic of gog and the UK?
<gog> yes
<zid> big fat kitty eatin all the cod
<gog> yes
<gog> i will deny the right of fish and chips to the whole of the uk
<gog> your society will crumble without it
<sbalmos> I'll build my cabin in the mountains, declare independence as a micronation, and refuse entrance to all the thru-hikers on the trail.
<gog> good plan
<gog> aay my next week
<gog> s work schedule is in and it suuuuuuucks
<gog> :(
<mjg_> what's your job
<mjg_> sre or something?
<zid> sinking british fishing vessels
<mjg_> last time i had a schedule was ~10 years ago
<mjg_> and i stopped showing up to most meetings about 7 years ago
<mjg_> or to put it differently, if you are a programmer and are at fixed schedule, you are doing it wrong
<gog> mjg_: phone support
<gog> well i'm chat support tonight
<sbalmos> zid: Perfect name for a fleet of charter British fishing vessels - Fish'n Chip's Fish'n Ships
<gog> i might get a programming job at this place in the fall
<gog> if business continues to boom
<mjg_> good luck man
<gog> txh
<mjg_> support is the worst, on both ends :-P
<gog> my favorite is when customers lie that they've been waiting on hold for x minutes when i can see exactly how long
<gog> i know it's frustrating but don't fucken lie to me pls
<mjg_> that's nothing
<mjg_> they lie about what they did to run into a problem
<gog> yes also that
<mjg_> at my first job one little shit was adamant his website worked fine, and it suddenly broke
<mjg_> i had a look at the code, it blatantly never worked because all pathnames were wrong
<j`ey> gog: waiting on the phone creates some kinda local time warp
<gog> some customers have figured out that if they're angry they can get more special attention from the escalation team
<gog> but they don't know that the escalation team keeps track of this and will snub repeat offenders
<mjg_> is that an actual team?
<gog> yeah
<gog> it's one woman
<gog> so "team"
<mjg_> ok, same trick as at red hat
<gog> yeh
<mjg_> customer is claims unhappiness
<mjg_> they can "request management escalation"
<mjg_> then someone shows up to claim they acknowledge
<mjg_> case gets shifted to someoene else, but that someone else is not any better
<mjg_> best shit ever is "follow the sun" cases, where supposedly the case is being worked on 24/7
<mjg_> from one geo to the next
<mjg_> in practice the trick is to ask something stupid mid-shift and cross your fingers the customer wont respond before you are done for the day
<mjg_> and then it's not your problem
<mjg_> the customer is lucky if there is one competent person working on it at all
<gog> the annoying part for me is that there are actual problems that come through that patient and respectful people have brought to us
<gog> and jackasses with non-problems come to us and behave like the world is ending
<mjg_> i think th worst bit about it is that customer "satisfaction" is mostly tied to how screwed they think they are
<mjg_> and has no bearing on how hard the problem is
<mjg_> then you get "customer praise" for people which solve lol problems
<mjg_> and nothing for people who do something challenging
<gog> yeh
gxt___ is now known as gxt
dude12312414 has quit [Remote host closed the connection]
Vercas has quit [Remote host closed the connection]
Vercas has joined #osdev
dude12312414 has joined #osdev
joukahainen has quit [Quit: Lost terminal]
CaCode has joined #osdev
Terlisimo has quit [Quit: Connection reset by beer]
vdamewood has joined #osdev
CaCode_ has joined #osdev
Terlisimo has joined #osdev
CaCode has quit [Ping timeout: 276 seconds]
gog has quit [Ping timeout: 240 seconds]
Goodbye_Vincent has quit [Quit: Ping timeout (120 seconds)]
kingoffrance has quit [Ping timeout: 265 seconds]
gxt has quit [Quit: WeeChat 3.5]
gxt has joined #osdev
Goodbye_Vincent has joined #osdev
dennis95 has quit [Quit: Leaving]
gog has joined #osdev
* geist yawns at the channel
* vdamewood yawns at geist
* moon-child coffees geist
<geist> yay coffee
<geist> i need that
<vdamewood> Can I be coffeed too?
<geist> coffee for everyone!
CaCode_ has quit [Quit: Leaving]
<vdamewood> Yay!
* geist orders one of those boxes of coffees you can get from starbux
* vdamewood drinks his coffee.
<geist> like 4 liters of it
<vdamewood> We might need 3 boxes.
<\Test_User> *30
* vdamewood wonders how long a fish can survive in coffee.
<geist> ah actually they're 96 oz (for some dumb reason i looked it up) which is like 2.8 L
<vdamewood> Why the hell can't they use normal units?
<geist> they probably do in other countries
* vdamewood drinks his 2-liter bottle of Pepsi.
<geist> what is odd is exactly that: in the US it's all imperial *except* soda bottles
<geist> that particular industry apparently switched over forever ago and then learned they were psyched out and the rest of the US didn't follow
<geist> so you get liter bottles of soda but cans and smaller stuff is still oz
<mrvn> and if it's oz then why not 100 oz?
<vdamewood> mrvn: Multiples of 8 are prefered.
<mrvn> how much is 8 oz?
<\Test_User> beause imperial units are insane
<\Test_User> 1 cup
<vdamewood> mrvn: 130 ml or so.
<vdamewood> 230*
<geist> ah yes just looked it up: 2 liter pepsi bottles were indroduced in the mid 70s just when tere was some momentum to switch US to metric
<vdamewood> 236.588 according to google
<geist> but then it faltered and never gained steam again
<\Test_User> reason: stubborn amerians
[itchyjunk] has quit [Remote host closed the connection]
* \Test_User may or may not happen to be one of them
[itchyjunk] has joined #osdev
<mrvn> we may or may not hate you for it
<geist> well sure. but OTOH, if metric didn't exist you wouldn't really notice it. it's not like we're totally unable to do commerce
<vdamewood> I'm stubborn, and I'm american, but I prefer metric.
<geist> it just is a different set of things
<\Test_User> if everything here switched to metric then it'd be fine, but as-is using metric is insane :P
<\Test_User> *using metric here
<\Test_User> well, for most things
<vdamewood> \Test_User: Where I live, it's 20 degrees out, and it's feeling nice. I hope it doesn't get any warmer though.
<geist> yah i have no problem with either. i can switch pretty easily if i have to. every time i visit canada or whatnot i love the novelty of trying to immerse myself in metric and have no real issue
<geist> but it's no point trying to be stubborn and use metric in the US, you just come across as a nerd or a crackpot. it serves no purpose
<vdamewood> geist: I come off as both!
<geist> i know of a few people that do that: they're from canada and will *refuse* to acknolwedge imperial units
<\Test_User> vdamewood: degrees celsius yes ik how metric works and I dont dislike it, but I generally use non-metric simply bc everything here also is
<geist> in a really annoying way. i just avoid mentioning temperature or whatnot with them
<geist> and they've literally lived in the US for over 10 years
<geist> it's really really annoying to be honest
<vdamewood> \Test_User: FWIW, I'm in the US myself.
<geist> like 'oh yeah that's baout 50 miles away' 'what is 50 miles? i have no idea how far that is!'
<geist> eyes roll
<\Test_User> lol
<zid> Just be like the UK where everything is metric except for basically everything that isn't
<vdamewood> geist: Tell them to divide by 0.6.
<\Test_User> zid: that defines any place
<zid> no you just need to read it gooder
<geist> 'in my country i dont have to blahlbhalbhalhblah.' it's one of the few times your brain actually honestly thinks: 'well you can go back if you want'
<vdamewood> Even the US is like that.
<vdamewood> THE US uses metric for everything but weight, distance, and temperature.
<zid> and time
<\Test_User> zid: "for basically (everything that isn't)" vs "for (basically everything) that isn't"
<vdamewood> Technically, the US uses metric time.
<zid> \Test_User: aha you found the gooder reading
<geist> yah basically stuff that common folks use is imperial but most of sciene and whatnot uses metric. i think folks that work with tools are stuck with the worst of it: they need imperial and metric versions of all their socket wrenches and whatnot
<mrvn> vdamewood: megaseconds?
<geist> which is really annoying. i would love to only keep around metric wrenches personally
* gog fishies
* vdamewood gives gog geist fishy
<mrvn> I'm in germany and I still need imperial wrenches
<vdamewood> Why did my computer tab two g names?
<geist> yah and the fraction stuff on wrenches is really annoying
* PapaFrog steals geist's 10mm sockets
* vdamewood gives gog a fishy
<geist> though obviously once you use it enough you just intrinsically know that 3/8 is > 1/4, etc
* vdamewood gives geist a coffee.
<geist> PapaFrog: yah 10mm in particular. i keep losing that one since it's pretty common
<vdamewood> geist: In my head, I just convert everything to the lowest unit, so if I only work with /8 and bigger, then 1/4 is 2/8
<zid> We should just make everything 10mm
<zid> keyboard? 10mm. Steam liner engine? 10mm
<geist> vdamewood: well sure. i mean it's not intractable, and over time you just memorize it basically
<geist> what is probably highly annoying to folks is to use the intermediate units like decimeters or whatnot
<geist> oh that's like 4.5 decimeters tall
<PapaFrog> 45cm.. Got it.
<geist> yah but i doubt folks really use those do they?
<geist> in everyday speech
<PapaFrog> I doubt it.
<geist> just centi and milli and kilo probably
<clever> i recently heard somebody describe an adjustment they made, as 8 1/4 turns
<clever> just call it 2 turns :P
<\Test_User> geist: even worse is when one person needs another person to make smth and they're using different units
<PapaFrog> I read 8 1/4 turns as 8.25 turns.
<geist> same
<vdamewood> 8*1/4 turns
<geist> clever: they're probably trying to describe exactly how they made the adjustment
<clever> vdamewood: yeah, translating voice to text lost a bit
<geist> ie, they turned it 1/4 8 times
<\Test_User> lol
<vdamewood> PapaFrog: 18 pi radians?
<PapaFrog> I turned it 1/4 of the way eight times.
<clever> geist: i think what he was doing, was making 1/4 of an adjustment at a time, until it was balanced
<geist> like adjusting some throttle needle or whatnot
<geist> right
<vdamewood> err 16 pi radians
<geist> gradians!
<clever> and then instead of converting it to a sane number, he left it as a fraction
<geist> that's one that isn't really use anywhere right? 400 degrees in a circle, etc?
<vdamewood> geist: 200 of those?
<vdamewood> Oh, nope. 800 of those
<geist> anyway, trying to be metric in the US is similar to trying to only use 24h time everywhere and expecting everyone else to know what you're saying
<vdamewood> geist: Let's meet up at 17:00
<geist> i am 100% 24h time around the house, but i still have to convert for others because
<geist> yah i'd be 100% down with that
<PapaFrog> I do that.. "I'll meet you at oh eight hundred."
<clever> "2022-07-08 15:06:44 bedroom temp: 23.50c(74.30f), kitchen: 24.81c(76.66f), living room: 24.06c(75.31f), outdoor: 18.75c(65.75f), server: 25.31c(77.56f) VCC: over 4.5 volts portb: 00000000"
<clever> geist: and thats why i wrote a special format function, to convert c to f, and print both at once
<clever> just so i could make the silly americans happy :P
<vdamewood> geist: So where shall we meet? Chehalis?
<PapaFrog> My son insists on measuring hardware temps in Fahrenheit.
<PapaFrog> smh
<clever> PapaFrog: i keep seeing people on the rpi forums, either reporting a C figure with an F at the end, or converting to F and then not telling anybody
<clever> PapaFrog: and then asking why its overheating
<\Test_User> lol
<PapaFrog> Tjs are not listed in F.
<clever> yeah, the hardware always lists it in c
<\Test_User> just convert it all to K so they can complain when it's over 300 :P
<vdamewood> Oh, cool. I just googled half way between Portland and Seattle and it said Chehalis. My Geography hasn't failed me!
<\Test_User> s/when/that/
<PapaFrog> My GPU is at 4000K..
the_lanetly_052_ has quit [Ping timeout: 240 seconds]
<\Test_User> 4000K and I wouldn't want to be anywhere near
<PapaFrog> Has a nice yellow glow to it.
<clever> PapaFrog: although, the hw register itself, is just a number with no units really attached to it...
<geist> and yeah normal everyday climate temps work fairly well to me in F or C, but oce you get out of that range it just gets silly to use F
<geist> 180F? is that hot? kinda. etc
<clever> 57 float converted = offset - (raw & 0x3ff) * increment;
<clever> 34 .increment = 0.538,
<clever> 35 .offset = 407
<mrvn> geist: where does water boil?
<geist> 212F
<PapaFrog> 100C
* PapaFrog hides
<clever> PapaFrog: you have to apply this forumla, at least when on a bcm2835, to convert it to C, and just changing those constants, could give you F natively
<vdamewood> geist: I can see once exception. My oven is marked in F.
<geist> F is currently defined *precisely* as 32F = 0C, 212F = 100C
<\Test_User> 373K
<\Test_User> >:)
<PapaFrog> That too, \Test_User
<geist> so that's why it's a straight 9/5 conversion +/- 32 offset
<mrvn> geist: huh? isn't F defined by 0F = coldest you can get salt water?
<geist> in the old days, tats why i pointed out it's 'currently'
<mrvn> are you sure it isn't defined against Kelvin?
<geist> as in at some point in the fairly recent past (last 100 years or so) the official F measurement was rebased to be precisely based on the same thing that C is
<vdamewood> mrvn: It was actually a specific solution that was known to produce the same temperature every time. And that's how Farenheit defined it, but not how the US defines it now.
<geist> ie, freezing/boiling point of water
<PapaFrog> At STP
<geist> yah
<PapaFrog> Important qualification.
<vdamewood> mrvn geist: And also, every US unit has been redefined as some SI quantity. For example, and Inch is defined as 2.54cm (or 25.4mm, I forget the exact definition)
<geist> apparently at some point in it past it was still a little wishy washy and/or something like 32.1.... was freezing, so it was latched
<geist> yah, so at least it's precise, it's just anacronistic
<clever> geist: wasnt horse blood used as one of the data-points?
SGautam has joined #osdev
<geist> one thing i am surprised to still see is a lot of circuit layout stuff still uses mils as a standard
<mrvn> geist: more like all of it
<PapaFrog> 32.1 is only 0.3% off from 32.
<geist> it's one of those cases where mils are a slightly nicer unit since it's somewhat smaller than a mm in a convenient way
<geist> iirc 1 mil == 8.x mm
<vdamewood> One convenient thing thought, is that 98.6 F degrees is exactly 37 C.
<geist> to convert from F to C in my head i just remember 10C = 50F, 20C = 68F, 30C = 86F, 40C = 104F, etc. you see the pattern
<geist> for every 10C it's 18F
<mrvn> vdamewood: I find it very annoying that at 100F you run a fever.
<geist> and you can kinda lerp between those fairly easily
<vdamewood> mrvn: Would you prefer 38C?
<vdamewood> geist: I do the same thing, but every 9/5
<mrvn> vdamewood: I would have prefered 100F to be body temp
<geist> 9/5 or 18/10 either way
<vdamewood> It just means I have more memorized points.
<gog> 25 or 6 to 4
<geist> iirc that was the original informal measurement. take a thermometer you just made, stuff it in your armpit for a while, then pull it out and notch 100F on it where it is
<vdamewood> But I really only have 0c to 30c memorized.
<PapaFrog> We just need to genetically engineer a new human that has a normal body temperature of 100F.
<PapaFrog> Eugenics ftw.
<mrvn> Stupid werewolves working in the thermometer factory.
<geist> i think the real key to internalize it is to get a feel for where comfort levels are. as someone that lives in F i generally think in terms of decades of F
<geist> ie, 'it's 60s outside today' or 'when it gets into the 90s it's pretty sweaty'
<geist> whereas i think C folks i guess think in terms of low 20s or high 20s or so. i dunno
<mrvn> geist: but it's a dry heat
<vdamewood> geist: Finny enough, I prefer 60 F... which is about 16 C.
<vdamewood> Funny*
<vdamewood> So It's stxt... something either way.
<PapaFrog> My wife insists on 70F.. I think it is too cold.
<geist> i tend to think of it as like 50s you start needing some sort of sweater or so, and by the tie you're in the 40s you're in jacket weather
<\Test_User> mrvn: never dry heat where I am, only dry when the dryness isn't needed
<mrvn> have fun with -5F and widn chill
<geist> but yeah i also dont live in places where it frequently gets below freezing, which is where F gets pretty messy
<PapaFrog> Just live at 40 below.
<vdamewood> geist: In Portland, the city shuts down if we get below freezing.
<PapaFrog> No F/C problem.
<\Test_User> lol
<geist> i totally acnolwedge that if you live in a place where get frequently gets below freezing, C makes way more sense
<vdamewood> geist: Usually, because the snow or hail is too much for our two snow plows to handle.
<geist> same in seattle
<geist> they just stop. too many hills, too much ice, not enough plows and ssalt to go around
<geist> and infrequently enough that it's not worth investing in the infrastructure
<geist> that's basically the argument that comes out every time there is a freeze and the city shuts down: its not worth paying to have all these trucks if we only use them once a year
<vdamewood> geist: Yeah, same here. But we do have a pretty siable amount of flat land.
<geist> yah once you factor hills into it it's a double mess
<vdamewood> Except for a couple of hills, most fo teh east side is flat.
<vdamewood> The west however, is almost all hills.
<geist> that's half the reason i only have AWD cars. only way to get around if there's a hit of ice on the road
<geist> otherwise you are 100% stuck
<vdamewood> Yeah, people who live in west side Portland are pretty much screwed on snow day.
<vdamewood> I can still get th Fred Meyer though.
<mrvn> geist: why would C make more sense as long as it stays above 0F? So you know when ice will form?
<geist> yah
<\Test_User> for F it's just a matter of comparing to 32; either way it's not a problem
<geist> like it's freezing outside or not. the 32F is annoying
<geist> but obviously not intractable
<\Test_User> it's not when you're used to it
<geist> there's no magic about 0F. it's just 0F.
<geist> i guess except the briny water thing, but as far as i know in the real world there's no magic about 0F
<mrvn> geist: at 0F the water for your windshield wipers will freeze.
<geist> whyso?
<mrvn> round about
<geist> seems like that's a function of whatever you mix with it to keep it from freezing
<mrvn> Your fuel will freeze too or at least become sluggish.
<geist> yah that's true, but that's not 0F as much as it's just probably babout in that area
<zid> C's 0 is vaguely random in that it requires a certain pressure
<zid> but it's still just specified against K these days so whoc ares
<zid> As long as the range is usable for like 'everydayish things' it's fine
<zid> F is slightly focused on body temp, C is more useful generally but less for bodytemp range
<zid> but both are just.. fine
<zid> As long as the dirived units aren't in 1/16ths or whatever I am happy :P
<zid> der*
<\Test_User> I find F's higher range for outside temperatures nice, otherwise meh
<\Test_User> lol yeah
<PapaFrog> A chef told me they hate C for oven/food temperatures.
<PapaFrog> Because 1C is larger than 1F.
<PapaFrog> Delta 1C > delta 1F
<\Test_User> ye
<zid> Talking out of his arse, it only matters for confectionary
<zid> and you'll be using tenths there
<zid> so it doesn't matter
<psykose> i can taste a 1C difference - nobody ever
<\Test_User> lol
<psykose> the fuckin oven can't even calibrate within 1C
<zid> (tempering chocolate etc)
<zid> you'll be using a double boiler and a digital thermometer for that
opal has quit [Ping timeout: 268 seconds]
<PapaFrog> I'm just repeating what I was told.. not endorsing it.
<vdamewood> I thiMy oven only goes in incrments of 5F
<zid> My oven has a continous pot
<psykose> even if the oven could consistenly be within 0.01C.. you would then use those if you cared
opal has joined #osdev
<zid> but fuck knows how accurate it is, probably just completely braindead, and gets hotter on warmer days etc
<vdamewood> I want food now.
<psykose> i also want food
<vdamewood> And I just realized, I'm going to measure my cooking in minutes and watts.
<psykose> i request one humble serving of a huge meal from zid
<zid> I can only make rice
<zid> so I hope you like rice
<vdamewood> Yum, rice!
<\Test_User> zid: unlikely, most (not overly old) ones should be able to detect their actual temperature
<psykose> rice is pog
<PapaFrog> Person other than grunt?
<zid> \Test_User: yea but I don't believe it's doing that, I think it's got a thermistor
* mrvn goes and runs into the kitchen at 1 furlong per fortnight, see me blur.
<zid> that cuts the temp when the resistance >= the pot
<zid> with an opamp or whatever
<\Test_User> ah
<clever> my oven is old enough that its just a dumb old bi-metal strip
<zid> you need to do really complicated compensation for accurate temps
<vdamewood> is pot an acrynym here?
<zid> potentiometer
<vdamewood> Thanks
<zid> twisty dial
<clever> heat makes it bend, and it makes a sound click when it hits a set point
<vdamewood> Oh, I know what a potentiometer is.
<zid> Fun fact, that's why oldschool car turning indicators go click clack
<heat> sup
<zid> they're just bimetallic strips
<mrvn> zid: you have a bi-metal strip that flips when it gets hot and you put it under pressure to change when it flips.
<clever> another fun fact, is how hysteriesus is done
<zid> hysteresis? :p
<clever> older thermostats, use a blob of mercury inside a large capsule
<clever> when it passes the tipping point, the shifting weight moves, and makes it harder to go back
<clever> but, the thermostat in my old trailer, instead used a magnet, because the trailer may not be level
<geist> yah i had an oven a few years ago that was off by a particular percentage, was worth calibrating by getting a little standalone thermostat you can hang off the oven rack and see through the window
<geist> those are cheap and probably more accurate than the oven itself (it was a 60s era oven)
<clever> i had a similar thermometer in my fridge
<clever> but something broke, and it was reading grossly wrong
<mrvn> geist: they have those to stick into your turkey and they go pop when the inside reaches temp.
<clever> mrvn: i think those are a special type of plastic, that only gets soft above a set temp
<clever> plus a spring
<mrvn> clever: and some levers. they measure at the tip
<geist> or a magnet. there's an effect where certan types of magnets cease to be magnetic above a certain temp
<zid> curie temp!
<clever> geist: ah yes, ive heard of that being used in rice cookers
<geist> it's the mechanism that most of those water boiling pots use to click the lever off
<zid> That's how oldschool rice cookers work, magnet with 100C curie temp
<mrvn> I've seen meat thermometers with scales though
<clever> yep
<zid> so when the water is gone, temp can go above 100C, click
<geist> yah neat simple trick
<mrvn> They might hav a spiral inside that expands and therefor turns when heated.
<bslsk05> ​'Old-fashioned rice cookers are extremely clever' by Technology Connections (00:11:11)
<geist> saw it on the technology connections youtube channel. he has nice little things
<geist> yep. that one :)
<clever> GeDaMo: hey!, i was trying to link that :P
<mrvn> zid: That's not how water heaters work
<geist> no but the idea is for a rice cooker you heat it until all the water has boiled, since a termostat at the point of contact with the bottom of the pot should remain at 100C while it's boiling
<mrvn> egg cookers too
<mrvn> Fun fact: You use less water for more eggs
heat is now known as _Heat
<_Heat> has anyone tried to port something v8-based to their OS?
<_Heat> like node?
<zid> I hope not
<mats1> no daddy
mzxtuelkl_ has quit [Quit: Leaving]
<moon-child> _Heat: I heard it runs on this one guy's os
<moon-child> from finland, I think?
<moon-child> 'torbalds' or sth
<zid> Carl Linnaeus
<sbalmos> Leigh Nucks?
<_Heat> well i'll be the first one then
<_Heat> i need all them runtimez
<zid> heat's finally a webdev
<sbalmos> WebScale!
<_Heat> I work with v8 all day
<_Heat> i have become a webdev
<sbalmos> I'd rather drink it
<bslsk05> ​www.destroyallsoftware.com: The Birth & Death of JavaScript
<_Heat> node doesn't exclusively run javascript
<_Heat> it all supports wasm
<_Heat> also*
<_Heat> oh yeah this may be interesting: https://blog.cloudflare.com/announcing-wasi-on-workers/
<j`ey> shill
<_Heat> i am a professional shill
<moon-child> i feel wasi misses the point
<_Heat> why
<moon-child> it's an unhappy medium between java-style write-once-run-everywhere and doing full api discovery yourself
<moon-child> (latter: like mill kinda, if it existed)
<_Heat> its a way to run posix apps in v8
<_Heat> what's missing the point?
<_Heat> s/v8/wasm runtime/g
<zid> good news heat, once you start to run evrything in v8
<zid> you can delete your kernel
<zid> because it's a managed language, you only need the runtime and a single process
<_Heat> well sure
<_Heat> that works
<_Heat> we do it for workers
<_Heat> each worker runs in its own v8 isolate, in a single process
<moon-child> _Heat: like I said. It's an unhappy medium between two states, and would be more coherent if it would pick one
<_Heat> theoretically you could ditch linux and latch on a slimmer runtime
<_Heat> that is an interesting idea I guess
<moon-child> issue is not really 'slimmer' but ctx switch overhead
<moon-child> cf the video I linked (great watch btw)
<moon-child> but there are also security concerns
<_Heat> hold on
<moon-child> v8 usually has lots of bugs
<_Heat> I have videos for you too
<_Heat> we can trade v8 videos all day homie
<moon-child> I'm sorry I don't have any more
<_Heat> SHAME
<moon-child> best I can do is this greenspun garbage collector https://v8.dev/blog/retrofitting-temporal-memory-safety-on-c++
<bslsk05> ​v8.dev: Retrofitting temporal memory safety on C++ · V8
<bslsk05> ​'Fine-Grained Sandboxing with V8 Isolates' by [idk] (--:--:--)
<moon-child> he does _not_ sound like he wants to be there :P
<clever> 2022-07-05 11:35:57 < cheogram> <R​ay22> Fun fact: you can connect to any CF edge IP and browse the whole Cloudflare "internet" using a single IP address!
<clever> another neat cloud-flare fact
<sbalmos> CF's network infrastructure is a neat read
<zid> Oh god I hadn't considered that
<_Heat> moon-child, nah, we just talks like this
<zid> don't you need the right CSRF tokens and shit though?
<_Heat> he*
<zid> It'd be funny to know the server with the best/most vhosts configured
<moon-child> hmmm or I guess maybe he's really really disappointed in something
<zid> "turns out runs neopets, slashdot, 1237 blogs and a pineapple export company's wbesites"
<_Heat> i'm fairly sure everything runs everything
<_Heat> which is why clever's fact works
<_Heat> don't forget cloudflare doesn't do hosting
<clever> its basically just a big network of proxy's
<_Heat> yes
<clever> to protect the real host
<_Heat> well, workers kinda does hosting
<clever> and it doesnt limit which real host a given proxy can talk to
<_Heat> but it's still dynamic
<clever> so the edge ip, can proxy for every single cloudflare domain
<_Heat> like, you give us a script, that script gets deployed on the edge, everywhere
<moon-child> 'I'll talk more about V8 bugs, and how we address them, later in this post' he didn't really though ... just said 'we apply patches when they come out'. But the interesting case is when someone has a 0-day you _don't_ know about yet
<_Heat> the policy is "google is very good at addressing v8 bugs, we constantly track the latest v8s"
<_Heat> there's also a bunch of protections in place to make sure you don't do crazy shit
<_Heat> the runtime process is heavily sandboxed, we sandbox isolates when we think they're doing something suspicious like trying to exploit spectre, etc
<_Heat> like *if* you get a zero-day and succesfully exploit it to the point where you have RCE, there's not much interesting you can do
<moon-child> spectre stuff is neat
<moon-child> _Heat: eh, getting out of a sandbox shouldn't be overly challenging at that point
<_Heat> oh yes, also
<_Heat> "There are some things, some risk management things we can do on the server, that we cannot do so easily on the browser. One of them is we store every single piece of code that executes on our platform, because we do not allow you to call eval to evaluate code at runtime. You have to upload your code to us and then we distribute it. What that means is that if anyone tries to upload an attack, we now have a record of that attack. If it's a zero-day
<_Heat> that they have attacked, they have now burned their zero day, when we take a look at that code. We'll submit it to Google, and then the person who uploaded won't get their $15,000."
<_Heat> moon-child, if you have a seccomp-exit you should report it to the linux kernel security team immediately
<moon-child> sure, if _I_ have one
<moon-child> I'm just saying, it doesn't seem to me that the os security mechanisms are significantly more secure than the v8 ones
<_Heat> it's a two-layered protection
<zid> OS = carrying condoms, js = being ugly
<zid> two layers of protection
<moon-child> lol
<_Heat> finding a zero day in v8 is hard, finding a zero day to escape v8 completely and have an RCE in hand is even harder, getting a seccomp exit is wayyyyyyy harder
<_Heat> *and* since we have your script, we can look at your zero day pretty easily
<_Heat> and the servers themselves are pretty heavily audited by tools
<_Heat> if you're interested, we're in the process of open-sourcing the runtime
<moon-child> oh so like
<moon-child> tool thinks code is suspicious -> flags for human review?
<_Heat> tool sees a process accessing a lot of files or files it shouldn't access -> flag for human review -> someone gets pinged
<_Heat> doing code is suspicious -> flag for human review would be a lot harder I assume
<gog> amogus
<_Heat> process is sus
_Heat is now known as heat
<moon-child> heat: how does it feel to no longer be an identifier reserved by ISO/IEC 9899:2011?
<heat> it feels great unless you suddenly feel like talking about thermodynamics
sortie has quit [Quit: Leaving]
euclaise has joined #osdev
sortie has joined #osdev
<zid> Speaking of feeling great, heat when are you coming over again
<gog> #osdev-con 2022 where
<heat> wdym, i just came
<zid> That's the problem, it was so quick
<zid> I need another go
[itchyjunk] has quit [Ping timeout: 244 seconds]
euclaise has quit [Quit: leaving]
<psykose> that sounds so lewd
euclaise has joined #osdev
<gog> are we not doing "phrasing" anymore?
<zid> we're out and proud
<zid> I must admit though, I'm only in it for the birthday and christmas presents
<gog> same
<zid> heat: you owe me a birthday present in october btw
<gog> same
<zid> He's dating me not you, ask your wifeband
<gog> :(
<moon-child> aren't you getting a new one in october anyway
<zid> a new heat?
<moon-child> new potential source of birthday presents
<moon-child> w/e
<zid> I think we should just get a whole new heat
<zid> this one's broken and likes javascript
ptrc has quit [Remote host closed the connection]
ptrc has joined #osdev
<gog> we can rebuild him
<gog> we can make him faster with lto
* moon-child visits ptrc.gay and is told he is cute
<zid> I do have a question though, how am I supposed to beat wall of flesh
<moon-child> :3
<heat> i do not like javascript
<heat> i like the technology behind it
<heat> javascript sux
<moon-child> webshit
<heat> most people who work on language runtimes hate the language
<heat> it's just a fact
<heat> CPython devs write C, not python
<heat> we write C++, not javascript
<gog> they should stop writing cpython
<gog> put it all in pypy
<gog> or kuroko
<heat> pypy more like? stupypyd
<moon-child> :\
<moon-child> pypy is cool though
<heat> +1 on kuroko though
<doug16k> js runs circles around python
<gog> around cpython
<moon-child> and it's v8 doing the running
<doug16k> the inanity of using locks and condition variables in something that can't actually do a thing in parallel, because you have to completely redo it to use asyncio
<doug16k> it's hilarious - I have some parallel python stuff that has a completion counter thing just like my kernel's io completion class
X-Scale has quit [Ping timeout: 240 seconds]
<moon-child> lol gil
X-Scale` has joined #osdev
<gog> it's an indictment of the implementation that switching to fine grained locks made it slower
X-Scale` is now known as X-Scale
<gog> or rather the early results of the experiment
<doug16k> thankfully the stuff I want to speed up is utterly I/O bound, so even awful threading reduces the total wallclock time a lot. aws rips you off for wallclock time, so more wait = more wasted money. in my best interest to peg it all the time
<moon-child> ahaha
<moon-child> I like it
<moon-child> also why write in python?
<doug16k> ikr
<moon-child> gog: interesting, have a link?
<doug16k> inherited code
<heat> cpython got a pretty nice speedup this last release
<psykose> does every cpython using project still have a parallelism of 1 at build time
<gog> moon-child: trying to find the article I read but it was years ago
<doug16k> gog, yeah I read an article like that. they insist that any multithreading improvement cannot reduce singlethread perf at all. basically dead language because of that, imho
<moon-child> ocaml managed to get rid of its global lock. And there's a bunch of python legacy code. Maybe they'll manage it at some point...
aejsmith has quit [Remote host closed the connection]
<doug16k> it's as if they think people do cpu intensive tasks in python, not tons and tons of I/O
aejsmith has joined #osdev
<gog> moon-child: google "gilectomy"
<gog> i guess there's a new attempt here
<clever> doug16k: gnu-radio is an example of that, python is used to form connections between modules, but all of the computation is done in compiled c or asm
<clever> so all of the high bandwidth and high computation stuff, is kept out of the python code
<moon-child> 'For "Gilectomy 2.0", Hastings will be looking at using a tracing garbage collector (GC), rather than the CPython GC that is based on reference counts' finally, into the 20th century!
X-Scale` has joined #osdev
<gog> in the year 2000
<zid> tracing sounds like it'd be slower than ref counting ngl, I guess if you do it infrequently enough then the overhead of all the ref twiddling gets important?
SGautam has quit [Quit: Connection closed for inactivity]
<moon-child> zid: tracing is faster than ref counting
<moon-child> by a _lot_
<zid> depends how often you do the trace!
X-Scale has quit [Ping timeout: 276 seconds]
X-Scale` is now known as X-Scale
<moon-child> usually you trace when you run out of heap. But you also do generational gc, which is a big win
<doug16k> that's how you get node code magically speeding up because the worker has more RAM
<moon-child> zid: https://0x0.st/oQdd.png
<moon-child> and note swift already has reasonably sophisticated rc elision. So they've already taken care of the low-hanging fruit
<doug16k> clever, yeah exactly
<zid> is that because they're silly languages that just spam malloc effectively
<zid> because OBJECT ORIENTED and NODES and whatever
<zid> +30 more buzzwords
<clever> moon-child: haskell's garbage collector uses reference tracing rather then reference counting, and a copy collector, it will recursively copy the entire heap to a new region of memory, repairing references as it goes
<clever> moon-child: anything it didnt copy is garbage, and it can nuke the old heap entirely
<clever> but yeah, thats expensive on memory bandwidth, so its got a few layers to it
<moon-child> zid: looks like this is 'the official swift benchmark suite'
<clever> recent objects vs long-lived objects
<zid> I have literally never seen swift
<moon-child> swift is apple go
<moon-child> except with reference counting because they suck apparently
<mrvn> A modern tracing GC is the same speed as a modern malloc.
<moon-child> clever: yeah, semispace is common for nursery because you expect most of it to be dead. For oldspace you want finer-grained compaction, though; don't want to copy the entire working set
<mrvn> Most of the copying happens in cache so it's cheap.
<zid> have they considered making swift just not a language that needs to constantly spam alloc
<doug16k> is go like swift? good to know
<zid> teach it about storage durations and stuff
<moon-child> mrvn: eh. Gc probably is faster, but adds overhead. Not apples-to-apples
<mrvn> moon-child: that evens out
<moon-child> it doesn't 'even out', it's workload dependent
<moon-child> as zid points out, you can also do your own allocators
<mrvn> so is everything
<moon-child> but you can't do that and also be modular
<doug16k> I didn't mind swift, what drove me insane was the stupid "prepare" stuff in the UI libs
<mrvn> moon-child: functional languages win from immuatble types. you can't really do that with just an allocator.
<mrvn> compaction gives a big speed boost too
<moon-child> what do you mean by 'win from immutable types'? Immutable types enable certain optimisations, yes
<moon-child> and compaction is important, yeah
<mrvn> it's a whole different way of writing your code if your types are immutable
<clever> oh, that reminds me of a bug that has been seen in haskell
<clever> due to lazyness
<clever> when you are turning a thunk into a concrete value, you can grab a mutex on that object, run the code, then edit it in-place
<clever> but that mutex is often too much overhead
<moon-child> mrvn: sure, yes, but what's your point?
<clever> so ghc has a thing called lazy black-holing
<clever> which causes the reverse problem, if 4 threads try to read the same lazy value at once, they each independantly re-compute the same answer, and overwrite eachother
<clever> so using more cores, leads to more cpu usage, and no actual gains in work done
<mrvn> moon-child: that allocators don't get you a GC.
<doug16k> clever, almost sounds by design
<moon-child> mrvn: yes. They don't. But that doesn't mean they won't go fast for an interesting and very large subset of problems
<clever> doug16k: lazy black-holing is meant to be used when computing the answer is faster then grabbing a mutex
<mrvn> clever: I'm sure ghc has a metric of when that is cheaper than the mutex
<clever> so re-computing in parallel isnt a problem
<moon-child> cost models are hard
<clever> but its not weighted properly, and the compiler is making the wrong choice
<clever> funnily enough, that wrong choice, is being made when compiling ghc itself
<clever> internally, there is a cache of all compiled units, that is then read by multiple threads
<clever> so when you `ghc -j10`, it can compile 10 units in parallel, and reuse products between threads
<clever> and that shared list, is where the problem occurs
<doug16k> that's why lock free code sucks. it's bound to get all pathological on you
<doug16k> most stuff can be partitioned into completely independent work on their own data
<clever> but if you #include <foo.h> in 2 files, you want to reuse the parsed foo.h in both threads
<clever> and the map you out that parsed data into, is the bottleneck, the map itself, not the parsed data
SpikeHeron has quit [Quit: WeeChat 3.5]
GeDaMo has quit [Quit: There is as yet insufficient data for a meaningful answer.]
<doug16k> get 32 cores not interfering, you have about a minute of processing that always makes progress every 1.8 seconds
<doug16k> good luck with 32 lock free cores fighting over variables
SpikeHeron has joined #osdev
<mrvn> doug16k: my feeling is that lock free code is only good if you have more threads than cores.
<clever> something ive wanted to take a stab at, is parallel gunzip
<clever> my rough understanding, is that gzip has blocks, with a clearly defined compressed size in the header
<mrvn> clever: why? use xz
<clever> so one thread can quickly scan the entire file, and generate jobs
<mrvn> pigz also exists
<clever> then multiple threads can handle the jobs
<clever> mrvn: baremetal
<clever> the whole point, is to uncompress the linux kernel faster
<mrvn> clever: so port pigz
<zid> are multiple cores awake at that point?
<clever> but thats no fun!
<mrvn> zid: no
<clever> zid: on the rpi, all 4 cores wake at once, always
<zid> nice, what are they up to
<clever> and the pre-linux code just parks 3 of them
<clever> they all begin running with PC=0 in parallel
<mrvn> clever: on the rpi the firmware should park them already
<clever> and its up to whatever code you put there, to redirect some of them
<zid> how do they speciate? they just check their cpuid equivalent or something?
<clever> zid: yep, there is an MPIDR reg in arm, that tells you the core#
<clever> so you can check that before you even touch the stack or ram
<clever> (ignoring i-fetch)
<clever> mrvn: yeah, the official arm stubs will park 3 of them, my LK based bootloader puts all 4 into SMP, and then LK's scheduler just does what a scheduler does
<doug16k> you can generalize it by partitioning the file into N parts and gzip each, interleave the blocks
<doug16k> it hurts compression some though if you do that
<clever> doug16k: yep, but then you need a special compression util
<mrvn> doug16k: he's talking about gunzip
<mrvn> clever: parallel xz decompression would be more fun
<clever> i want to take a Image.gz from disk, load it into ram, and go as fast as the hardware will allow
<clever> mrvn: what would be really fun, is using all 6 cores to do it....
<mrvn> clever: 6 of the 4 cores?
<clever> 4 arm and 2 vpu, co-operating, across ISA's!
<mrvn> yes
<mrvn> I'm not sure though if you can even read the image.gz faster than a core can uncompress it.
<clever> 7435 kbyte copied at a rate of 6715 kbytes/second, CRC32: 0x0
<clever> 7435 kbyte copied at a rate of 4800 kbytes/second, CRC32: 0x0
<clever> i was getting 4800 kb/sec on my last few speed tests, the 6700 was a weird anomaly, dont remember why
<mrvn> and gzip does what? 50MB/s?
<clever> let me check some other math...
<clever> assuming perfect conditions, the SD card should move 25mbyte/sec, so the rates i posted above are a bit low
<clever> which is half of what you quoted for gzip
<clever> is your quote, for the compressed or uncompressed rate?
<mrvn> clever: what does pigz manage to uncompress?
<mrvn> mine is just a guess
<clever> pi@pi400:~ $ dd if=/dev/random of=speed-test bs=$((1024*1024)) count=1024
<clever> creating some dummy files to test on
<mrvn> mrvn@ryzen:~$ time pigz -d <initrd.gz | dd bs=64k of=/dev/null
<mrvn> 1+2361 records in
<mrvn> 1+2361 records out
<mrvn> 77429504 bytes (77 MB, 74 MiB) copied, 0.200296 s, 387 MB/s
<mrvn> real0m0.204s
<clever> using a ryzen is cheating :P
<mrvn> user0m0.274s
<mrvn> it's not even getting the cores spun up
<doug16k> yeah I tried gunzip 1MB of text and it was 11ms
<doug16k> 133 KB gunzip of ls is 3ms
<doug16k> computers are insane now
<mrvn> 77429504 bytes (77 MB, 74 MiB) copied, 0.857805 s, 90.3 MB/s
<mrvn> pixz is a lot slower
<mrvn> real0m0.860s
<mrvn> user0m2.244s
<mrvn> That's 8 cores.
<mrvn> clever: any timeings for pigz/pixz with RPi yet?
<gog> Ryzen is love Ryzen is life
<clever> the dd is still creating that dummy file, lol
<mrvn> clever: not using the real kernel/initrd?
<clever> mrvn: was creating a larger file, so rounding errors wouldnt be as big of an issue
<mrvn> clever: you could demand-page load the kernel in the background
<clever> not sure linux would be happy with that
<mrvn> if you have an hypervisor ....
<clever> you still have conflicts over the SD card
<clever> who is driving it?
<mrvn> the hypervisor
<clever> then how will linux mount the rootfs?
<clever> virtio-blk?
<mrvn> or direct access that traps into the hypervisor till it's done reading
<clever> kinda overcomplicates things too much
<mrvn> or just finish reading before you start linux and just uncompress in the background
<clever> thats slightly more viable
<clever> i also remembered, there is a bug
<clever> the kexec code in LK, isnt SMP aware
<clever> so if i put all 4 cores into LK SMP, the kexec only passes 1 core to linux
<clever> the other 3, are sitting in LK's idle loop, waiting for the LK scheduler to poke them!!
<clever> but, if i make LK into a hypervisor, running linux on each core, with PSCI asks for it, is far simpler
<clever> linux kexec on arm, also requires PSCI, because linux has no clue how to re-park the cores
<j`ey> it cant be impossible to do that.. but maybe its just silly to implement it
<mrvn> clever: can't you just start linux on all cores and let it check the MPIDR?
<clever> mrvn: linux starts the secondary cores at a special entry-point, after the paging tables are setup
<clever> 32bit linux also expects the asm to uncompress linux first, and has no facacilities to hold a core until that step is done
<clever> so all 4 cores would try to boot linux in parallel, and step all over eachother
<mrvn> you can always uncompress before kexec
<clever> 32bit linux is compressed only, you have no option to pre uncompress
<clever> 64bit linux is the reverse, uncompressed only
<mrvn> is the initrd decompression parallel?
<clever> initrd i believe can be both, and is further complicated by the fact that `cat one.gz two.gz > initrd` is valid
<clever> some CLI tools in linux respect the headers too well, and ignore the extra files
<clever> when the linux kernel itself, will unpack all of the concat'd files
<clever> i'm probably just doing some premature optimzation :P
<mrvn> thik so too. Still waiting on those pigz numbers. :)
<mrvn> +n
<clever> pi@pi400:~ $ dd if=/dev/random of=speed-test bs=$((1024*1024)) count=1024
<clever> 1073741824 bytes (1.1 GB, 1.0 GiB) copied, 989.526 s, 1.1 MB/s
<clever> booo, bad sd card!
* clever gets a tmpfs involved
<clever> pi@pi400:/dev/shm $ pv speed-test | gzip > speed-test.gz 173MiB 0:00:16 [10.9MiB/s] [====> ] 16% ETA 0:01:18
* clever slaps irssi
<clever> pi@pi400:/dev/shm $ pv speed-test | gzip > speed-test.gz
<clever> 282MiB 0:00:26 [10.9MiB/s] [========> ] 27% ETA 0:01:08
<geist> my little cheesy benchmark i use sometimes is `pv /dev/zero | md5sum`
<clever> those rates, as the uncompressed stream, as it enters gzip
<mrvn> not gzip, pigz :)
<clever> just getting single-core first, for reference
<geist> though it's not particularly fair for 32 vs 64bit since the md5sum routines i think benefit heavily from 64bit
<geist> but pv is nice because it shows you a continuous transfer rate
<clever> yep
<geist> and uses splice on linux so it's not really bouncing things through user space
<mrvn> the pipe costs time too
<geist> right, pv bypasses the pipe with splice
<geist> though really my experience is its pretty much the same if you pipe or not, with reasonable buffer sizes
<mrvn> geist: from some primitive tests that makes it slower actually.
* geist shrugs
<clever> pv is using about 4% cpu
<clever> pi@pi400:/dev/shm $ pv speed-test | pigz > speed-test.gz
<clever> 907MiB 0:00:26 [34.7MiB/s] [============================> ] 88% ETA 0:00:03
<clever> not 4x the transfer rate, but it is a major improvement
<clever> however, thats in the wrong direction
<mrvn> clever: the number that isare relevant is decompression
<mrvn> -are
<clever> exactly
<clever> -rw-r--r-- 1 pi pi 1.0G Jul 8 18:38 speed-test
<clever> -rw-r--r-- 1 pi pi 1.1G Jul 8 18:41 speed-test.gz
<clever> also, this dataset is rather torturous, lol
<mrvn> uncompressable data is hardly a real test
<clever> yeah
<clever> pi@pi400:/dev/shm $ pv speed-test.gz | pigz -d > speed-test
<clever> 1.00GiB 0:00:03 [ 319MiB/s] [================================>] 100%
<clever> damn! lol
<clever> pi@pi400:/dev/shm $ pv speed-test.gz | gunzip > speed-test
<clever> 1.00GiB 0:00:11 [89.3MiB/s] [================================>] 100%
<mrvn> clever: that's just doing a read/write. It's no decompressing if the data was uncompressable
<clever> so pigz was still faster then gunzip, even with this impossible dataset
<clever> let me grab something more sane...
<clever> -rw-r--r-- 1 clever users 856M Jan 24 2019 android-x86_64-8.1-r1.iso
xenos1984 has quit [Read error: Connection reset by peer]
<geist> for a easily found one i usually use something like linux-4.0.tar.gz
<geist> since it's the same file everywhere, and thus easy to do a 1:1 comparison with
immibis has quit [Ping timeout: 240 seconds]
<clever> gunzip only: 119MiB 0:00:08 [13.5MiB/s] [================================>] 100%
<clever> yeah, the better its compressed, the slower it consumes the input
<clever> pigz only: 119MiB 0:00:03 [34.7MiB/s] [================================>] 100%
<clever> ~2.6x increase in speed for the input
<mrvn> So 2-10 times the SD card speed.
<clever> while an SD card is 25,000,000 bytes/sec, under ideal conditions
<clever> or 23mbyte
<mrvn> on the RPi?
<clever> thats the raw transfer rate of a VC4 era SD controller
<clever> not counting latencies from both the SD card, and the host, failing to respond in time
<clever> so under perfect conditions, anything in the pi0-pi3 range, would get that speed
<clever> pi4/pi400 gets double, due to DDR
<clever> and CM4 gets double that, due to an 8bit DDR bus, instead of 4bit
<mrvn> theory meet praxis
<clever> mrvn: yeah, there will be numbers worse
<clever> but with pigz able to consume 34mb/sec, and sd never being able to produce more then 25, then the SD will never stall out waiting for pigz
<clever> but with gunzip only able to consume 13, and SD being able to produce up to 25, the SD may stall waiting on cpu
<mrvn> clever: you need one code to drive the SD card so that might even things out
<mrvn> one core
<clever> however, i'm also being unfair, my gunzip/pigz tests, are done on a cortex-a72 in a pi400
<clever> but the SD speeds, are on a cortex-a7
<clever> its missing a digit, lol
<clever> i would assume the A7 does far worse in terms of both gunzip and pigz
<clever> -rw-r--r-- 1 pi pi 563M Jul 8 18:48 v4.0.tar
<clever> -rw-r--r-- 1 pi pi 120M Jul 8 18:46 v4.0.tar.gz
<clever> but, for this exact file, its an expansion ratio of ~4.69
<clever> so for every byte i read from the SD card, it becomes 4.69 bytes in ram
<clever> so compressing at all, can in theory give you a 4x speed boost, if the cpu can keep up
<clever> and that "if the cpu can keep up" reminds me of a trick intel is playing
<clever> ntfs wasnt designed to have a dedicated read-cache disk
CaCode has joined #osdev
<clever> so the software for intel optane modules, that implements a read-cache, is locked to certain cpu's
<clever> ones that are known to be able to handle the extra computation needed to jam a disk read cache into ntfs
<clever> so you cant harm the brand, by using a crap cpu, and then complaining about it harming performance
thatcher has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
thatcher has joined #osdev
xenos1984 has joined #osdev
<gorgonical> anyone got tips for gdb stepping through page table switches?
<clever> (gdb) symbol-file -readnow -o -0x80000000 /tmp/vmlinux
<clever> gorgonical: you can specify an offset (including negative) to all symbols when you load a .elf file, so it lines up when in physical mode
<geist> huh interesting. just fiddled with using visual code over ssh from windows to a linux machine
<gorgonical> but what about when I jump to virtual?
<clever> and you need to set a breakpoint to just before the mmu is enabled, then single-step thru, and re-run symbol-file with a different offset
<geist> actually kinda useful. hadn't tried the remote feature yet
<gorgonical> ah
<clever> ive had to do it a number of times, with 3 different symbol-file invocations
<clever> bootloader, mmuless linux, mmu linux
<gorgonical> so the problem I have is that gdb complains about not being able to access memory after the mmu is on
<gorgonical> so I can no longer si it seems
immibis has joined #osdev
<clever> that sounds more like gdb isnt respecting the mmu?
<gorgonical> i have the break right before mmu is on, si up to it, and then it complains
<clever> so the now virtual pc, is being read in physical space
ethrl has quit [Quit: WeeChat 3.4.1]
<geist> usually first thing i do there is use the qemu command line to see what the new state is
<geist> but yeah, gdb across things moving out from underneath you, or things like mode changes is very painful
<gorgonical> Part of the problem is that this switch is *intended* to page fault
<clever> oh, it is possible that the new addr being non-accessible, is the real problem?
<geist> but i have no experience with it because i dont use gdb for this stuff at all, somewhat because of precisely this sort of thing
<gorgonical> geist: yeah this was fine up until I needed to figure out why the gp isn't being reloaded, on the other side of the mmu in head.S
<mrvn> gorgonical: what if you just hit "c"?
<gorgonical> that does zoom past until some page fault stuff i haven't figured out
<geist> can you use the qemu console to see what the cpu state is?
<geist> gdb might have access to it with the 'monitor' command iirc?
<geist> ie, `monitor info registers` or something
<clever> yeah, that should work with qemu
<gog> yes
<gorgonical> I wish gdb knew how to restart the binary on qemu
<clever> `monitor reset` would tell qemu to reset the vm
<clever> but gdb gets confused when the registers change without warning like that
<geist> especially on x86. i dont think gdb has ever really had the 32 to 64 bit transition solved
<gog> sometimes it won't do it and say qemu need to exit
<gog> idk what exactly
<geist> it's one of these problems where the register payload suddenly changes ans the gdb protocol has no mechanism for that
<clever> yeah
<clever> ive seen mention of that as well
<gorgonical> basically what I do is reconnect to the gdbserver and kill qemu that way. Then rerun the command
<gorgonical> Very clumsy
<clever> i was using gdb with openocd and jtag
<clever> so i was debugging real hardware, rather then a vm
<geist> Yah can use the monitor stuff to punch through to openocd’s command line
<geist> Kinda a similar experience to gbb + qemu
<clever> yep
<clever> gorgonical: why are you expecting a page-fault when you turn on the mmu?
<clever> i do also have another potential solution there
<clever> gdb maps cpu exceptions (like pagefault) to signals
<geist> i gues you'r intentionally trying to load something invalid?
<clever> so you could configure gdb to break on receiving any signal, then just `continue` right before the mmu comes on
<clever> geist: i assume he lacks an identity mapping of the init code, and is using the fault handler as the 1st virtual code
<mrvn> clever: there is some clever MMU activating code that uses the fault to jump to higher half.
<zid> I knew it was trash but I ain't never seen that one before
<clever> zid: wow
<clever> just do what i say and cripple the pc with swap!
<clever> lol
<mrvn> zid: you have problems with my 65536x65536 pixel images?
<clever> mrvn: your just 1 pixel over a 16bit int, lol
<mrvn> clever: that's exactly 2^32 pixels, akak 16GB.
<clever> jokes on you, i have 32gig of ram
<mrvn> clever: poor you.
<doug16k> can you go that high? 16384x16384 is a common limit
<mrvn> why shouldn't i go that high or higher?
<doug16k> I thought we were talking about GPUs
<doug16k> sorry
<clever> doug16k: the rpi's 2d core maxes out at either 4096x4096, or 8192x8192 depending on the model, the 3d core is half of that i believe
<mrvn> I have problems with megapixel squared.
<mrvn> clever: odd though, it has enough address bits for 32k x 32k
<clever> mrvn: likely some of the counters in the 2d core are limited, plus the scanline fifo
<clever> and all of the video timing parameters are using 16bit registers
<mrvn> so why can't I have 65536 x 1024?
<clever> 0xffff is the max value for the timing parameters
<clever> so your 1 scanline over what the PV can even count
<mrvn> well, 0 should be 65536
<clever> ive not tested that yet
<mrvn> probably doesn't work. That would require someone being clever
ethrl has joined #osdev
clever has quit [Ping timeout: 276 seconds]
pretty_dumm_guy has quit [Quit: WeeChat 3.5]
clever has joined #osdev
<clever> mrvn: back on this client now
<clever> what did i miss?
<heat> nothing
<clever> i made a new discovery on how skummy freenode is being
<clever> irc.libera.net points to freenode
[itchyjunk] has joined #osdev
<heat> lol
<clever> i only noticed, because all of the usual people, where missing from #osdev
<heat> was it only crystalmath? lol
<clever> there was still a sizable number
<clever> just not as many as here
<gog> mew
<heat> how many?
<clever> the website for the power company is also down, and one of the ISP's is dead, nation wide
<sbalmos> probably discussing how to write Truth-Enforcing Kernels
<clever> heat: i forgot, and already disconnected
<gog> enforce deez
<doug16k> yeah I had to walk to my bank and get cash
<doug16k> my internet is fine though
<clever> doug16k: my dad has lost tv, phone, and internet
<doug16k> bell internet, not rogers
<bslsk05> ​www.reddit.com: Rogers is experiencing a nation wide outage, impacting homes and businesses. Debit/Credit machines impacted so carry cash today. : newbrunswickcanada
<clever> my tv/phone/internet all come via bell, so i'm fine
<clever> > Rogers WAN side handed me an external IP address of and a gateway of .1.1
<clever> > I think someone from Rogers went to value village, bought a $7 d-link router and tried to solve the problem at the NB datacentre, lol
<clever> lol
<mrvn> or modem defaults
<clever> > I heard they locked themselves out of their own backbone through some BGP fuckery.
<doug16k> so bad it takes hours for network engineers? wow
<doug16k> must be really something
<sbalmos> whoops
<sbalmos> clever: I remember my early ADSL, back at the turn of the century, was essentially on a telco Metro-WAN with a NAT'd "public" IP like that
<doug16k> it's so bad, you can't use debit
<sbalmos> ouch
<bslsk05> ​bgp.he.net <no title>
<clever> the power-companies website lands in these prefixes
<clever> hmm, but do those belong to rogers, or are peering thru rogers...
<clever> and while they are doing round-robin dns
<clever> both IP's are in the same AS...
<clever> so its got no redundancy to this level of fault
<heat> bgp is so shit
<clever> https://bgp.he.net/AS21853#_asinfo this claims they are instead peering with bell
[itchyjunk] has quit [Remote host closed the connection]
<bslsk05> ​bgp.he.net <no title>
ethrl_ has joined #osdev
[itchyjunk] has joined #osdev
<clever> aha, and yeah, this AS belongs to the power-co
ethrl has quit [Read error: Connection reset by peer]
<clever> so thats as direct as you can get
<clever> i cant see any actual fault here, its peer counts are unchanged
<sbalmos> where's it start dying in a traceroute?
<clever> good point
ethrl has joined #osdev
<clever> ah wait, it doesnt
<clever> * Connected to nbpower.ca ( port 80 (#0)
<clever> > GET / HTTP/1.1
[itchyjunk] has quit [Remote host closed the connection]
<clever> sbalmos: tcp works, and then http doesnt answer
<sbalmos> YOU LOSE!
<sbalmos> ah wait, what about adding Host header?
<clever> it is there
<clever> i omitted it to avoid spamming
<clever> try `curl nbpower.ca -vvv` on your end
<sbalmos> yeah, they're boned
chartreuse has joined #osdev
ethrl_ has quit [Ping timeout: 276 seconds]
<clever> expecting a fun video from bobs decline within the next 2 weeks
<bslsk05> ​'Bobsdecline - Lineman blogger - Home' - 'As a Lineman on the East Coast of Canada there isn't much I haven't seen . From the richest to the poorest everybody needs power. I decided to start a channel not only to share some of the crazy stuff I see from day to day as a trouble response truck, but also to help educate people on how things work in our world . I also will be uploading videos on tools and equipment, as well as techniques within the Line trade
<clever> this guy does linework in the province
<clever> ok, so why is the nas not online...
<clever> the bios doesnt turn on after an outage
<doug16k> that can start to happen when the cmos battery is tired
<clever> its more likely just config, the machine is very new
<clever> the irc box is where it went just plain funky
<doug16k> corrupt you mean?
<clever> puting the power button made the hdd led turn on
<doug16k> freezes booting OS?
<clever> and no amount of power button pushing made it boot
<clever> i had to pull the plug for a few minutes
<doug16k> if you have sata write buffer on, it will corrupt itself sooner or later, when power fails
<clever> it feels like the MCU that manages the power state was jammed up
<ornxka> when i run my kernel in qemu with -S, -gdb etc it exits gdbserver when it faults and kills my gdb session.. is there a way to get it to just halt without exiting instead?
<ornxka> the current flags, if anyone is interested https://paste.debian.net/hidden/0c4a2fc4/
<bslsk05> ​paste.debian.net: Debian Pastezone
<doug16k> ornxka, add -no-shutdown -no-reboot to qemu
<ornxka> no dice, unfortunately
<doug16k> I always use -s -S. idk what -S alone means
<clever> doug16k: ive not changed any sata buffers, so i'm not expecting any real data loss
<doug16k> clever, default is the stupid setting, enabled
DanDan has quit [Ping timeout: 240 seconds]
<ornxka> ill try that although i thought -s was just a shorthand for the -gdb flag in there
<doug16k> I strongly recommend you sudo nano /etc/hdparm.conf and uncomment write_cache = off
<doug16k> it hardly helps
[itchyjunk] has joined #osdev
<doug16k> it is almost inconceivable for power failure to corrupt like that. I've had it for years like that without reinstall. that was after it corrupting itself in a couple of power failures
<doug16k> makes the journal really work
ethrl has quit [Quit: WeeChat 3.4.1]
<clever> ive only ever seen 2 types of corruption in general use
<clever> 1: ext4 only journals the metadata, and files get truncated after a reboot
<clever> 2: the occasional bitflip, even on zfs
<doug16k> also try turning off NCQ. error handling is a complete joke in linux when NCQ is enabled
<clever> my desktop isnt even using any sata devices
<doug16k> it just table flips the whole port when an error happens and fails everything
<doug16k> it doesn't even bother reading the error log to see what happened or anything
<doug16k> just says screw it, it all failed, who knows what completed
<clever> oh, that reminds me of a scsi layer problem i have
<clever> i'm using iscsi to link some volumes into my desktop
<clever> and if the scsi layer takes too long, linux flips the table and xfs goes read-only
<clever> i really need to increase those timeouts, but i dont know where
<doug16k> I have never touched an iscsi thing ever
<doug16k> where do they come from?
<doug16k> file server thing?
<clever> in my case, tgtd is providing zfs volumes
<clever> because steam has trouble with nfs and large volumes
<clever> internally, steam stores the number of free blocks in a 32bit int
<clever> and if you have too much free space, it overflows, and claims you have no free space!
<clever> flock() also has trouble with nfs, so nothing can install
<doug16k> good luck getting game developers to check for errors
<clever> iscsi makes it a local fs, so the flock issue vanishes, and its smaller
<clever> its a problem with steam itself, not any one game
<doug16k> I want someone to explain steam constantly "validating" installs, and even finding differences and redownloading a few fragments. what's up with that?
<doug16k> it caught file content changing and no CRC error from drive? yeah right
<clever> doug16k: i have found a bit-flip on a file in zfs before, and zfs didnt complain
<clever> my theory, is that my ram flipped a bit, before write() was called
<doug16k> I use ECC RAM
<\Test_User> but that should only effect on the first write, and not several times later
<clever> i have also experienced data in zfs's read cache becoming bit-flipped, which caused IO errors on every attempt to read
<clever> \Test_User: it was flipped during the first write, so the checksum zfs saved, was of the corrupt data
<clever> and then on every read, it got the corrupt data, and the checksum for that corrupt data, so zfs was happy
<\Test_User> but if steam verified that before, then later devised it's decision of it being valid...
<\Test_User> *revised
<doug16k> I have ran rowhammer for days and it found nothing
<clever> in my case, the flip wasnt on steam data
<clever> it was on a package installed by the package manager
<doug16k> didn't even get an EDAC event to occur
<clever> which keeps its own checksum, of every file in the package
<doug16k> I need to get around to overclocking my ram to hell and make sure ECC errors occur
<doug16k> will be amusing to see how far it can go before it can't handle it with ECC
<doug16k> must add a bit of headroom right?
<clever> i did try reducing my ram clock, and i think i'm seeing side-effects of that
<clever> every now and then, chrome just hangs, for really long periods
<\Test_User> but then you end up with ecc just taking more of those shorter cycles to give you the data, no?
<clever> i dont have ecc on my desktop
<\Test_User> well, would deal with some variation better ig
<doug16k> no, DDR scales perfectly with clock because of the pipelining and so many concurrent banks
<\Test_User> clever: was referring to "<doug16k> must add a bit of headroom right?"
<doug16k> and prefetchers using supernatural powers to get started on stuff ages ahead of time
<\Test_User> ah
<doug16k> but yeah. if you mean the time from the request until the time of the first word, that is about the same
<doug16k> but it finishes bursts quicker
<doug16k> it deeply overlaps them though
<\Test_User> makes sense
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gdd1 has quit [Ping timeout: 272 seconds]
<doug16k> I am totally not an overclocker. I only meant it as a way to provoke errors to make sure ECC is really doing something
<doug16k> I wouldn't put it past linux to say it was all fine and the MB is consumer POS
gdd1 has joined #osdev
<doug16k> crippleware left out some trace
<\Test_User> well yes I got that reasoning, but hey, if you can get more performance from your testing, why not :P
<doug16k> then say in the manual that ECC memory "works"
<doug16k> to me, every time there was a segfault, I'd jump straight to the conclusion that it was the overclock, in my mind, and it would haunt me
<\Test_User> fair enough
<doug16k> every little delay would spook me into thinking some loop counter got corrupted
<doug16k> I am way too pessimistic for overclocking
<doug16k> I feel lucky that 2400 memory works
<doug16k> cpu is rated for 3200
<doug16k> 3200 is ridiculous. come on
<doug16k> DDR5 is what, 4800 and up or so?
<\Test_User> mine is only rated for 2133, though also on a laptop so no ECC/other fun stuff