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
pounce has quit [Ping timeout: 268 seconds]
frkzoid has joined #osdev
freakazoid332 has quit [Ping timeout: 244 seconds]
pounce has joined #osdev
isaacwoods has quit [Quit: WeeChat 3.6]
MiningMarsh has quit [Quit: ZNC 1.8.2 - https://znc.in]
heat_ has joined #osdev
heat has quit [Read error: Connection reset by peer]
MiningMarsh has joined #osdev
frkzoid has quit [Ping timeout: 244 seconds]
kof123 has joined #osdev
dasabhi has joined #osdev
frkzoid has joined #osdev
frkzoid has quit [Ping timeout: 244 seconds]
nyah has quit [Ping timeout: 252 seconds]
saltd has quit [Remote host closed the connection]
freakazoid332 has joined #osdev
[itchyjunk] has quit [Ping timeout: 265 seconds]
freakazoid332 has quit [Ping timeout: 244 seconds]
[itchyjunk] has joined #osdev
saltd has joined #osdev
frkzoid has joined #osdev
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #osdev
k8yun has joined #osdev
ThinkT510 has quit [Ping timeout: 268 seconds]
[itchyjunk] has quit [Read error: Connection reset by peer]
zaquest has quit [Remote host closed the connection]
dasabhi has quit [Ping timeout: 252 seconds]
zaquest has joined #osdev
saltd has quit [Remote host closed the connection]
heat_ has quit [Remote host closed the connection]
heat_ has joined #osdev
wxwisiasdf has joined #osdev
<wxwisiasdf> hello good morning
<wxwisiasdf> operating in the operation systems of the operable internet relay chat osdev room o/
k8yun_ has joined #osdev
k8yun has quit [Ping timeout: 265 seconds]
<wxwisiasdf> on tonights episode of wonky osdev adventures with wxwisiasdf we got, freestanding cobol
identitas has joined #osdev
heat__ has joined #osdev
heat_ has quit [Read error: Connection reset by peer]
saltd has joined #osdev
heat__ has quit [Ping timeout: 260 seconds]
<kof123> really :D ack still has various languages...
<kof123> im crazy, im not that crazy :D
<wxwisiasdf> hmmm
k8yun_ has quit [Quit: Leaving]
GeDaMo has joined #osdev
tarel2 has joined #osdev
wxwisiasdf has quit [Quit: leaving]
<saltd> shit macron calling
<saltd> i cant answer now i am not in order i want to continue the play
<saltd> game*
<saltd> shit :( sexuality-=1
<saltd> анипидоры
<saltd> sry wrong channel i thinked this is russian fss secret channel sorry guys i need to eliminate you all now
<saltd> meet in church
* saltd proceeding os dev ...
<mrvn> your OS lascks undo()
kof123 has quit [Quit: Leaving.]
<saltd> mrwn i just have looped redo
<kazinsal> when the meds haven't kicked in yet
xenos1984 has quit [Ping timeout: 250 seconds]
xenos1984 has joined #osdev
<saltd> the meds kicks only 1 time in life
xenos1984 has quit [Ping timeout: 250 seconds]
saltd has quit [Remote host closed the connection]
saltd has joined #osdev
xenos1984 has joined #osdev
frkzoid has quit [Ping timeout: 246 seconds]
scoobydoo_ has joined #osdev
scoobydoo has quit [Ping timeout: 260 seconds]
scoobydoo_ is now known as scoobydoo
saltd has quit [Remote host closed the connection]
ThinkT510 has joined #osdev
saltd has joined #osdev
netbsduser has joined #osdev
gog has joined #osdev
[itchyjunk] has joined #osdev
bauen1 has quit [Ping timeout: 268 seconds]
bauen1 has joined #osdev
FreeFull has joined #osdev
jjuran has quit [Quit: Killing Colloquy first, before it kills me…]
jjuran has joined #osdev
<ddevault> what the hell is even going on with this code
<ddevault> are there alignment requirements other than %8 for an interrupt stack
<ddevault> oh it's 16 bytes
<ddevault> whelp that answers my question
bauen1 has quit [Ping timeout: 268 seconds]
<ddevault> I spent 6 fucking hours debugging that
bauen1 has joined #osdev
<zid> huh I figured it'd be 8 too
<zid> unless you're calling into C with that stack with the wrong alignment because of it
nyah has joined #osdev
<froggey> I thought x86-64 automatically realigned the stack on interrupt
<ddevault> it does
tarel2 has quit [Ping timeout: 252 seconds]
<ddevault> but my interrupt stack is just my context struct, so that it saves registers without any extra steps
<ddevault> having it aligned on 16 by the CPU meant that all of the registers were off by one, and the last register was written out of bounds
<froggey> ah
MiningMarsh has quit [Ping timeout: 265 seconds]
MiningMarsh has joined #osdev
<mrvn> The stack should be 8 byte aligned but the C stack needs 16 byte doe SSE stuff.
<mrvn> s/doe/for/
<mrvn> ddevault: does the x86_64 cpu really automatically align to 16 byte?
<ddevault> yeah
<ddevault> AMD architecture guide volume 2, page 274
<ddevault> section 8.9.3
<mrvn> Nice. On ARM you have to do that manually if you make the kernel/irqs reentrant.
<mrvn> If you forget then double register load/store may fail.
<zid> That's useful to know first hand
<zid> that you technically need to oversize interrupt frames by 8 in case it realigned
<zid> (easier than making sure that struct is 16 aligned at that member, anyway)
k8yun has joined #osdev
k8yun has quit [Remote host closed the connection]
k8yun has joined #osdev
k8yun has quit [Remote host closed the connection]
k8yun has joined #osdev
<mrvn> zid: alignas(16) is pretty simple.
heat__ has joined #osdev
heat__ is now known as heat
SGautam has joined #osdev
<ddevault> ACPI NVS regions, should the OS just never touch them and let the hardware use it as it likes, or will the OS ever have to read/write it for something
<heat> you don't touch them
<heat> you just need to make sure you don't :)
<heat> (some of it also isn't "non-volatile storage" but don't tell anyone about that)
frkzoid has joined #osdev
<heat> wait a sec, is there an OpRegion for this? I don't thin kso
ptrc has quit [Remote host closed the connection]
ptrc has joined #osdev
pretty_dumm_guy has joined #osdev
k8yun has quit [Read error: Connection reset by peer]
<heat> ddevault, actually you may need to touch it
<heat> I forgot that some ACPI tables are required to point into NVS
<heat> an easy example is the new wakeup thing in the MADT
<ddevault> thanks heat, will keep that in mind
<heat> np
_oOo_ is now known as corecode
FreeFull has quit [Ping timeout: 265 seconds]
FreeFull has joined #osdev
ay is now known as Andrew
FreeFull has quit [Ping timeout: 268 seconds]
saltd has quit [Remote host closed the connection]
xenos1984 has quit [Ping timeout: 260 seconds]
xenos1984 has joined #osdev
<geist> mrvn: i should point out that arm64 tightens that even more
<geist> You must have the stack 16 byte aligned *always*
<heat> isn't that something you explicitly enable?
<geist> As in the instant you add or load it with something that isn’t 16 byte aligned it throws an exception
<geist> It is, but virtually all systems set it, and i think it will become mandatory at some point
<geist> They only added the chicken bit for existing legacy code
<geist> And because of arm32 compatibility
saltd has joined #osdev
<geist> But it also solves the ‘align the stack on exception entry’ problem, since it maintains the invariant that the stack is always aligned, and thus by definition on exception entry it is aligned
<geist> If you unset the bit you’d probably be on the hook to align it
vdamewood has quit [Quit: Life beckons]
<heat> geist, o' geist of the depths
saltd has quit [Remote host closed the connection]
<heat> i need your wisedom
<heat> how guilty should I feel for my new allocator consuming a bunch more memory than it did?
<heat> a part of me thinks that it's not a problem because I can just reclaim everything and hopefully things go back to normal
<heat> but it definitely feels less flexible
<heat> right?
<heat> not that I'm targetting those small embedded systems but I can definitely see how all of this percpu crazyness can lead to less efficient memory usage
<heat> I see why one would not do this for e.g lk
<heat> otoh, what is memory for if it's not being actively used
xenos1984 has quit [Ping timeout: 250 seconds]
<geist> Yah and in fact gotta do more percpu stuff in lk
<geist> I figure if you're doing percpu then you're doing smp and that's almost never a memory constrained situation
<mjg> you should feel guilty for using c++, heat
<heat> right, but otoh
<heat> my system is using up 70MB of pages at /bin/dash time
<heat> after a relatively simple boot
<heat> it used to use ~20MB
<mjg> do you have accounting for it?
<mjg> what is what
<geist> Seems a bit excessive yes
<heat> mjg: it's all caches
<heat> and I'm using a relatively smaller percpu cache than what linux was using *in 2000*
<mjg> but do you have exact numbers
<mjg> or are just handwaving
<geist> Seems a bit much to prefill then too much
<mjg> you do realize you can do memory usage flamegraphs? :)
<geist> Sure but linux in 2000 generally didn't deal with as many cpus as we do now
<geist> Maybe that was too much back then too
<mjg> look man for all i know you just brainfarted somewhere and are allocating more than you think
<mjg> absent exact numbers one can only speculate
<mjg> you are worried about a factor -> make sure your system provides visibility into it
<heat> let me reimplement purge
<heat> i have good indication that most of it really is just stuck on magazines
<heat> I'm keeping at most 128 of each object < PAGE_SIZE
<heat> my batch size is 64
<geist> Probably a bit much yeah
<geist> If you have 20 slabs or so that'll add up quick
<mjg> whoa ye
<heat> either this is a really deficient design and linux was wrong or they do their page reclaiming a lot more aggressively
<heat> which makes sense
<geist> Perhaps having a per object tunable so things that think they'll need it can request larger caches at creation
<mjg> so normally you want this to autotune itself
<mjg> unless you know for a fact certain limit is best for given obj type
<geist> Also linux in 2000 was kinda a toy
<mjg> OH!
<geist> A 2 core cpu was still fairly exotic etx
<mjg> well ye it was basically crap, but good enough for all major players to decide it is worth investing in
roan has quit [Remote host closed the connection]
<geist> Sure was the start of the rise of Linux
<geist> I just remember at arihnd 2000 if you wanted a serious system you probably ran bsd or one of the big unices
<mjg> right
<geist> By mid to late 2000 linux was starting to take over
<mjg> from what i'm told even then there were plans(tm) to replace them with linux
<mjg> at yahoo etc
<geist> Yah
<geist> I'm not entirely sure what the issue was with bsd at the time. Maybe folks were still leery because of the att lawsuit
<geist> I at the time had assumed it would be where all the money would go
<geist> But maybe linux was more free for development wise so it got more energy
<geist> And after a while it was inevitable
xenos1984 has joined #osdev
<mjg> i only found highly contradictory claims
<geist> Yah
<geist> Unclear where the truth lies there
<mjg> most notably ones claiming the lawsuit was irrelevant
saltd has joined #osdev
<mjg> as much as i'm happy to shit on the old unix systems, linux was always a hackjob
<geist> Possible it was simply the bad community being kinda fractured and more... Stodgy maybe
<geist> Bsd not bad
<mjg> ye i'm not gonna rant about it today
<mjg> but it was very much bad :)
<geist> Nod. Anyway gottw go. At airport waiting for plane
<mjg> funny bit re that
<mjg> i was watching youtube videos where profesionals from given industry describe how it differs from portrayal in movies
<mjg> i got to a video of a flight attendant
<mjg> a clip from a movie was played where people were singing on the plane, including flight attendants
<mjg> the FA commenting said this totally would not happen
<mjg> ... but i was on a flight where something of the sort did happen. it was a very small plane, mostly empty at that
<mjg> some dudez were very chatty and started flirting with one of the two flight attendants
<mjg> and the she sang!
<mjg> then*
<heat> weird
<mjg> i did not mind
<zid> And then the americans all clapped
<mjg> i don't know if any americans were there
<heat> murica
<zid> well if nobody clapped, there weren't any
<heat> lets play football and baseball
<heat> and have weird chants
<ddevault> every so often I read through the Intel HD graphics manuals until my eyes bleed
<zid> Nice
<heat> bad idea
<mjg> oh no
<ddevault> it does not typically take long
<zid> I've never owned intel HD graphics or I might have too
<mjg> want to get to a point where you don't need the driver
<mjg> causey ou can't see anyway?
<ddevault> brilliant
<heat> outstanding
<zid> if I had a testbench with gma I probably would have given it a go
<mjg> brilliant.org
<heat> get any cheap cpu+mobo made in the last idk, 10 years?
<zid> and psu and ram and monitor and keyboard and mouse
<zid> and make room on a desk
<ddevault> my goal is to bring up my laptop's VGA port and stick a framebuffer on it
<zid> and storage, and network cable
<heat> for a testbench? you don't need most of that
<ddevault> I'm still a ways out from having enough of the prerequisites in place, though
<heat> >VGA port
<heat> LMAO
<zid> I mean, you can ignore the mouse
<zid> I want a busted up laptop with vga and hdmi
<zid> so I can use it as an arcade machine
<zid> write some bios tetris for it
<mjg> that's some kink you got there
<zid> I think I could probably fit tgm3 into bios, and then provide the audio via storage
<zid> hot swappable bgm
<zid> oh duh, the obvious solution to audio is to burn it to a cd-rom ofc
<zid> and use the dedicated cd-audio cable to bypass setting up the soundcard
<heat> mjg, lmao, linux's solution is "reap all the caches 2 times a second"
<mjg> heat: 19:45 < mjg> as much as i'm happy to shit on the old unix systems, linux was always a hackjob
<heat> I actually
<heat> I bug have
<heat> I bug fix
<heat> ooga booga heat dumb
<heat> I was accidentally ignoring the NOPCPU flag on kfree which essentially made large (> PAGE_SIZE) objects hostage
<heat> now im back to 21MB
<heat> which is Decent(tm)
<mjg> 19:35 < mjg> look man for all i know you just brainfarted somewhere and are allocating more than you think
<mjg> 19:35 < mjg> absent exact numbers one can only speculate
<mjg> 19:35 < mjg> you are worried about a factor -> make sure your system provides visibility into it
<mjg> some hard earned wisdom right there motherf^Wman
<heat> so im basically doing what's supposed to happen for a normal slab allocator, except I don't do weird caching things which don't seem to be worth it
<heat> I have percpu caches, sized up to 128, or 64 if size > 256, 32 if size > 1024
<heat> I allocate in batches of pcpu_size / 2
<mjg> so what'st he perf now
<heat> 2.3M
<mjg> that's from 1.7-ish?
<mjg> you should keep a sheet somewhere
<heat> originally 1.6, then 2.0M, then 1.9M, now 2.3M
<heat> anyway, the allocator is no longer a bottleneck
<mjg> right on
<mjg> bonwick wants his royalties tho
<heat> a funny thing is that I don't cache >=PAGE_SIZE'd objects in pcpu caches (because that's just a poor idea)
<heat> and for really really large objects (right now I'm cutting the threshold on 128KiB) I just free any slab as soon as I can
<heat> because those slabs are HUGE
<heat> each slab is PAGE_SIZE sized except when objsize > PGSZ/8, where I just size it up to PAGE_ALIGN(24 * objsize)
<heat> I noticed I was doing rare, very large allocations sometimes which basically held a bunch of objects hostage in free slabs
<mjg> i wrote a special cased allocator for relaly big stuff
<mjg> have not pushed it yet though
<heat> yeah
<heat> I usually just vmalloc for those
<mjg> simple fucker with a list, alloc/free in fifo policy
<heat> which is essentially a wavl tree lookup + memory pool alloc (which is stupid simple but has a lock) + page allocation
<mjg> per numa domain
<heat> >numa domain
<heat> LMAO
<heat> not going down that rabbithole
<mjg> :)
<mjg> i'm saying you can whip out the special case allocator within minutes
<mjg> no magazine or whatever tf
<mjg> and portected with a lock
<heat> I also realized linux separates slab lists per node
<mjg> you have to do it to to prevent degradation in perf
<mjg> things go way down if you get memory from non-local node
<heat> sometimes when worse comes to worst they snipe other nodes' memory but... yeah
<geist> everyone nodes that!
<heat> Welcome to Node.js v18.10.0.
<heat> Type ".help" for more information.
<heat> >
saltd has quit [Remote host closed the connection]
saltd has joined #osdev
<qookie> console.log(require('fs').readFileSync('/etc/shadow/))
<heat> console.log(require('fs').readFileSync('/etc/shadow/))
<heat> Uncaught SyntaxError: Invalid or unexpected token
<heat> ^^^^^^^^^^^^^^^
<qookie> oops dang
<sham1> Reading /etc/shadow would probably not do you much good anyway since the passwords are hashed
<heat> and /etc/shadow/ isn't a thing
<heat> and node isn't root
<geist> what does readFileSync do? the sync part in particular?
<geist> i guess that's versus some sort of async model?
<heat> probably
<heat> 80% of js is async
<geist> seems a bit extraneous to call it out, but i guess whatever that api is wants to be clear
<heat> I guess this saves you the await
<geist> oh is that js? aaah makes sense
<geist> i was thinking C# or something
<heat> yeah node.js
<mjg> sham1: see jackthreripper
<geist> i have thus far managed to write i think zero lines of javascript
<mjg> +1
<mjg> no js club unite
<mjg> node js club please gtfo
<qookie> heat: yeah i missed the ' and pressed the / that's below it :^)
<geist> oh hmm now that i think about it i futzed with it maybe one night, in a moment of weakness. just wanted to see how easy it was to blat stuff on a Canvas
<mjg> you are unpure now, geist
<sham1> And yeah, `readFileSync` blocks while reading
<geist> we all have our weaknesses, it's good to admit it and live with your limitations
<heat> i've written javascript before
<heat> I felt clueless
<sham1> I have to write it at work
<heat> then I had to mess with
<geist> that's my general problem with languages where it's less the language and more of whatever framework du jour it is
<geist> i dont like dealing with layers of frameworks. feels much less fruitful than deeply grokking some language fundamentally
<heat> tbf javascript is more standardized than ever
<geist> oh sure, but AFAICT no one really writes Pure Javascript right?
<geist> ie you pretty quickly pull in some large thing that you implement against
<heat> you can use the standard APIs yeah
<zid> qookie: zid:$6$Eh9pat84aY7mCuSD$R.JhoGulA08or/fwV9LiHMcp5VrvEa9WH9CCFd2291VlR8E0QuHVbXePMvfiBAdcR0h3KjrM2I0Glm.ljR8Zq0:19265:0:99999:7:::
<geist> sure you can, but is that actually a thing that people do?
<sham1> I have to mostly write pure JS
<sham1> Maybe with some jQuery, but yeah
<geist> hmm okay guess shows how much i know
<heat> cloudflare's serverless web workers stuff is full of fully standardized APIs and AFAICT it's pretty hard to bring in $framework
<zid> I actually had to learn how libpasswordqc's config files worked for that..
<heat> oh yeah
<mats1> there's a lot of gpu compute hitting the market with ethereum mining going away
<bslsk05> ​cloudflare/workerd - The JavaScript / Wasm runtime that powers Cloudflare Workers (77 forks/3475 stargazers/Apache-2.0)
<mats1> cracking hashes is cheap again
<geist> yay burning fossil fuels for ... something
<bslsk05> ​vanilla-js.com: Vanilla JS
<mats1> depends where you live
<geist> i say this as i get ready to board a plane for pleasure. CO2 wants to be free!
<mats1> mining is a lot cheaper with renewables
<heat> geist, lmao, I love it
<heat> oops
<heat> GeDaMo,
<GeDaMo> :D
<heat> ... fighting muscle memory is herd
<mjg> blame it on irssi
<heat> i don't use irssi
<Arsen> do it anyway!
<mjg> you don't type nicks, do you?
<heat> mjg: how do I easily look at a slab's pcpu caches without adding atomics or locks?
<heat> I thought of just IPI'ing but they still get IRQs in nopreempt zones
<heat> i assume adding a lock there is something you would consider Pessimal(tm)
<mjg> look from where
<mjg> at another cpu's caches?
<heat> yeah
<mjg> in general you should not do it to begin with
<heat> I know
<heat> I'm talking about purge()
<mjg> why dyou even want one
<mjg> you got unloadable kernel modules?
<heat> to slim down on slabs if I need to
<heat> yes
<mjg> don't lie to me
<heat> i do
<mjg> i noted i would do it with IPIs
<mjg> the ipi handler would check if it is in a spot where it can do what you need
<mjg> if not, gives you an error and you spin a little and try again
<heat> AH WAIT YES
<heat> I can just have a CPU local counter
<heat> pretty cheap
<heat> pcpu->accessing++; if (pcpu->accessing >= 0) return;
<heat> makes sense
<heat> what do kernel modules have to do with this?
dude12312414 has joined #osdev
<mjg> kernel modules may want to create their own slabs
<mjg> if you unload, you whack them
<mjg> but you may have per-cpu cachen from there
<mjg> so
<mjg> that needs to go away somehow
<heat> I haven't used kernel modules in a long time
<mjg> here is my proposal with more details
<heat> I think they work but i dunno
<mjg> the fast path would be one small routine, preemption disabled around it
<heat> and unloading is something I've never supported
<mjg> past that the only accesses to even per-cpu magazines are with the slab lock
<mjg> then the ipi handler checks if the fast path is interrupted. if so, buggers off. if not, whacks the magazines
<mjg> replaces with empty ones
<mjg> that wya you get no pessimization for the common case
<mjg> and you still can take the cached stuff if needed
<mjg> i think this is a very low priority though
dude12312414 has quit [Remote host closed the connection]
<heat> you're a very low priority
<mjg> i'm -20
<heat> the lowest niceness ever
<mjg> ye i'm not very nice, am i
<heat> exactly
<heat> still the nicest BSD person ever
<mjg> that is close to correct
<mjg> people will pretend to be nice and whatnot, all until you pose legit criticism of their code
<mjg> then real personalities come up
puck has quit [Excess Flood]
<mjg> and let me tell ya, denial is stronk
puck has joined #osdev
frkzoid has quit [Ping timeout: 264 seconds]
<heat> well tbf that's understandable
<heat> who hasn't got upset over that?
<zid> mjg: My code is flawless, it's the methodology that is rudamentary
<zid> rudimentary, like my spelling
<mjg> heat: i did not
<mjg> in fact i can point you at code i wrote which i later determined to be crap
<heat> sure
<mjg> which is also fixed by now
<heat> but have you never felt attacked when someone was criticizing your shit?
<mjg> i did felt attacked, but all the cricisim was wrong, so there is that
<mjg> dude asserted "no way", could have trivially tested im right but did not, instead wrote a long e-mail with lolo tests which were not representative of what the code is doing
<mjg> so i walked him through testing on his own and he conceeded
<mjg> to give you one example
<mjg> perhaps the crux is to not implement your shit idea before validating it
<mats1> you're not my real dad
<mjg> i had shit ideas which i scrapped on my own, i also had people point out they would not work before i really put effort into them
<mjg> so i'm playing easy mode here so to speak
<mjg> now there is code which i consider pretty decent, if that turned out to be total crap i would defo be a sad panda
<mjg> but i don't think i would lie about it
<mjg> as in claim it is good should evidence to he contrary be presented
<heat> I don't think anyone writes code going "hehehe this is so shit and they'll love every second of it"
<heat> so everyone feels either attacked or sad panda
saltd has quit [Read error: Connection reset by peer]
frkazoid333 has joined #osdev
saltd has joined #osdev
<mjg> heat: bro
<heat> brother
<mjg> heat: people wriet code like "well fuck it just get this over with"
epony has quit [Quit: QUIT]
pretty_dumm_guy has quit [Quit: WeeChat 3.5]
saltd has quit [K-Lined]
jafarlihi has joined #osdev
<jafarlihi> Hello
<jafarlihi> I made this: https://github.com/jafarlihi/cppq
<bslsk05> ​jafarlihi/cppq - Simple, reliable & efficient distributed task queue for C++17. Backed by Redis. (0 forks/38 stargazers/MIT)
k8yun has joined #osdev
<heat> bonk
aleamb has quit [Ping timeout: 252 seconds]
axis9 has joined #osdev
jafarlihi has quit [Quit: WeeChat 3.6]
GeDaMo has quit [Quit: Physics -> Chemistry -> Biology -> Intelligence -> ???]
nexalam has joined #osdev
nexalam has quit [Read error: Connection reset by peer]
nexalam has joined #osdev
epony has joined #osdev
heat has quit [Remote host closed the connection]
netbsduser has quit [Quit: Leaving]
k8yun_ has joined #osdev
k8yun has quit [Ping timeout: 246 seconds]
<mjg> on a programming-adjacent note, i do find it really pathethic how people even in their 40s and later just refuse to admit they messed up
<mjg> and instead keep making statements which trying to dismiss or downplay criticism
<mjg> when the issue at hand can be trivially fixed, which they of course refuse
opal has quit [Quit: i'm never coming back]
<mjg> it's a well known lesson that people will defend their egos with their life, but fucking hell, i did not expect it to carry past teenagehood
<mjg> to ilustrate, a guy modified a multithreading-friendly library in a way which added a race
<mjg> it was pointed out
<mjg> he kept making statements how there is only a few nanoseconds window, so not a problem
<mjg> he also brought up he has been programming for over 20 years
<mjg> fucking hilarious
<bslsk05> ​paste.sr.ht: draft.md — paste.sr.ht
<zid> proper unix style is 11 passwd;
<zid> passd*
<mjg> :)
<mjg> you you definitely want to miss some 'e's
<ddevault> rest assured that notifications are mostly referred to as notes
<ddevault> and endpoints as ep
<mjg> that's still a little verbose
<mjg> also you may want to add a shitty letter
<ddevault> n, e
<mjg> which is misleading
<ddevault> nopte
<mjg> +1
<mjg> i just rememberd a unix tool named after someone's dog
<mjg> this fucking system
nexalam has quit [Read error: Connection reset by peer]
nexalam has joined #osdev
roan has joined #osdev
roan has left #osdev [#osdev]
axis9 has quit [Read error: Connection reset by peer]
nyah has quit [Quit: leaving]
nyah has joined #osdev
<mrvn> mjg: it only gets worse with time, not better.
<mrvn> or it's the second level of the effect where people that know a little think they know it all
<mrvn> Want to know what's frustrating? I once made a PR for zeromq to add a data structure with the expressed purposed to have constant time insert and cancel. The author first accepted the PR and then changed the data structure. Guess what he changed: insertion and cancel now run in O(log n).
<mjg> lol
<mjg> how is lookup?
[itchyjunk] has quit [Ping timeout: 252 seconds]
frkazoid333 has quit [Ping timeout: 268 seconds]
<mrvn> O(1) if you have a handle. no search or O(n).
<mrvn> O(1) min and amortized O(log n) tick
<mrvn> if you haven't figured it out it was a priority queue with delayed work, specialized of timers getting canceled frequently.
<mjg> have you shipped it wit ha bench?
<mrvn> no
<mjg> well that would be one mistake then
[itchyjunk] has joined #osdev
<mrvn> Why would I ship it with https://www.google.com/search?q=ha+bench ?
<mjg> maybe they would not change struct if they got the ha bench
<mrvn> If he didn't liḱe the code he shouldn't have accepted the PR in the first place.
<mjg> you are ranting at the wrong tree
<mrvn> apropo tree. I want to plant trees in factorio. Anyone know a good mod for it?
<mrvn> .oO(he says and goes completely off-topic)
<froggey> I think there's a mod that lets you load trees (or tree seeds?) into artillery cannons
immibis_ has joined #osdev
DanDan has quit [Ping timeout: 246 seconds]
<mrvn> and it shoots and where the seed lands a tree appears?
SGautam has quit [Quit: Connection closed for inactivity]
sprock has quit [Ping timeout: 265 seconds]
SpikeHeron has quit [Quit: WeeChat 3.6]
heat has joined #osdev
<heat> wazap
<heat> im bacc
<heat> mjg, hello mjg
<heat> what does freebsd use for page allocation?
<heat> kthx
sprock has joined #osdev
<heat> I'm not entirely convinced @ buddy allocation due to the pathological "I just want 4KB so I'll need to break down 4MB into teeny tiny pieces"
<heat> but I'm also not convinced at stupid dumb "linked list of pages"
<heat> particularly because it's hell getting contiguous stuff which doesn't allow for large pages and allocation directly on top of the direct map
DanDan has joined #osdev
<mjg> not ranting about it today
epony has quit [Ping timeout: 252 seconds]
nexalam_ has joined #osdev
<heat> i dont need a rant
<mjg> there is really nasty code for "super page reservartions"
<heat> I just need an algo
<heat> aw
<heat> so the answer is "yes"?
<mjg> yes to what
<mjg> i don't know the whole algo, there are is a bunch of freelists
<mjg> and "superpage reservartion array"
nexalam has quit [Ping timeout: 250 seconds]
<mjg> when handing out pages for given vm objs, if there is a reservarton, it tries to stick to it
<mjg> otherwise you get something else
<heat> yeah that sounds like garbage
<mjg> look man. there is 0 defrag support for any of it anyway
<mjg> and over time the kernel loses ability to hand out large pages
<mjg> even if you pretend this bit does not exist, handling of reservartions is so slow
<mjg> the code was written with a single core mindset
<mjg> and clearly only to publish a paper
<mjg> you boot, get some large pages and life is great
<mjg> who gives a fuck past that
<heat> amen
<heat> anyway my main gripe with all of this is that linux is the only OS out there (plus Fuchsia I guess) whose page allocation is a relatively standard and straightforward algo
<mjg> i have no idea what others are *really* doing
<heat> freebsd's algorithm seems to be "yes"
<heat> I imagine netbsd and openbsd are either the same or more cursed
<mjg> and i can't claim real expertise on this bit of fbsd either
<heat> windows nt's page allocator is "who tf knows"
<mjg> dude, that's not even fair to mention
<mjg> you can shit on frebsd all you want, it does ultimately work with terabytes of ram if needed
<mjg> which is not something i can say about certain other systems
<mjg> (personally tested 4TB fwiw)
<heat> freebsd has a lot more manpower than the other ones I assume
<heat> also has other goals
<mjg> it has more manpower
<mjg> but also contrary to the other systems, it is used in production
<heat> fwiw linux beats your ass anyway :D
<mjg> not in every way
<mjg> i got aspects of vfs faster, but it's only because in linux they decided to make it slow
<mjg> not because i did anything genius
<heat> sure
<heat> but it's in almost every way superior, sorry
<heat> how many million IOPS can they do now? it's kinda crazy
<heat> you don't have that kind of investment anywhere else
<bslsk05> ​twitter: <axboe> 122M IOPS in 2U, with > 80% of the system idle. Easy. #io_uring #linux https://pbs.twimg.com/media/FZFThXDXEAAfY6w.png
<heat> see, this is fucking silly
nexalam_ has quit [Quit: Leaving]
<mjg> dude where am i claiming there is any legit reason to pick fbsd
<mjg> there has not been for years now
<heat> and to be clear, I'm not dissing any system. it's admirable how much you guys can do with so "little"
<mjg> why not dissing?
<heat> you can totally pick fbsd from a philosophical POV
<mjg> hard facts are most systems out the SUCK, even if you ignore existene of linux
<mjg> out there*
<heat> and I guess if fbsd is better for $workload
<mjg> it's ok in several workloads if you really want to use it
<heat> at least netflix seems to like it
<heat> I don't know why exactly
<mjg> lemme let in on a secret
<heat> didn't facebook also use it?
<mjg> no
<heat> ok what's the secret father
<mjg> whoever picked linux, or any other open system back in the day, most ly did not without any technical reason
<mjg> they had their fucking bias and rolled with it
<heat> yes
<heat> that's plenty clear
<mjg> any time you do a serious deployment of anything you run into drastic bugs
<mjg> which you have to iron out
<mjg> so to give you netflix, the person who was put in charge of getting the straming to work liked freebsd
<mjg> so they hired a bunch of people to beat it out to work there
<mjg> there is literally 0 tech reason for that pick
<mjg> similarly, whatever other company which picked linux 20 years, most likely did not have any tech reason either
<mjg> *today* you need a reason to not pick linux, so there is that
<heat> but how much sense does that make given linux was already probably faster
<heat> are they deploying custom tech in the kernel and don't want to GPL it out?
<mjg> 20 years ago? i doubtit was :>
<heat> right now I mean
SpikeHeron has joined #osdev
<heat> unless they've been using freebsd for a long time, I don't know
<mjg> oh i know for a fact linux does not perform for shit in the streaming workload netflix has
<mjg> it is highly specialized and you keep running bottlenecks not seen otherwise
<mjg> however, should they have picked linux instead, it would take less banging with a hammer to get the platform to the levle they needed
<mjg> whatsapp used to use freebsd and it was working fine there, then they got bought by facebook and over time migrated to their platform
<heat> yea
<mjg> if Zuck really wanted, he could have started with freebsd and be in the same spot
<mjg> rest asurred any big it corp patches the shit out of linux to keep it operational
<heat> not true
<mjg> which part
<heat> last sentence
<mjg> which one does not
<heat> Cloudflare
<mjg> what kernel is it running?
<heat> linux?
<mjg> version
<heat> they track -lts iirc
<mjg> in principle it may happen it is perfectly stable and there are no stupid perf losses
<mjg> but i don't believe this is taking place
<mjg> every shop i worked at had to patch linux due to trouble
<mjg> then i got to red hat, where guess what, i was patching the fucking crapper because of constant stream of trouble
<heat> isn't the fedora kernel super patched?
<mjg> *fedora* i don't know
<mjg> rhel is turbo patched
<mjg> now i'm at a freebsd shop where, you wont believe it, i patch trouble (but mostly do perf work)
<mjg> in fact i can't recall one single openosurce project which did not require patching to work
<mjg> php, apache, mysql, postgres, haproxy, postfix, dovecot
<heat> that's... worrying
<mjg> you fucking name it, it would crash, give bad results or whatever
<heat> let me guess
<heat> poorly tested codepaths?
<mjg> not exactly
<mjg> but close
<heat> genunix bad?
<mjg> greatest fuzzer out there is your clientelle
<mjg> some of the php websites were so fucking retarded you could not hope for a better fuzzer
<mjg> every single php update i would get a bunch of customers getting core dumps
<mjg> and the company had only ~100k sites
<heat> sure but
<heat> why would you not hit this on linux?
<mjg> this was on linux
<heat> hrm
<mjg> where did i claim othewrise
<heat> poopy
<heat> I thought you were mentioning opensauce projects and freebsd
<mjg> no, the list above is from my webhosting days
<mjg> one funny bit
<mjg> at my first job apache had certain patches because a certain module did not work otherwise
<mjg> nobody upstreadmed them
<mjg> at my 3rd job they decided to use said module and i had to re-create the patches to make it work
<mjg> not upstreamed either
<mjg> i strongly suspect this is custom-fixed in a number of companies, not one of which upstramed it
<mjg> :)
<heat> that actually brings me to an interesting question
<mjg> there was a number of php patches as well, because guess what, php quickly stopped work with a number of popular sites
DanDan has quit [Ping timeout: 252 seconds]
<heat> what's the legality of looking at some code with license A and then some time later rewriting or applying some of those principles on project B with license B
<mjg> i don't know what you mean by "principles"
<heat> i.e writing vfs code in linux, then years later working on freebsd's vfs
<heat> how clouded can your mind be by GPLv2 in this instance
frkzoid has joined #osdev
<mjg> literally imlpementing the same idea *which you spotted in other code* is not legal if the license prohibits it
<mjg> implementing something which happens to line up with gpl code is easily happenstance, or even expected
<mjg> like pagezero/clear_page using just rep stos
<heat> so you pretend you've never seen it?
<mjg> i have seen some of it and if anything it gave me a strong opinion how to NOT do stuff
<heat> yeah sure
<heat> that's not the point
<mjg> it's a legit question, many companies would consinder you tainted
<mjg> for example windows 2000 sources leaked years back
<mjg> and if you had seen them, reactos requests you refrain from contributing
<heat> yeah
<mjg> realistically though, i can tell you people move between possibly competing products
<mjg> and i guarantee there is some level of (un)intentional infiremented
<mjg> most notably on patents
<heat> infirewhat
<mjg> infringement
<heat> ah
<heat> yeah I mean
<mjg> realistically i don't htink you can work on more than 1 project and be considered pure
<mjg> :>
<heat> it's like you get the fucking avengers of kernel development and get them to work on the kernel
<heat> they will have looked at stuff before
<mjg> see above
<heat> yea
<mjg> everyone with serious experience is tainted
<heat> i guess it's one of those legal grey areas
<mjg> i know for a fact there is a certain lib which is very permisseivly licensed
<mjg> which implements a recently patented algo
<mjg> as in authors published a paper, that got an implementation by someone else, and they got a patent
<mjg> the authors*
<mjg> i did not message anyone about what it is cause you will get in shit for being told
<heat> that seems wrong?
<mjg> i'm saying this is not an isolated example
<mjg> and i guarantee any non-trivial codebase infringes on *some* patents
<heat> if you implement something pre-patent you shouldn't be able to retroactively be patent-fucked
<mjg> this is why big corps also patent, so should anyone sue them, they can sue back
<mjg> heat: not for implementing prior, but you can't use it after you became aware of the patent
<heat> is this AT&T vs UC again? :v
<mjg> in fact in most big corps if you get a message telling you about a patent
<mjg> you need to forward it to the legal dept
<mjg> infringing on a patent is one thing, doing it while knowing is another
<mjg> should the lawsuit come
<mjg> all this software patent business is total crapi mo, but what can you do
<heat> i think they're not valid in some countries?
<mjg> not valid in the eu
<mjg> does noth elp when you are working on a global proejct
<heat> Fedora's rpmfusion has a bunch of -freeworld packages with patent stuff enabled
<heat> I know mesa has been in somewhat deepish shit for video acceleration on patented formats like MPEG4
<mjg> i don't know about that bit
<heat> and now fedora/ubuntu are disabling those codecs
<bslsk05> ​www.phoronix.com: Fedora Linux Disabling Mesa's H.264 / H.265 / VC1 VA-API Support Over Legal Concerns - Phoronix
<clever> heat: are the patents for any decoding, or just hw accelerated decoding?
<heat> I don't know
<bslsk05> ​jina-liu.medium.com: Settle your questions about H.264 license cost once and for all (hopefully) | by Jina Jiayang Liu | Medium
<heat> this is kinda particularly problematic because youtube uses h264 :)
<mjg> patent lawsuits are like nukes man
<mjg> see oracle vs google re java
<clever> heat: its also weird, that the rpi can do h264/h265 without any licensing fees, but mpeg2 and vc1 do need a fee
* heat laughs in EU
<heat> i guess I could legally implement RCU lmao
<clever> RCU? read copy update?
<heat> yes
<mjg> actually you legally can
<mjg> a number of patents has lapsed
<clever> i would assume there are no patents on RCU, lol
<mjg> i don't know what remains patented, i'm guessing it's stuff related to scaling it past a handful of cpus
<heat> it's still a minefield of patents
xenos1984 has quit [Read error: Connection reset by peer]
<heat> if you read up on current RCU theory you'll probably violate a bunch of em
<heat> clever, it's patented to shit by IBM
<heat> I think they explicitly license it away to GPLv2 code? something like that
<mjg> i know of certian US corps whose lawyers cleared local engineers to implement it
<mjg> but ye, good luck sticking only to the patents
<mjg> and not accidentaly improving on them in a way which infringers
<heat> Define _LGPL_SOURCE (only) if your code is LGPL or GPL compatible before including the urcu.h or urcu-qsbr.h header. If your application is distributed under another license, function calls will be generated instead of inlines, so your application can link with the library.
<heat> lmao
<heat> for liburcu
DanDan has joined #osdev
Gooberpatrol66 has joined #osdev
<clever> heat: ive already read about RCU in some linux book, it seems so simple that it shouldnt be coverable under a patent?
<heat> it's *not simple*
<mjg> lol what
<mjg> i would describe the simplest patent i know
<heat> the base idea? sure, but even that can be lawyered into a patent
<mjg> but i don't anyone in shit for coming up with the idea
<mjg> :]
<Griwes> Nothing should be coverable under a patent
<mjg> rest assured it is osmething you come up with within minutes
<clever> copy a the master pointer, and then from the data its pointing to, copy&mutate the structure
<Griwes> But I believe we've had this exact conversation for this exact reason before
<mjg> in fact if you dom ulticore stuff you probalby already did
<clever> then use an atomic swap to change the master pointer to the new object, and put the old object on a queue
<heat> clever, ok
<heat> how do you make that *not slow*
<clever> once every core has rescheduled at least once, free the old copy
<heat> where you do free shit, when do you do that, and how
<heat> there's a lot of nuance to rcu
<clever> heat: thats why `iptables -A` gets slower over time and iptables-save is faster
<clever> and iptables-restore