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
Gooberpatrol66 has quit [Remote host closed the connection]
devurandom has quit [Ping timeout: 255 seconds]
navi has quit [Ping timeout: 264 seconds]
dalme has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
devurandom has joined #osdev
goliath has quit [Quit: SIGSEGV]
janemba has joined #osdev
m3a has joined #osdev
j00ru has quit [Ping timeout: 252 seconds]
gog has quit [Quit: byee]
j00ru has joined #osdev
edr has quit [Quit: Leaving]
janemba has quit [Read error: Connection reset by peer]
janemba has joined #osdev
<bslsk05> ​xt-sys/exectos - ExectOS Operating System (4 forks/64 stargazers/GPL-3.0)
<heat> i found the windows version of onyx, cool
Vercas3 has quit [Ping timeout: 260 seconds]
Vercas3 has joined #osdev
<nikolar> heat tell him to join this channel so we can bully him for copying windows like we bully you for copying linux
<heat> why am i bullied for LARPing linux
<heat> netbsduser larps solaris and no one bats an eye
Gooberpatrol66 has joined #osdev
blockhead has joined #osdev
zhiayang has quit [Quit: oof.]
zhiayang has joined #osdev
<kazinsal> that's because if you're larping solaris you're already doing enough damage to yourself that none of us can really add anything
heat has quit [Ping timeout: 240 seconds]
mayfrost has joined #osdev
janemba has quit [Read error: Connection reset by peer]
alpha2023 has quit [Read error: Connection reset by peer]
Brnocrist has quit [Ping timeout: 246 seconds]
frkzoid has joined #osdev
Brnocrist has joined #osdev
j00ru has quit [Ping timeout: 252 seconds]
j00ru has joined #osdev
Arthuria has quit [Ping timeout: 246 seconds]
MrCryo has joined #osdev
pebble has joined #osdev
rustyy has quit [Ping timeout: 260 seconds]
rustyy has joined #osdev
gsekulski has joined #osdev
air has quit [Quit: cria 0.2.9cvs17 -- http://cria.sf.net]
air has joined #osdev
<azonenberg> https://www.antikernel.net/temp/fuzz-fail.png welp my KVS fuzzer proved its worth
<azonenberg> Found an edge case where powering off midway through a write could lead to an object being created that is fully valid (data checksum, start pointer, length, data objects all valid)
<azonenberg> but the object *name*, spanning multiple flash write blocks, is only partially written
<azonenberg> the end result is that the old version of the object remains current, as desired for atomic rollback on partial writes
<azonenberg> but we also have a new object whose name is part of the actual object name and part 0xFF
<bslsk05> ​dl.acm.org: When Is Parallelism Fearless and Zero-Cost with Rust? | Proceedings of the 36th ACM Symposium on Parallelism in Algorithms and Architectures
<azonenberg> (for background, this is output of a hardware testbed that constantly power cycles a test application reading and writing to flash in order to find exactly this sort of bug)
foudfou has quit [Remote host closed the connection]
vdamewood has joined #osdev
Brnocrist has quit [Ping timeout: 272 seconds]
foudfou has joined #osdev
Brnocrist has joined #osdev
gbowne1 has quit [Quit: Leaving]
<kof673> re: larping "spread across many books to hide from the wicked" geber as in gibberish spread across many osen lol
MrCryo has quit [Remote host closed the connection]
Left_Turn has joined #osdev
Turn_Left has joined #osdev
pebble has quit [Quit: KVIrc 5.2.4 Quasar http://www.kvirc.net/]
Left_Turn has quit [Ping timeout: 260 seconds]
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 260 seconds]
gsekulski has quit [Ping timeout: 256 seconds]
netbsduser has joined #osdev
node1 has joined #osdev
vdamewood has quit [Quit: Life beckons]
<mjg> childlikempress: wut
<mjg> childlikempress: > Rust’s fearless concurrency is an exciting advance for the easy cases, but remains over hyped when parallel programming gets hard.
<mjg> they are way too charitable
<mjg> they missed the part where rust literally provides NOTHING for actual informed parallel programming
<nikolapdp> well when all you know is spawn some threads and wait on a lock, that's "exciting advance"
op has joined #osdev
GeDaMo has joined #osdev
dequbed has joined #osdev
k0valski18891621 has quit [Ping timeout: 264 seconds]
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 256 seconds]
janemba has joined #osdev
zxrom has quit [Quit: Leaving]
zxrom has joined #osdev
[Kalisto] has quit [Quit: Ping timeout (120 seconds)]
[Kalisto] has joined #osdev
node1 has quit [Ping timeout: 250 seconds]
* Ermine wonders how "GPU Boost" switch on his motherboard is supposed to work
<nikolapdp> it boosts your gpu duh
<zid> big up to 9.4.5 and 9.4.6
<nikolapdp> isn't that the wrong order
mmohammadi9812 has joined #osdev
pebble has joined #osdev
navi has joined #osdev
node1 has joined #osdev
node1 has quit [Client Quit]
chibill has quit [Ping timeout: 264 seconds]
zxrom has quit [Quit: Leaving]
chibill has joined #osdev
zxrom has joined #osdev
janemba has quit [Read error: Connection reset by peer]
m257 has joined #osdev
<netbsduser> mjg: by god, it's not wrong
<netbsduser> i think people are in an awful hurry to declare the problems of parallel programming solved by a language codifying a rule that is most useful for problems which are naturally parallel
<netbsduser> while for things of monstruously shared state like modern kernels, it isn't viable
<mjg> the truely fearlessly parallel in rust is already handled in other languages
<mjg> not even a selling point despite their claims to the contrary
<mjg> cherry on top there is a bug report about rayon being slower than openmp(the c thing) with numa
<nikolapdp> oh but it is for people who don't know better
<nikolapdp> the c thing that's actually automatic btw
<mjg> it is literally as fearless as the rayon thing
<nikolapdp> you just tell it to parallelize a loop and that's it
<mjg> yea
<nikolapdp> if not more
<dostoyevsky2> I did parallelize some matrix stuff with rayon some years ago in Rust, worked well
<nikolapdp> and i had some fluid sim i worked on in c
<nikolapdp> parallelized it in one openmp pragma
<mjg> nobody claims rayon does not work
<mjg> i claim rayon has counterparts in other languages, even dreaded C
<dostoyevsky2> I was actually surprized when I read about zeromq and others that it's similar to what Go does with channels... I always wondered why zeromq isn't that common anymore these days
<nikolapdp> didn't the guy who made zeromq regret making it in c++ and then started a new project in c
<nikolapdp> or was that some other projetc
<dostoyevsky2> mjg: I wonder if one could actually use rayon in a kernel, as you'd probably don't have posix threads there
janemba has joined #osdev
<nikolapdp> you have kthreads and you could write a backend for it
<nikolapdp> it's not a question if you could, it's a question of if you should
<dostoyevsky2> nikolapdp: I always felt that Rust is very inflexible when it comes to stuff like this, because crates usually depend on other crates and you can't just rewrite them all to make them not depend on posix anymore, and in C libraries are often self-contained and you can easily assess how long it would take to e.g. remove that three calls to fopen
<nikolapdp> well i am pretty sure rayon runs on windows too
<nikolapdp> so there must be some mechanism for it in particular to be cross platform
<nikolapdp> but yeah in general, very inflexible unless you go out of your way to make it less annoying
<dostoyevsky2> Yeah, but in my rayon project I use the rayon crate, but when I build the project I am actually using ~250 crates
<zid> This is why I don't use C#
<zid> people are like "yea but mono!" or "yea but core .NET!"
<zid> like I wanna fucking port an entire JVM equivalent to something
<nikolapdp> even worse, i don't think .net is interpreted
<nikolapdp> so you'd need to make a jit
<zid> It's a good language but you can't do anything in it freestanding
<nikolapdp> i am surprised no one's made a c# compiler yet
<nikolapdp> like a proper gcc-like compiler
<zid> I think the existing tools do everything you want
<zid> and the things it doesn't do are very not doable
<zid> so adding one more small part won't help
<nikolapdp> eh probably
<zid> "Memory. It can be cached, that's the job of ngen.exe. It generates a .ni.dll version of the assembly, containing machine code and stored in the GAC. Which automatically gets loaded afterward, bypassing the JIT step."
<nikolar> what's that about
<zid> can .net be cached
<zid> err c#
<zid> according to "random guy"
<nikolapdp> the most trustworthy of sources
<zid> correct
mmohammadi9812 has quit [Ping timeout: 268 seconds]
m257 has quit [Quit: Client closed]
m257 has joined #osdev
alpha2023 has joined #osdev
edr has joined #osdev
Arthuria has joined #osdev
pebble has quit [Quit: KVIrc 5.2.4 Quasar http://www.kvirc.net/]
m257 has quit [Ping timeout: 250 seconds]
kof673 has quit [Ping timeout: 268 seconds]
janemba has quit [Read error: Connection reset by peer]
blockhead has quit []
janemba has joined #osdev
dude12312414 has joined #osdev
dude12312414 has quit [Remote host closed the connection]
goliath has joined #osdev
eddof13 has joined #osdev
op has quit [Remote host closed the connection]
pg12 has quit [Ping timeout: 264 seconds]
eddof13 has quit [Quit: eddof13]
pg12 has joined #osdev
MrCryo has joined #osdev
eddof13 has joined #osdev
Arthuria has quit [Ping timeout: 268 seconds]
mmohammadi9812 has joined #osdev
chiselfuse has quit [Remote host closed the connection]
eddof13 has quit [Quit: eddof13]
chiselfuse has joined #osdev
eddof13 has joined #osdev
op has joined #osdev
heat has joined #osdev
janemba has quit [Read error: Connection reset by peer]
m257 has joined #osdev
vdamewood has joined #osdev
janemba has joined #osdev
<bslsk05> ​<q66> we've improved the performance of certain things (like mandoc makewhatis trigger) by 20-30% by... ␤ removing musl's x86_64 memcpy assembly ␤ as it turns out, the generic c implementation is several times faster, fun
<heat> lul
<nikolapdp> kek
<mjg> musl has utterly crap string routines
<Ermine> omegalul
<mjg> i already dunked on it
<Ermine> Convince dalias that his stringops are crap challenge [IMPOSSIBLE]
<netbsduser> david chisnall condemned handwritten assembly string routines not some little time ago
<mjg> anyone on that site?
<mjg> can you ask the guy for disasm of the "generic c routine"
<Ermine> she is in #musl
<mjg> libera?
<heat> no need mon
<bslsk05> ​godbolt.org: Compiler Explorer
<heat> oh wait they use clang in chimera, switch that out
<mjg> heh that uses simd
<heat> that + the x86_64 memcpy is just a rep movsq + rep movsb pretty much
<bslsk05> ​github.com: main/musl: patch out "optimized" x86_64 memcpy · chimera-linux/cports@886684f · GitHub
<mjg> but what is the fucking "c implementation" they speak of
<mjg> i mean where is it coming from
<heat> i linked it to you
<heat> musl/src/string/memcpy.c
<mjg> lol
<mjg> ok
<mjg> sorry :)
<mjg> i'm going to ranto the author later then
<heat> lol good luck
<heat> many have tried
<heat> while you're at it make sure to ask for the bug tracker and the scalable malloc
<nikolapdp> how's musl's malloc
<Ermine> heat: and for ifunc!
<mjg> :D
<mjg> well they did get shit-ey but not as bad memset
<Ermine> mjg: contribute good memcpy for onyx plz
<heat> nikolapdp, no per-thread cache = awful performance on multithreaded
<mjg> heat mostly stole my memcpy i think
<heat> no
<mjg> oh?
<nikolapdp> ah interesting
<heat> i wrote my kernel memcpy based on yours yeah
<mjg> well
<heat> but the userspace musl memcpy is the bionic memcpy
<mjg> the ballpark should be the same then, whichever way things swing
<mjg> ye that's sane
<Ermine> oh
<mjg> although it had some PESSIMAL shit in there
<mjg> i don't remember what
<mjg> i just remember it was not fit for takin' as is
<heat> the annoying bit is that musl does not have ifunc which makes things really annoying to do (and bionic is missing newer uarch stuff)
<Ermine> i thought it's vanilla musl except syscall bits
janemba has quit [Read error: Connection reset by peer]
<heat> nah
<heat> note that it's somewhat vanilla, but with a few bolts and pieces tacked on
<Ermine> btw where can I see mjg's glorious memcpy?
<Ermine> ah, in kernel
<heat> kernel/lib/libk/arch/x86_64/memcpy_impl.S
<heat> ideas are similar to mjg's memcpy but with some tradeoffs around the place
<heat> i did realize it's impossible to OPTIMALLY handle rep movsb without an x86 uarch table with variants or something, so i kind of gave up
zxrom has quit [Quit: Leaving]
<childlikempress> coward
<mjg> ye past certain things (e.g., not just rolling with rep mov for everything) it's all tradeoff-city
<childlikempress> a hotter heat would have made the table
<mjg> jump tables are PESSIMAL
<mjg> don't you have a SOLARIS benchmark to show it
<mjg> :d
xenos1984 has quit [Ping timeout: 268 seconds]
<childlikempress> ✨pareto✨
<mjg> fucking great, i'm in 4 convos at once
<nikolapdp> eh just do for (; count--; *dest++ = *src++); :P
<mjg> no, that's still faster than what musl is doing
<mjg> for most *used* sizes
<heat> i mean if you get the compiler to codegen memcpy code then sure
<mjg> hand-rolled one byte per iteration loop is already faster for sizes < 128 or so than movsq -> movsb
<Ermine> quite interesting thing
<Ermine> but it requires the knowledge of microarchitecture
<heat> iirc there was even some iffyness when testing on my uarch, bionic SSE2 strops were around the speed of musl's (which are around the speed of a raw ERMS)
<heat> AVX strops clear musl's though
<mjg> i would love to flame this but i'm spread too thin
<mjg> and have to bail from this one
<mjg> cheers
<heat> saden
<Ermine> toodle-oo
<Ermine> so, this memcpy outperforms anything compiler can generate?
<childlikempress> heat: avx is more power and startup cost unless you're hammering it
<heat> Ermine, very likely, particularly when it comes to GPR-only code
<heat> there's a clang builtin that allows you to get this sort of control on the memcpy itself, but you still lack branch control
<zid> I wish my cpu made turbo spooling noises like a jet
<heat> childlikempress, yeah i guess, but glibc /does/ default to avx
<heat> and it like... doubles the speed of SSE2, no joke
janemba has joined #osdev
mmohammadi9812 has quit [Ping timeout: 260 seconds]
<childlikempress> doubles speed when
xenos1984 has joined #osdev
<GeDaMo> Only doubles? Why not quadruples? :|
<zid> guys how can I wire a turbo button to my cpu, I need it to poke an mtrr somehow
<zid> hook it up to the infrared receiver lines on my superio or something maybe, with some hyperfine bodge wires?
<GeDaMo> Arduino?
* mjg burps
<mjg> i'm back
<mjg> you guys suck
<mjg> wait, not this message
<mjg> for work reasons and others i'm going to have to write a funny bench
<zid> poking the arduino's mtrrs is no good
<zid> I need to poke *my* mtrrs
<mjg> and i'm going to run it on a bunch of cpus
<zid> I don't even mean mtrrs do I
<zid> I mean MSRs
<heat> childlikempress, for big copies at least but i don't have my benchmark results handy anymore
<zid> I guess usb is an option, I have headers
<mjg> big copies are overrated
<childlikempress> that and also, you can pull out the avx guns only when things get big
<heat> yeah idk the specifics, all i know is that glibc melted the competition
<zid> okay here's an idea GeDaMo, this mobo has thermal sensor headers
<heat> all praise the LGPL
<zid> get the switch to drive them high/low and trip a thermal alarm
<zid> which sends an interrupt, which reprograms the msr
<heat> (even when the competition is a magic instruction that should do things optimally)
<bslsk05> ​xkcd - Workflow
<zid> I might even be able to get this working softwareless
<zid> if I configure it just right
<zid> so that the switch adjusts the resistance across that pin correctly so that turbo button pressed = low temp, and turbo button out = high temp
<zid> the high temp causes it to disable the turbo all by itself, gg
* Ermine tries to make meltdown pun
<mjg> heat: i think i told you before, but an Important Guy at intel literally told me to just rep mov
<mjg> and is gonna be great
<mjg> which directly contradicts everything out there, including THEIR OWN FUCKING OPTIMIZATION DOCS
<Ermine> intel software optimization manual
<heat> great stuff
josuedhg has joined #osdev
<heat> lkml guy?
<mjg> the identity will remain a secret
Shaddox404 has joined #osdev
m257 has quit [Ping timeout: 250 seconds]
Shaddox404 has quit [Client Quit]
<childlikempress> why don't i have important guys at intel telling me how their shit works :<
<Ermine> that's good, nobody tells bullshit to you
<heat> i have important girls at intel telling me how their shit works
<heat> because i use solaris
<mjg> maybe i'll contribute to ILLUMOS
<mjg> but you covinced me to disasm fresh solaris to check if they fixed the PESSIMAL in locking primitives
<childlikempress> heat: can you ask them what the disgusting thing dan shechter found out about load pipes is
<heat> yes
<heat> load pipe is a euphemism for penis
<heat> HTH
<childlikempress> nothing disgusting about that
<childlikempress> prudwe
* mjg is a proud penis owner
<childlikempress> ewwwww
<Ermine> lewd
vdamewood has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mjg> heat: i can give you part of the name tho!
<mjg> F. Ucker
<heat> ah yes, Franz Ucker, Vice-President of load pipes
<heat> i know the guy
<bslsk05> ​www.theregister.com: systemd 256.1: Now slightly less likely to delete /home • The Register
<mjg> :]
xenos1984 has quit [Ping timeout: 256 seconds]
<Ermine> 95 comments on phoronix
<Ermine> > It saves quite a bit of work for the BOFH, doesn't it?
<heat> bofa
<Ermine> bofh = bastard operator from hell
<Ermine> 80s humour stuff
<mjg> PLONK
<heat> bofa deez nuts
<heat> genz humour stuff
<heat> plonk
<bslsk05> ​www.theregister.com: BOFH Archive • The Register
josuedhg has quit [Quit: Client closed]
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
xenos1984 has joined #osdev
eddof13 has quit [Quit: eddof13]
linear_cannon has joined #osdev
Arthuria has joined #osdev
<mjg> oh shit
<mjg> memmove is utterly shite
<bslsk05> ​git.musl-libc.org: memmove.s\x86_64\string\src - musl - musl - an implementation of the standard library for Linux-based systems
<mjg> this is doing backwards rep movsb
<mjg> it is known PESSIMAL to do it
<mjg> perf goes to shit real bad
janemba has quit [Read error: Connection reset by peer]
MrCryo has quit [Remote host closed the connection]
mmohammadi9812 has joined #osdev
<Ermine> you mean rep movsb from higher addressen to lower ones?
<heat> yessen
<heat> well defineden to be baden
<gorgonical> what should be done instead? i'm curious
<heat> drop the idea of rep movsb and just copy in a loop
<mjg> you can movsq
<mjg> or do some other shit
<mjg> just not movsb
<heat> mon, rep movsq is the same as rep movsb usually
<mjg> no
<heat> yes
<mjg> no
<mjg> forward case that's mostly true
<Ermine> Will you try to fix this stuff in upstream?
<mjg> it's not true for copy backwards
<mjg> Ermine: i will
<mjg> so happens my company has a product on a musl-liking distro
<mjg> so it is my interest to DEPESSIMIZE
<heat> hahaha ha hahahaha hah ahahaha ha ha ha
<mjg> (well the product is WIP)
<mjg> heat: fuck you too
<gorgonical> the problem is not the direction but the width of the move then
<heat> enjoy maintaining the patches
<heat> it's gr8
<mjg> :d
<mjg> is the guy bad or something
<Ermine> heat: don't discourage him at now please
<mjg> gorgonical: they do something fucky, who knows what, literally open-coded one byte moves don't have the problem
<heat> your patches are very very likely to be completely bikeshedded at the very least
<heat> musl is anti-pragmatic for everything
<Ermine> dalias, the musl dev, is very stubborn indeed
<heat> like "SIMD strops? no, lets improve the compiler instead and add maybe a little bit of inline assembly? ifunc? no that's bad because <reasons>"
<Ermine> after xz incident: len(<reasons>)++
<Ermine> maybe i should try writing a libc if i succeed in making a sorry excuse of an os
<gorgonical> I don't read x86 asm very well so it's not clear to me what's wrong with this memmove.S. Open coding means not in a macro, right?
<gorgonical> Other than the use of movsb instead of movsq
<heat> the big thing wrong is that you can't use rep movsb backwards
<heat> you *can*, but your speed will be like, halved in 40
<mjg> i got a dude with real results
<mjg> he got about 4x
<mjg> :>
<mjg> anyhow
<mjg> the string ops are almost not changing in musl, so worst case rebasing that wont be a burden
eddof13 has joined #osdev
<Ermine> btw which company are you working for? So I know who produces OPTIMAL stuff
<mjg> (4x slowdown vs movsq)
<mjg> netgate
<Ermine> thx
<mjg> but the product is not anywhere near OPTIMAL cause other people :S
<mjg> the flagship product is currently on freebsd, which has tons of PESSIMAL
janemba has joined #osdev
<mjg> it is moving to linux, with, de fuck you know, also tons of PESSIMAL
<Ermine> oof
<Ermine> move to onyx
<Ermine> it has tons of OPTIMAL
<mjg> i proposed that
<mjg> CTO said onyx is anti-pragmatic
<mjg> i mean the author of onyx
<mjg> "we would have to maintain patchen"
<Ermine> OH
<heat> onyx is anti-pragmatic? onyx is super pragmatic
<heat> i accept all the patchen
<mjg> do you accept typo fixen
<heat> yesen
<mjg> do you have memory reclaim yet
<mjg> on memory pressure
<heat> In Progress
* Ermine prepares skalibs port
<mjg> i got a WEIRD TRICK in an experimental branch in linux
<mjg> (weird trick being don't take the lock if yhou don't have to, lol)
<heat> yesterdayen i was poking around and adding LRU-2Q to onyx
<mjg> and with that freebsd is no longer faster than linux
goliath has quit [Quit: SIGSEGV]
<mjg> you do understand een openbsd passes this
<mjg> :)
<heat> who wins
<heat> a 30 year old system
<heat> or da onyx
<mjg> 30 year old system with 3000 years of tech debt
<mjg> do you understand how many man hours went into making it bad
<heat> tech debt makes it work easier honestly
<mjg> untold fucking count
<heat> like, the lru-2q pcpu batching shit. truly tricky logic
<heat> holding a lock and going brrrr is so much easier
<mjg> a simple but working soluton is not tech deb
<mjg> t
<mjg> SHITE is tech debt
<mjg> if you literally fifo on this shit that's already better than panic("LOL");
<Ermine> so SHITE != PESSIMAL
<heat> im a single hobby developer working on this in my spare time
<mjg> watch less anime with zid
<mjg> Ermine: fifo would totes be PESSIMAL. what he has now, which is nothing, does not even qualify for grading
<heat> i have fifo dumbass
<mjg> so you do survive the test?
<heat> what test
<mjg> file tree fucking walk
<mjg> gazillion inodes to visit and recycle
<heat> no
<heat> i survive dd of a large ass file and im already decently happy
<mjg> hm
<mjg> it is plausible netbsd does not
<mjg> :d
<mjg> they had some bugs with caching of that stuff
Matt|home has quit [Quit: Leaving]
zxrom has joined #osdev
<mjg> heat: what is the guy protesting concerning simd
<mjg> heat: specific versions?
<mjg> heat: cause as was discussed here sse2 for example is part of the abi, so no fuckery with ifuncs or any other runtime detection necessary
<Ermine> firefox please implement mpris support properly
<mjg> not to mention the asm pasted by someone above clearly showing simd emitted by the compiler
<mjg> :>
<Ermine> I'm tired to manage the wrong application with bluetooth headphones
<nikolar> Wat
skipwich has quit [Ping timeout: 256 seconds]
<zid> MPRIS SUPPORT
<zid> nikolar is hard for hearing
<nikolar> WHAT
<zid> it's the dbus api for controlling media players apparently
node1 has joined #osdev
<nikolar> Interesting
<netbsduser> i am on the verge of spamming RCU everywhere
<nikolar> Ah didn't see Ermine's previous message
<netbsduser> namely for the existence guarantee
<nikolar> Kek
<netbsduser> it can make a lot of things much simpler
eddof13 has quit [Quit: eddof13]
node1 has quit [Quit: Client closed]
Brnocrist has quit [Ping timeout: 256 seconds]
node1 has joined #osdev
<nikolar> How do you implement rcu
eddof13 has joined #osdev
<childlikempress> oh it's easy! three simple steps
<childlikempress> 1. read a thing
<childlikempress> 2. copy the thing
<childlikempress> 3. update the thing
<childlikempress> and that's it! you've implemented rcu
<mjg> switch to rust
<mjg> obsoletes rcu
<nikolar> How do you ensure that you're the only one holding a reference
<nikolar> mjg why didn't I think of that
<mjg> maybe you drank node.js koolaid or somethin
<nikolar> I've successfully avoided using node at work today
<nikolar> It was a good day
<zid> I implement rcu by if anybody writes to me, abort()
eddof13 has quit [Client Quit]
<mjg> i got php in the product
<mjg> for the most part i don't even know it's there
<nikolar> Nice
<netbsduser> nikolar: this is an experimental way of explaining this (meaning i thought it up myself) but here is my attempt
<netbsduser> the use patterns in data structures are conflated with the mechanism; the mechanism is really a way to defer work
<netbsduser> in my kernel i can schedule soft interrupts which can do some work later. you can use spl to raise the IPL such that soft interrupts are inhibited while it's held, and soft interrupts of same IPL do not interupt one another
<netbsduser> if you carry out certain work at some IPL graeter than or equal to the IPL of all soft interrupts that can possibly carry out related work, you can be assured that what you're dealing with won't disappear out frmo under you if you are on a uniprocessor
<mjg> what do you think bonwick would have said about rcu
<netbsduser> but on a multiprocessor no such assurance. now the RCU mechanism is effectively an extension of this assurance to multiprocessors, and the way it works is that every CPU must have passed through an IPL < that soft int level
m5zs7k has quit [Ping timeout: 252 seconds]
<netbsduser> and that's exactly how it's implemented in my kernel (rcu_read_lock() and rcu_read_unlock() are just spl calls)
<nikolar> Interesting
<mjg> that's misleading imo
<mjg> while technically it wont disappear in the sense of memory being freed
<mjg> it can be actively fucked with
m5zs7k has joined #osdev
<netbsduser> but spl itself doesn't drive forward the rcu deferred work mechanism. that would be costly. instead, on task switch or regularly when a core is idle, the fact that we cannot currently be dealing with that soft int level, because that level blocks out task switching except explicitly -
alpha2023 has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
alpha2023 has joined #osdev
goliath has joined #osdev
node1 has quit [Quit: Client closed]
op has quit [Remote host closed the connection]
<heat> kernel
<heat> mjg, he thinks versions completely written in simd and needless and unmaintainable IIRC
<heat> simd assembly
<heat> s/and/are/
<nikolar> KERNAL
<childlikempress> heat: who
<childlikempress> chisnall?
<heat> dalias, the musl guy
<childlikempress> ah
<zid> Fuck it, let's expedite some more monsters
<heat> mjg, btw if you think legal is ok with it, just take glibc's routines and use em
<heat> LGPL, should be okay as long as you comply with the LGPL on that file i think
<heat> no need for upstreaming pain or even ifunc
<heat> just rock n roll
eddof13 has joined #osdev
mmohammadi9812 has quit [Ping timeout: 255 seconds]
<Ermine> I'd consult legal guys anyway
<mjg> i have no need to use glibc's routines
<mjg> between you and me i know for a fact they are not OPTIMAL
<mjg> there was even a funny G paper benching them and other stuff
<mjg> more toe the point looking at them is best avoided
<mjg> unless glibc is what you are working on
<Ermine> mjglibc when
<mjg> 3 days after onyx on sun E10k
Turn_Left has quit [Remote host closed the connection]
<Ermine> uh oh
Turn_Left has joined #osdev
<nikolapdp> onyx on sparc when???
<heat> more optimal than glibc is hard to attain and is probably a bad use of company time in general
<heat> just sayin
<heat> mons just send patchen
<heat> monen
<nikolapdp> PATCHEN
<mjg> key point was glibc optimizes for microbenchmarks at times
<mjg> you can get in the real world ballpark of glibc without being glibc
<mjg> and people already did
<heat> what people?
<nikolapdp> yeah i am cuious about examples
<mjg> their overgrown memcmp is a great example of not worth emulating
<heat> maybe the fbsd simd project got close idk, i didn't follow that
<mjg> google for the automemcpy paper
<zid> that'd require someone to own a sparc, niko
<mjg> they were fucking with adding overlapping stores et al to the compiler, so that you don't have to code that in assembly
<mjg> and messing with autogenerting the routine
<nikolapdp> i could've gotten a spicy sparc server for like 300 euro a month ago
<nikolapdp> not sure if listing is till up on ebay
<mjg> it was found that glibc's memcmp is enormous and keeps resulting in icache misses in real programs
<zid> see, can't even give them away
<nikolapdp> kek soon
<nikolapdp> once oracle's sold the last of them
<mjg> but probably performs great in an ubench where it can fit in icache
<heat> mjg, i dont want to be a meanie but if you want to base your PERFORMANCE ROUTINES on fucking llvm-libc, good luck lol
<mjg> funny you say that, i'm watching a video with cantrill saying you can't get sun microsystems out of him
<mjg> heat: i don't. i am saying glibc suckson at times
<heat> it does
<mjg> anyway dude said developing hw + sw together yields better performance
<heat> correct
<nikolapdp> which is not wrong
<mjg> except i don't know if you can use SUN as an example
<mjg> :d
<heat> oracle numbers
<heat> call me lateren
<nikolapdp> ORACLE DB
goliath has quit [Quit: SIGSEGV]
<mjg> even so oracle used to shill solaris + sparc as great cause engineered together
<mjg> so why are they pushing linux on amd64 now :O
<mjg> should not that be inherently inferior Larry
<nikolapdp> because everyone else is on linux and amd64
<nikolapdp> sparc's time was numbered even before oracle acquired them
<mjg> if that's true
<mjg> stop pandering "engineered together"
<mjg> :X
<heat> solaris + sparc + java + oracle db are still engineered together
<heat> fuckin oracle numbers
<nikolapdp> that's true
<heat> and the java streams acceleration stuff
<mjg> did you know the sun escapees embraced node.js fora while?
<mjg> :)
<heat> yes
<nikolapdp> uh
<nikolapdp> yuck
<mjg> makes you wonder how tf did that happen
<heat> why would that not happen?
<mjg> as the tech stands for anything but what these people claim to like
<heat> why
<mjg> you do know they are embracing RUST now
<nikolapdp> have you seen node.js
<mjg> do you see the stark difference
<nikolapdp> mjg oh yuck
<mjg> what
<nikolapdp> rust
<mjg> rust at least makes sense
<nikolapdp> more than node sure
<mjg> even tho it is overhyped and looks like roadkill
<heat> i dont see the difference, sorry
<mjg> ? :D
<mjg> idk types
<nikolapdp> node == rust ??
<nikolapdp> confirmed?=
<mjg> you missed one =
<heat> you don't use rust where you were going to node.js
<mjg> node === rust
<nikolapdp> ah true
<mjg> they totally would use rust where they previously used node.js
<heat> they are not tools for the same problem
<heat> nope, sorry
<mjg> you must have missed where people rewrite python, go and others into rust
<heat> if they would, they're wrong
<mjg> for memory savings 'n shit
<nikolapdp> you do realise a lot of people are using rust in webdev right
<nikolapdp> well "a lot"
<nikolapdp> both in fe and be
<mjg> you can express the same shite program in rust for fraction of memory and cpu consumption
<heat> mon i could rewrite python go and others into C or C++ or whatever
<mjg> they do it with rust
<heat> they are conceptually not tools for the same problem, and the final program will be a lot different
<mjg> so for example they do it to dodge fucking with GC
<mjg> because in real deployments with serious codebases the GC pauses are a constant problem
<mjg> going to a non-gc language is very much a selling point on its own
<mjg> except prior to rust this mean segfaults all over
<nikolapdp> and with rust, it means unsafe all over .P
<Ermine> I will go from go to c++ one day..
<nikolapdp> :P
<mjg> only if you want to do something sensible
<mjg> and not webdev it
<nikolapdp> ah true
<mjg> 23:39 < mjg> you can express the same shite program in rust for fraction of memory and cpu consumption
<heat> christ the osdev people are debating languages again
<nikolapdp> heat you're welcome to leave
<nikolapdp> if you don't like it
<Ermine> but I need to come up with a Good(tm) HTTP client library
<mjg> heat you don't have to be a part of the convo
<mjg> why would you c++
<heat> i'll just choose not to engage in the bait yeah
<mjg> the fuck
<nikolapdp> lol
<nikolapdp> also did heat just say he isn't going to engage
<mjg> ah right, you are both high on onyx
<mjg> carry on
<nikolapdp> that's new
<heat> Ermine, there are a bunch of http libraries fwiw
<heat> even libcurl works
<nikolapdp> oh libcurl is great
edr has quit [Ping timeout: 246 seconds]
<Ermine> I'm having an idea of such a library which only creates and parses messages, and leaves sending and recieving stuff to the user
<Ermine> I've read some advice against libcurl once
<nikolapdp> oh sure, what advice
<Ermine> but it was quite a while ago...
<Ermine> idr
<heat> that is somewhat sensible but if you're not careful it'll be PESSIMAL
<heat> whether that matters, probably not
janemba has quit [Read error: Connection reset by peer]
<mjg> huh
<mjg> i don't know much about http libs, the standalone curl utliity is the gold standard fwiw
<mjg> for the library to be fucked would be new
<gorgonical> Just relearned the lesson that with concurrent programming you have to check for a reply to a message before you wait for a reply in case you already got the reply
<Ermine> My point is that such architecture would give the user the ultimate control over event loop
<Ermine> I've got this idea after getting pissed off by one python library which took control of asyncio event loop so I couldn't add my coroutines
<mjg> :p
<mjg> dude if you fuck with a high level language you already lost
<mjg> it's a wild fucking west over there
<nikolapdp> lel
<mjg> you either do stuff as documented on SO or you are on your own
xenos1984 has quit [Read error: Connection reset by peer]
<heat> node.js is pretty good at async
<heat> everything else... eh good luck
<nikolapdp> too bad you have to put up with all other crap around the async
<mjg> is it fearless async?
<heat> yes
<Ermine> insert node_modules joke here
<mjg> i don't know any node jokes :(
<nikolapdp> node_modules eats a lot of disk space?
<nikolapdp> haha
<bslsk05> ​www.reddit.com <no title>
<nikolapdp> that's the one Ermine
<mjg> where was that post about node pulling in total nonsense
<mjg> anime pics 'n shit
<mjg> there were some crazy modules attached as deps to some bullshit
<nikolapdp> well when you have literally thousands of deps, that's what you get :P
<mjg> good thing rust is not rolling with the same kind of dep environment
<nikolapdp> yeah lucky them
<Ermine> Our rust fan at #minix does zero-dep stuff, and I have a mad respect to him for this
<mjg> rust fan over at minix?
<nikolapdp> that's fair
<nikolapdp> wait, rust on minix
<mjg> does that add up?
<Ermine> at #minix, the channel
<mjg> genuine q
<nikolapdp> can you rust on minix?
<Ermine> there's no rust in minix, although someone tried to port it
<nikolapdp> or just a guy using rust that happened to be in the channel
<nikolapdp> ah right
<mjg> even so, do the 2 line up?
<mjg> what does tanenbaum thinkabout rust
<nikolapdp> kek
<mjg> maybe it's too fsat for him
<Ermine> idk he has retired a long ago
<Ermine> btw we once had a dude which came to #minix and stated that minix is BLOATED
<nikolapdp> lel
<heat> oh, a #musl user found #minix?
<Ermine> never saw him at #musl, but it happened in freenode epoch, so I'm not sure
<Ermine> Actually, he proved to be an asshole, so I wouldn't be surprised if he's actually #suckless user
netbsduser has quit [Ping timeout: 252 seconds]
eddof13 has quit [Quit: eddof13]
<heat> or a musl user
<Ermine> he promised to port busybox though
xenos1984 has joined #osdev
<Ermine> btw you've sent some escape sequence or something
goliath has joined #osdev
<nikolapdp> heh yeah
zxrom has quit [Quit: Leaving]
wereii has quit [Quit: ZNC - https://znc.in]
eddof13 has joined #osdev
wereii has joined #osdev
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 256 seconds]
<heat> yes, it's a strikethrough escape
eddof13 has quit [Quit: eddof13]
eddof13 has joined #osdev
Left_Turn has quit [Read error: Connection reset by peer]
eddof13 has quit [Client Quit]
* nikolar strikes through your escape