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
jjuran has quit [*.net *.split]
divine has quit [*.net *.split]
MrBonkers has quit [*.net *.split]
terrorjack has quit [*.net *.split]
pg12 has quit [*.net *.split]
sham1 has quit [*.net *.split]
weinholt` has quit [*.net *.split]
bslsk05 has quit [*.net *.split]
alexander has quit [*.net *.split]
riverdc has quit [*.net *.split]
[Reinhilde] has quit [*.net *.split]
justache has quit [*.net *.split]
FireFly has quit [*.net *.split]
travisg has quit [*.net *.split]
andreas303 has quit [*.net *.split]
torresjrjr has quit [*.net *.split]
gaze___ has quit [*.net *.split]
torresjrjr has joined #osdev
justache has joined #osdev
justache has quit [Max SendQ exceeded]
andreas303 has joined #osdev
pg12 has joined #osdev
riverdc has joined #osdev
alexander has joined #osdev
pounce has quit [Ping timeout: 245 seconds]
jjuran has joined #osdev
MrBonkers has joined #osdev
sham1 has joined #osdev
pounce has joined #osdev
weinholt has joined #osdev
heat has quit [Quit: Client closed]
divine has joined #osdev
justache has joined #osdev
heat has joined #osdev
Reinhilde has joined #osdev
<geist> weird, i went away from the house a few minutes and i had a massive network failure at home
<geist> thinking, okay, the ISP went down when i got back my main server and firewall/etc was just powered off
<geist> more specifically the UPS it was plugged into just powered off
frkzoid has quit [Ping timeout: 260 seconds]
frkazoid333 has joined #osdev
frkazoid333 has quit [Ping timeout: 245 seconds]
<clever> geist: after i upgraded my mobo/cpu a few months ago, i tried testing it with rustc, it pulled enough amps that the UPS just said "no", and turned itself off, lol
<heat> as it should
<clever> the old UPS would just sound the overload alarm, but stay on
<clever> it can likely pass more AC then it can generate
<clever> maybe the new one cut more corners
<geist> it's almost exactly what must have happened
<geist> or the UPS triggered some sort of something that caused it to shut down
FreeFull has quit []
<zid> What you've got there is a king of the fire spirits issue
<zid> you're going to need an elemental spirit user to fix it
CaCode has quit [Ping timeout: 246 seconds]
andydude has joined #osdev
MiningMarsh has quit [Ping timeout: 250 seconds]
foudfou_ has joined #osdev
foudfou has quit [Ping timeout: 240 seconds]
dutch has quit [Quit: WeeChat 4.0.2]
[itchyjunk] has quit [Remote host closed the connection]
dutch has joined #osdev
heat has quit [Ping timeout: 246 seconds]
vai has quit [Ping timeout: 244 seconds]
vai has joined #osdev
janemba has quit [Read error: Connection reset by peer]
janemba has joined #osdev
<zid> futurama is back, for some reason, apparently
<moon-child> again?
<moon-child> are they trying to simpsons it?
bgs has joined #osdev
<klange> The entire first episode of the new series is a meta commentary on how they're bringing back the series.
<klange> Also a massive callout to people like me who sat down and binged the entire existig series...
janemba has quit [Read error: Connection reset by peer]
janemba has joined #osdev
frkazoid333 has joined #osdev
janemba has quit [Read error: Connection reset by peer]
janemba has joined #osdev
bgs has quit [Remote host closed the connection]
gabi-250 has quit [Remote host closed the connection]
gabi-250 has joined #osdev
Yoofie has quit [Ping timeout: 260 seconds]
Yoofie has joined #osdev
goliath has joined #osdev
SGautam has joined #osdev
Burgundy has joined #osdev
GeDaMo has joined #osdev
foudfou_ has quit [Remote host closed the connection]
foudfou has joined #osdev
gareppa has joined #osdev
vai has quit [Ping timeout: 264 seconds]
Burgundy has quit [Ping timeout: 246 seconds]
[itchyjunk] has joined #osdev
slidercrank has joined #osdev
slidercrank has quit [Remote host closed the connection]
bleb has quit [Ping timeout: 244 seconds]
eroux has quit [Ping timeout: 246 seconds]
eroux has joined #osdev
bleb has joined #osdev
<zid> Hvar sefur þú? Gyllta borgin mín
<zid> Spegilmyndin, sýnir mér, varpar ljósi
<zid> this is icelandic right?
andydude has left #osdev [#osdev]
bslsk05 has joined #osdev
[itchyjunk] has quit [Read error: Connection reset by peer]
awita has joined #osdev
danilogondolfo has joined #osdev
\Test_User has quit [Ping timeout: 252 seconds]
\Test_User has joined #osdev
SGautam has quit [Quit: Connection closed for inactivity]
benlyn has joined #osdev
SGautam has joined #osdev
eck has quit [Ping timeout: 250 seconds]
eck has joined #osdev
nyah has joined #osdev
benlyn has quit [Read error: Connection reset by peer]
benlyn has joined #osdev
gog has joined #osdev
<gog> hi
pieguy128 has quit [Ping timeout: 245 seconds]
vai has joined #osdev
<awita> hi
* kazinsal pets gog
* gog prr
<gog> i'm gonna do a depessimization ASMR later
<gog> "anon it's time for your depessimization"+
pieguy128 has joined #osdev
<mjg> gog: do you have a navy suit for war
<gog> yes
<gog> for war
<antranigv> klange they always do that when they are coming back. I remember when I fell on the floor when they wrote FOX as BOX in season 5 :D
Vercas2 has joined #osdev
Vercas has quit [Ping timeout: 240 seconds]
Vercas2 is now known as Vercas
<bslsk05> ​'How NOT To Implement the POSIX Standard, Featuring Windows NT ...' by NCommander (00:14:39)
benlyn has quit [Remote host closed the connection]
benlyn has joined #osdev
<mcrod> hi
<ddevault> how do you guys like to implement fork(2)
<gog> don't
<gog> never fork
<ddevault> do you implement COW? do you pre-emptively copy certain mappings, like the stack? do you copy read-only pages, if so, eagerly or when remapped rw?
<ddevault> bah, appointment, will read the discussion later, if one ensues
Left_Turn has joined #osdev
<Mutabah> I used cow when implementing fork back in my previous project
<Mutabah> (current one doesn't have fork)
<sham1> CoW is the best way of doing fork, if one wants to stay sane
<sham1> Of course, it'd be better not to have fork, but that ship has sailed
<mcrod> gog: may I pet you
zxrom has quit [Quit: Leaving]
<gog> mcrod: yes
* gog preemptively prrr
<zid> Hvar sefur þú? Gyllta borgin mín
<zid> Spegilmyndin, sýnir mér, varpar ljósi
<zid> gog this is icelando right
ia64developer has joined #osdev
<sham1> Pre-emptive prr? Sounds like a concurrency issue
<GeDaMo> Should have constructed a promise(purr) to be resolved later
MiningMarsh has joined #osdev
<ia64developer> t
<ia64developer> Fabrice Bellard has announced that Qemu has now been renamed to "Q - The Everything Emulator"
<ia64developer> Clang will be "C" and GCC will be "G".
<ia64developer> Mintsuki has followed by renaming Limine by "L" and Kevin Lawton will rename Bochs to be "B".
<ia64developer> Risc-V will now be "R", "x86" will now be "8"
<nortti> iirc there was a graphical os x frontent of qemu called q back in the day
<nortti> did some x86 osdev on my ppc mac with that
<gog> zid: yes
<gog> where do you sleep, my gilded town
<zid> ah, it's about the golden city, so that makes sense
<gog> <something image>, <something about vision> <something about lights>
<gog> idk my icelandic is really bad
<zid> kek
<bslsk05> ​'Made in Abyss Season 2 OST: 15.Gravity ft. Arnór Dan (Lyrics)' by Dan (00:05:10)
<gog> my kid and i ran into one of her teachers and she started speaking icelandic at me and i was able to hold the first third of the conversation in it :P
<gog> then it fell apart
<zid> kid?
<zid> this is news to me
<GeDaMo> gog has a goat? :|
<zid> ikr?
<zid> weird how it's never coem up before
<zid> I wasn't aware iceland had non-primate mammals anywhere either
<zid> GeDaMo can you stop putting stuff through my letterbox btw
<bslsk05> ​preview.redd.it: Reddit - Dive into anything
<zid> Three made up animals, and a man in comedy socks
<zid> Actually maybe that's all one single animal
<zid> some kind of icelandic chimera
<sham1> GNU/Iceland
<kof123> > the four protectors (landvættir)
<kof123> i knew a kid growing up named landvatter ...mystery solved :D
<kof123> yes, 4 directions is likely a chimera :D
<kof123> graphical form of a ligature . æ
<kof123> so utf presumably supports chimeras
<gog> nya
<gog> þæðáéóíúö
[itchyjunk] has joined #osdev
<kof123> > the Kizakura sake brand, which prominently uses a kappa as its mascot that was another "chimera" possibly, depending on who you ask
Burgundy has joined #osdev
FireFly has joined #osdev
hmmmmm has joined #osdev
hmmmm has quit [Ping timeout: 264 seconds]
frkazoid333 has quit [Ping timeout: 260 seconds]
gxt has quit [Remote host closed the connection]
gxt has joined #osdev
goliath has quit [Quit: SIGSEGV]
freakazoid332 has joined #osdev
<gog> mew?
<sham1> wem
<mjg> when i was a kid we had a game
<mjg> well, not game, were just playin'
<mjg> we would record ourselves saying shit backwards
<mjg> and then play that backwards
<mjg> fun timez
gareppa has quit [Quit: WeeChat 3.8]
<bl4ckb0ne> where we're from, the bird sings a pretty song
<mjg> premature pessimization is the root of all evil
<mjg> innit
<mjg> finally found a programming youtube video which mostly makes sense
<mjg> immediatley balanced out by the comment section
<mjg> :s
<zid> where gog's from, they sing þæðáéóíúö
<zid> which is death metal
heat has joined #osdev
<heat> helloo
<zid> hi teeth
zxrom has joined #osdev
awita has quit [Ping timeout: 258 seconds]
<gog> hi
<gog> i'm an OK programmer
<zid> Did you do some OK programming today?
<gog> no
<gog> i did some excellent programming today
<sham1> Excellent!
<gog> and some subpar programming today
<zid> does that not make you an excellent programmer?
<gog> so on the balance i'm an OK programmer
<sham1> I sat in a meeting today, talking about UI stuff and mostly just being the tech person in the room
<zid> If tiger woods hits a bad shot, is he suddenly an averaeg golfer
<sham1> yes
<zid> oh
<zid> I am like a 4% good TGM player then, shit
<heat> meetings are great
<heat> praise be meetings
<zid> I feel personally attacked
<heat> whats ur favourite compression format
<zid> replacing every th with a thorn
<zid> with no regard to whether it is voiced or unvoiced!
<heat> personally i like compress(1), it's perfect
<heat> ddevault, btw I do COW on everything (in fork), and I don't preemptively un-COW anything, because that's just kind of guesswork
<heat> I believe other systems do the same
<zid> If you want to preemptive cow stuff, use ForkEx that has hints
<zid> duh
<heat> the way I COW is that everything that *was* mapped stays mapped, read-only. ofc i don't copy read-only pages, how could those get COW'd?
<heat> POSIX kind of has the underlying notion that everything MAP_PRIVATE is COW, even without fork
<heat> so e.g a read-only MAP_PRIVATE | MAP_ANON mapping is just temporarily mapping the zero-page COW until I mprotect it and fault some real memory in
<heat> and the same thing applies for a file
<gog> moo
<sham1> OOM
<mjg> ooooo
<mjg> hh
<heat> hello mjg
<heat> what brings you here
<mjg> big sad
<heat> are you large sadness
<mjg> xxl
<mjg> i came up with a great idea
<mjg> and then i found out linuxi s already doing it in some places
<bslsk05> ​lore.kernel.org: [PATCH 00/11] Introduce mt_dup() to improve the performance of fork()
<mjg> Use bench_forking() in lib/test_maple_tree.c to test in user space, and get the
<mjg> performance numbers of duplicating maple tree as follows:
<mjg> before: 13.52s
<mjg> after: 2.60s
<mjg> did i mention that fucking single threaded cost from maple syroup is avoidable?
<mjg> i take full credit despite 0 involvement
<mjg> [unrelated to the previously menitoned great idea]
goliath has joined #osdev
<heat> what's the idea?
<mjg> dodge a full memory barrier with synchronize_rcu
<mjg> as in penalize the slowpath with synchronize_rcu, but in return don't have the PESSIMAL instruction in the fast path
<mjg> the call guarantees everyone fucked off from their rcu sections
<mjg> so everyone who could have raced is already taken care of
<heat> what's the pessimal instruction?
<mjg> smp_mb normally impemented as lock add on the stack or whatever
<heat> yeh but where do you need that?
<heat> read-side? I don't think you need anything on the read side
<heat> apart from alpha
<mjg> according to my perf top __legitimize_mnt is suffering from it
<bslsk05> ​elixir.bootlin.com: namespace.c - fs/namespace.c - Linux source code (v6.4.6) - Bootlin
<mjg> if i can guarantee mntput_no_expire will always be called outside of rcu section, i can use the trick there to whack the barrier
<heat> synchronize_rcu is slow though?
<heat> why tf would you want to do that
<mjg> it is slow but almost never needed
<mjg> in this case it would only happen when whacking a mount point
<mjg> comparatively, __legitimize_mnt is called every time a lookup succeeds
<mjg> which is liek billions of times vs one
<heat> hmm ok
<mjg> thank you for your approval
<mjg> kind of weird it was not sorted out already, but then again, tons of other things were not either
<heat> i really need rcu
<mjg> use linux
<heat> no
<heat> i'll probably write my own and LGPL it
<mjg> implement rcu and make your dtrace port use it
<heat> fuck no
<heat> dtrace sucks ass fuck dtrace
<mjg> you are one finicky genz aren't you
<heat> yes
<mjg> going from porting dtrace to saying it fuck it overnight
* mjg totally expects heat to use openbsd next week
<heat> i may port it one day, but that day is not today, or probably this week
<mjg> or is the hate wagon just one way?
<heat> you know what I kind of like? perf_event_open
<heat> even though it's stupidly complex to grok
<mjg> i don't know it, it probably sucks tho
<heat> see your local manpage
<heat> you dirty RHEL user
<mjg> if there is a linux-specific syscall, you can blindly assume it is bad
<mjg> they implement first and damage-control later
<heat> well, there's no perf_event_open2 yet
<heat> sooo
<heat> maybe this one's good
<mjg> i think nfs code would leave the kernel with a semaphore still locked
<mjg> which would get unlocked when nfsd decided it wants to exit
<mjg> that was funny
<heat> that's cool
<mjg> i remember a guy asking what's wrong with returning to userspace with a mutex
<heat> there's nothing wrong as long as you have a way to auto-unlock it
<heat> i.e on ->release()
<SGautam> Anyone else experience massive lag after Windows update? This has happened every time and I've to reinstall the GPU drivers for it become normal.
<gog> never update
<SGautam> nice suggestion
xenos1984 has quit [Ping timeout: 245 seconds]
DoubleJ has quit [Quit: Not all those who wander are lost]
xenos1984 has joined #osdev
Yoofie has quit [Ping timeout: 245 seconds]
<mjg> big brain partitioning: /dev/nvme0n1p3 20G 507M 19G 3% /boot
<mjg> while: /dev/nvme0n1p4 30G 56K 28G 1% /home
<FireFly> yeah that is.. novel
<FireFly> why 20G /boot :p
<mjg> i'm guessing someone got burned by deleting old kernels
<mjg> :A
<heat> linux kernel
<Lareina> mjg: lol
<heat> this does remind me i haven't used my module system in a long time
danilogondolfo has quit [Quit: Leaving]
<gog> khello
<heat> hi gog
<heat> how r u
<sham1> "fish" giveTo: gog
xenos1984 has quit [Ping timeout: 258 seconds]
<heat> gog = giveItem "fish" gog
<sham1> That's no smoltalk
<heat> haskell mofo
<sham1> Haskell is pessimal
<pie_> yeet
<mjg> lol at haskell for real
<sham1> Haskell: Blub Paradox
<gog> i don't know what this crap is
<gog> haskel or whatever
<gog> i don't wat haskell give me haddock
<heat> haskell is good
<mjg> haskell has fearless concurrency
<heat> if you're not configuring your desktop environment in haskell what the fucka re you doing
<heat> xmonad 4 life motherufcksre!!!
<mjg> OH
<mjg> do you know how to spot a new college grad
<mjg> fuck writes in haskell
<mjg> the functional folk are not anywhere near as loud as the rust ones
<heat> half of IRC users are highly profficient in haskell and rust
<mjg> but they spew ever bigger bullshit
<mjg> even*
<GeDaMo> fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
<bslsk05> ​'In Defense of Inefficiency' by Zoe Bee (01:09:14)
<sham1> Functional is good
<heat> i feel like you need this vid once in a while
<heat> to calm yerself down
<mjg> GeDaMo: what i love about language marketing is they they keep giving examples which are worthless
<mjg> GeDaMo: in production
<mjg> like that fib
deflated8837 has quit [Read error: Connection reset by peer]
<GeDaMo> :D
<heat> the Big Haskell doesn't want you to know no one calculates fibbonacci
<mjg> fp great no side effects11
<GeDaMo> I like that definition
<GeDaMo> It's not useful bit I like it :P
<mjg> mofo, i do need to have side effects to actually do anything
<mjg> welp don't use fp
<GeDaMo> s/bit/but/
deflated8837 has joined #osdev
<mjg> is how it goes
<sham1> mjg: it's not about "not having side-effects", it's about clearly defining and delimiting where those side-effects occur
<mjg> sham1: the marketing literally is "no side effects, everything immutable bro"
xenos1984 has joined #osdev
<sham1> Do you believe the marketing department for everything else?
<mjg> i don't believe marketing whatsoever
<mjg> the once in blue moon time a informed & intelectually honest person says something
<mjg> it does not look good
<mjg> just lolling here
<mjg> recently i ran into a fucking guy recommending python, with reasoning as follows
<mjg> ye python can be way slower than c++, but c++ is error prone
<mjg> and takes more time to develop software
<heat> hey i have no qualms with guys fucking, but guys fucking WHILE recommending python? madness
<sham1> Ah python. The language is used for ML for god knows why
<mjg> ergo python great
<sham1> And doing ML with it is annoying
<heat> python is a good language
<mjg> why do you taunt me heat
<heat> sorry to burst that bubble pal
<heat> not everything needs to be efficient
<mjg> defo hit:
<mjg> print "fucker"
<mjg> but python has dynamic typing, which for *me* is a non-starter
<mjg> nothing about perf
<mjg> in this regard
<sham1> It's not lisp. 0/10
<bslsk05> ​docs.python.org: typing — Support for type hints — Python 3.11.4 documentation
<mjg> heat: mofo, are you seriously trying to roll with this non-argument
<heat> what non-argument?
<mjg> every fucking time the same kind of a loller
<mjg> > lang facilitates shite X behavior
<mjg> > i don't do X!
<mjg> even if true, other people do and you have to fuck with their code
<mjg> therefore it is their problem
<heat> python supports both options, you choose the one you like the best
<mjg> s/their//a/
<heat> if you think the code is crap, you think the code is crap
<mjg> cool, the fuck i have to fix after might have chosen wrong
<mjg> if the lang was statically typed, this bit would not be an issue
<mjg> my fav non-argument in this area is "use english" in perl
<mjg> perl is notoroius for dumbufkc oneliners
<heat> it's like if I start writing C with a malloc(); (implicit int ret, implicit int arg(s))
<heat> is C shit because I made a shit choice?
<mjg> and when you point it out perlers which roll with them claim i don't have to
<mjg> actual example from perlvar(1)
<mjg> ($<,$>) = ($>,$<); # swap real and effective uids
<mjg> and i had seen production code using that $< idiocy to do stuff
<mjg> but hey, *I* did not have to do it, therefore not a problem, innit
<heat> foo(a, b) { char *malloc(); return malloc(a * b);}
<heat> C is a bad language
<mjg> what
gog has quit [Quit: Konversation terminated!]
<mjg> are you ok mate
dude12312414 has joined #osdev
<heat> i'm very ok
<heat> you didn't answer me, is C a bad language because I made a bad choice?
<sham1> yes
freakazoid332 has quit [Ping timeout: 264 seconds]
<immibis> mjg: there are literally no side effects in haskell
<immibis> all of the side effects are outside of haskell
<mjg> heat: no
<mjg> i don't know if you noticed, but you are once more not making an argument
<mjg> yo, so i took this knife and cut off my eye. are knifes bad?
<heat> thank you for agreeing with me
<mjg> nope
<mjg> lack of types or that $< bullshit only facilitates trouble for no benefit
<kof123> no, you have magical odin/pirate powers now
<kof123> knife good
<mjg> therefore it's not a knife situation
<heat> lack of types has benefit
<heat> you just don't like it
<mjg> ye, handy oneliners
<mjg> and to be clear, c is a shite lang
<heat> so what's a good language here? rust? /s
<heat> btw > net/unix/garbage.c
<heat> AMEN BROTHA
<mjg> *really* good? i don't know any
<mjg> it's all bullshit
<sham1> lisp
<mjg> must be a hard problem
<sham1> Any of them
<sham1> You must beat the averages
<mjg> well le tme restate. for CRUD and similar, there is probably something perfectly decent
<mjg> but for systems development *so far* we are in shite, but rust does seem like an improvement
<heat> go is good, rust is good, C and C++ are good
<heat> python is good
<mjg> just webdev marketing making systems claims about it gives it a bad name
<mjg> well, worse name
<mjg> ;)
<sham1> Python isn't good though
<mjg> what
<mjg> you are not thinking like a computer scientist!!
<heat> python Just Works
<sham1> Damn Blub
<mjg> python just loves to murder your cpu does not it
<heat> that's cpython
<mjg> that's monty python
<mjg> php is a great example of utter shite which took off
<mjg> safe_mode (LOL), register_globals, magic_quotes
frkazoid333 has joined #osdev
<mjg> btw, funny story
<mjg> that shite perl code rolling with $< and similar
<heat> mjg, does freebsd also do gc for unix sockies?
<mjg> it suddenly stopped working
<mjg> there was another hieroglyph to check errno
<mjg> there was an unrelated change made prior to fucking with $<
<mjg> it resulted in the interpreter making a bunch of dumbfuck syscalls
gog has joined #osdev
<mjg> last one returned EPIPE or similar
<mjg> and later error check after $< manipulation failed on that
<mjg> utterly idiotic problem which would never existed if the hieroglyph "API" did not even exist
<mjg> heat: everyone has to do it
<heat> sortix just stops you from sending a buncha shit down the socket
<heat> including other sockets
<mjg> LAME
<mjg> you allow bullshit
<mjg> and then try to fix it
<gog> hi
* gog draws a heiroglyph of a fishy
<heat> hi grog
* sham1 materialises the hieroglyphic fish
* gog chomp fishy
<mjg> chomp is a perl keyword
<mjg> another funny perl bug
<mjg> it has an oeprator for ez regexp usage
<mjg> it convinces people to roll with regexps all over, even when what they want is a straight up comparison
<sham1> bless is also another perl keyword
<mjg> oh ye
<kof123> die
<sham1> das
<mjg> fuck_off or die($!)
<kof123> or yeah ruby has those "unless"
<mjg> and which of you fucks knew that perl is pass by *reference*
<kof123> *oh
<heat> bless up 🙏🙌
<sham1> #blessed
<gog> meow
<heat> meow up 🙏🙌🐱🐈
gareppa has joined #osdev
<bslsk05> ​'' by [idk] (--:--:--)
<heat> who said this
<sham1> oh no
<heat> is this u
<gog> yes
<heat> why do you have an icelandish accent
<gog> i have an american accent
<heat> hmmm no i think i hear some nordic in there
<gog> whenever i try to speak with an icelandic accent it just sounds like i'm mocking björk
<heat> anyway NO IM NOT GETTING DEPESSIMIZED FUCK YOU
<bslsk05> ​'' by [idk] (--:--:--)
<heat> nice puke gog
<gog> takk
<heat> takk
<gog> takk kærleiga fyrir, hita
<heat> 921 sbappendrecord_locked(sb, m); /* XXXXXX!!!! */
<heat> the more X's the worse the hack?
<gog> or the sexier it is
<heat> freebsd is not sexy
<heat> solaris is
<heat> Sun microsystems employees FUUUUUUUUUUUUUUUUUCKED
<gog> they kissed girls that's for sure
<sham1> Did they like it
wblue has joined #osdev
<heat> who wouldn't
<gog> but did their girlfriends mind it
<gog> boyfriends?
<gog> idk that's not one of the katy perry songs i know
<sham1> latter
<sham1> But I'm glad you got the reference
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
<gog> solaris solaris solaris
<gog> solaris on a ryzen
<sham1> RYZEN
nyah has quit [Quit: leaving]
nyah has joined #osdev
<heat> omg imagine solaris scaling super well on a ryzen
<heat> that must be the greatest feeling on earth
<heat> solaris (the most scalable OS) and a 128T threadripper
<Cindy> nobody uses solaris anymore
<heat> smoke those GNU/Linux commies with your corporate serious bizness UNIX
<sham1> Yeah, because Oracle KILLED it
<sham1> BLOODY MURDER
gareppa has quit [Quit: WeeChat 3.8]
wblue has quit [Quit: wblue]
sinvet has quit [Quit: Leaving]
sinvet has joined #osdev
<mjg> warnings, newsflash
<mjg> saphire rapid *still* sucks when faced with atomics
<mjg> as in newest & greatest from intel
<sham1> AMD > Intel
<mjg> i don't have any amd :[
<mjg> someohw always got intel at jobs
<mjg> aah linux
<mjg> > * This function expects the tasklist_lock write-locked.
<mjg> writing a comment instead of an assert has a better track record at enforcing correctness
<mjg> innit
<mjg> heat: excuse me sir arey u the new will it scale maintainer
<mjg> heat: ./access1_processes -t 30ls
<mjg> does not complain about the count
<moon-child> I still don't get why cmpccxadd wasn't specced to be weakly ordered
<heat> mjg, wdym, like the time?
<mjg> i mean it should freakin claim 30ls is NAN
<mjg> ey do you know what SCALES
<mjg> pthread mutexes
<heat> oh wait -t is tasks yeah
<mjg> testcase:Contended pthread mutex with global update
<mjg> -t 1: min:67789282 max:67789282 total:67789282
<heat> wait are you actually using my fork
<mjg> - t2: min:9365134 max:10432950 total:19798084
<mjg> i just cloned some shit which had my tests bro
<mjg> since actual upstream still did not merge and i don't have them on one branch on github
<mjg> i'm not that into your fork tho
<mjg> maybe if you push a patch for this issue the guy will pick it up one day
<mjg> i can't be backside-ed
benlyn has quit [Ping timeout: 258 seconds]
<heat> what's wrong with my fork?
<mjg> cringe
<mjg> anyway going 1 thread -> 2 threads drops perf HARDCORE
<heat> it's a bunch of improvements plus a bunch of tests that got PR'd
<gog> hi
<heat> hi gog
<mjg> i wonder if RUST is doing better since they have custom lockkz around futexes
<gog> heat
<gog> it's time for your depessimization
<heat> no
<mjg> heat is getting a haircut?
<heat> the CIA glowies want you to get depessimized
<mjg> you either look after your beard or shave it
<heat> refuse to get depessimized, fight big government
<mjg> ey heat remember BIG SMART INIT ON ALLOC
<heat> yes
<mjg> that shitter is 8% of cpu time on saphire
<mjg> when doing fstat
<mjg> :d
<heat> wait
frkazoid333 has quit [Ping timeout: 260 seconds]
<heat> init on alloc?
<heat> oh yes
<heat> init on alloc
<mjg> aka zero
<heat> boohoo
<heat> cry
<mjg> i am, yes
<heat> spoiler: sometimes when you enable security features you may end up slowing your thing down
<mjg> i'm sayin
<mjg> there is not much improvement from cascade like
<mjg> it's liek what, 5 years?
<mjg> you owuld think this would be way faster
<heat> sapphire rapids has a bunch of other problems
<heat> like the jump > 2GB thing
<mjg> NAH IT WILL BE FINE
<Cindy> heat: what's CIA?
<Cindy> is it that thing for the 3DS?
<mjg> 18.64 │ cmpxchg16b %gs:(%rdi) ▒
<mjg> lmao
<mjg> kmem_cache_alloc
<mjg> FAST INNIT
<heat> yes, it's fast
<bslsk05> ​lore.kernel.org: [cpuops cmpxchg double V2 4/4] Lockless (and preemptless) fastpaths for slub - Christoph Lameter
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
<mjg> ye that's the slow stuff
<mjg> cmpxchg16b is slow af
<mjg> even on the shiny new cpu
<bslsk05> ​dougallj.github.io: Firestorm Base Instructions
<moon-child> ;-;
<mjg> is it atomic?
<mjg> cause there is not very atomic cas on x86 :d
<heat> mjg, one way to tell, compile it out and re-test
<moon-child> fuck would be the point of nonatomic cas
<moon-child> arm, unlike x86, was actually designed
<heat> atomicism wrt signals or interrupts
awita has joined #osdev
<heat> cmpxchg16b %gs:(%rdi) <-- no lock, only atomic in regards to itself
awita has quit [Remote host closed the connection]
<moon-child> ok yes, there are some fringe use cases
<moon-child> similarly membarrier
<moon-child> but it's not particularly useful or common
<mjg> cmpxchg without te lock prefix is both slow and not atomic
<mjg> for exmaple :]
<mjg> (not even menitoning the 16b)
<mjg> kind of interesting they implied the lock prefix for xchg
<mjg> but not for this sucker
<mjg> hue
<bslsk05> ​elixir.bootlin.com: file.c - fs/file.c - Linux source code (v6.4.6) - Bootlin
<mjg> i just realised how shite it is
<mjg> relock cycle for any file which may not even exist
<mjg> curious how often that happens
<heat> that's only called for close_range
<heat> but yes that looks very ew
<mjg> this is their cloexec mofo
<mjg> erm, closefrom
<heat> yes, close_range
<mjg> :D
<mjg> 2674653 close_range(3, 4294967295, 0) = 0
<mjg> 2674665 close_range(3, 4294967295, 0) = 0
<heat> what
<mjg> what what
<mjg> aka close from 3 to the end
<heat> why the :D
<heat> n = last_fd(files_fdtable(cur_fds));
<heat> rcu_read_unlock();
<heat> max_fd = min(max_fd, n);
<mjg> i'm guessing the kernel pegs it to the fd table size
<mjg> right
<mjg> but even then that's funny
<mjg> imagine you get a few hundred fd gap
<mjg> and for what
<heat> tbf it's probably kind of hard to implement this in any other way
<heat> one could argue that for correctness sake going through every fd num is better
<mjg> * last_fd - return last valid index into fd table
<mjg> so this is not the last fd per se
<mjg> rather table capacity
<heat> and you can't close the file without a spin lock
<mjg> what you can do is fucking check if there is anything there first
<heat> s/without/with/
<mjg> only then take the lock and check again
<mjg> alternatively
<mjg> you take the lock
<mjg> then you search for the first fd and grab it
zxrom has quit [Remote host closed the connection]
<mjg> instead of the current loop
<mjg> spin_lock(&cur_fds->file_lock);
zxrom has joined #osdev
<mjg> do { file = pick_file(cur_fds, fd++) } while (file == NULL && fd <= maxfd); or so
<mjg> then unlock
<mjg> i'm gonna patch it later
<heat> actually, i see an idea
SGautam has quit [Quit: Connection closed for inactivity]
<heat> use f_llist + a single pass through the fd table
<heat> then unlock and batch-close them
<mjg> that is a more involved change but would work
<mjg> do you want to hack it up?
<heat> sure
<mjg> aight, i'm gonna pretend i did not say anything
<heat> why?
<mjg> i'm saying just write the fucking patch and post
<mjg> at your leasure
<mjg> i'm not gonna write mine
<heat> ok
<heat> did you actually measure this or shall i write a benchmark?
<mjg> i did not. it is an obvious thing to fix, preferably in the easiest way possible
<mjg> hence why my proposal
<mjg> yours is more work but it is not hard to reason about, so i'm /guessing/ they will take it
<heat> i'd really like for a virt-optimized x86 defconfig :(
<mcrod> hi
<heat> hi mcrod did you go to the place yet
<mcrod> no i didn't go to the place yet
<mcrod> i just got home
<heat> ok
<mjg> what place, black lodge?
<mcrod> he's talking about ds:R
<mcrod> that fucker messaged me on my lunch break
<heat> no need to thank me
<mjg> what's that? dark souls r-ed?
* mjg is not a gamer
<mcrod> remastered, yes
<mcrod> the original PC version looks horrifically bad and is capped to 30fps
<mjg> :D
<mjg> wow
<mjg> that's one PESSIMAL frame count
<heat> the original dark souls looks fine
<mcrod> you're full of shit
<heat> the 30fps is a problem tho
<heat> im not
<mjg> 90% of shit
<heat> i play my video games at low settings
<mcrod> ..why?
<heat> usually because i must, sometimes because im a try hard
<mjg> heat: actually i noticed something
<mcrod> ah
frkzoid has joined #osdev
<mjg> heat: if multiple threads roll with the call
<mjg> heat: both in the current code and with my proposal they will take turns closing stuff
<heat> do you want that though? probably not
<mjg> in your case your thread is going to get bogged down with everything, but that's probably 99.99% of usage anyway
<mjg> mmm
<heat> there's no round-robin to be had there
<mjg> mate, one dude takes a fd
<mjg> and while it is busy closing it
<mjg> another one can take the next one
<heat> if they actually take rounds closing fds off, then it's probably by chance
<mjg> or closing a file is expesnive mate
<mjg> but it's your patch
<mjg> i'm buggering off of it
<mjg> now im curious how LINUX SYSCTL is implemented
<mjg> aren't you heat
<heat> no
<heat> kern_sysctl.c strikes again
Left_Turn has quit [Read error: Connection reset by peer]
Turn_Left has joined #osdev
<mcrod> by the way
<mcrod> today I discovered that one of our vending machines at work uses embedded linux
<mcrod> either they're doing something wrong, or it is dog shit slow
<heat> busybox?
<mjg> what cpu is it?
<heat> glibc + gnu userland would be hilarious
<mjg> and which kernel version
<mcrod> i do not have these answers i'm afraid
<mcrod> yet
<mjg> maybe if old enough it actually works? :0
<heat> kernel 2.6 ofc
<mcrod> i have to say though, freertos has been quite a treat
<mcrod> it's quite effective
<mcrod> very easy to work with
<mcrod> we don't need any of the fancy POSIX stuff... ever
<nortti> < heat> kernel 2.6 ofc ← my partner recently found a 2.4 kernel in use in a PBX they were doing mantenance on
goliath has quit [Quit: SIGSEGV]
<heat> it sounds like you're looking for the POSIX subsystem for windows
<mcrod> for the most part we don't even use the C standard library, remarkably
<mcrod> except for stdint.h, some of stdio.h
<mcrod> extremely minimal usage
<heat> does that make you happy
<heat> you could be out there forking and execveing
<mcrod> that makes me extremely happy
<mcrod> we simply do not need anything extremely fancy
<heat> whats a system without a little bit of mmap?
<mcrod> and I get paid for it
<mcrod> so that's great
<mcrod> god i'm hungry
<heat> hi, its me, god, send me pics of your credit card
<heat> thank you
foudfou has quit [Remote host closed the connection]
zxrom_ has joined #osdev
<heat> Kernel: arch/x86/boot/bzImage is ready (#34)
<heat> woooooooooooooo
<gog> heat: bzimage
zxrom has quit [Ping timeout: 260 seconds]
<bslsk05> ​imgflip.com: Sheldon Cooper - Imgflip
zxrom_ is now known as zxrom
<gog> heat
<mcrod> gog: may I hug you
<bslsk05> ​imgflip.com: Sheldon Cooper - Imgflip
<gog> mcrod: yes
* mcrod hugs gog
* gog prr hug
<Ermine> gog: may I pet you
sinvet has quit [Ping timeout: 245 seconds]
<gog> Ermine: yes
<mcrod> oh no
<mcrod> CLion has an "AI Assistant" now
<mcrod> sigh
* Ermine pets gog
Burgundy has quit [Ping timeout: 260 seconds]
SGautam has joined #osdev
<SGautam> https://youtu.be/oOITpIzd7WM if I could get a CRT frame around that I would be so perfect.
<bslsk05> ​'WSL CRTerm test (with curvature shader).' by Siddharth Gautam (00:01:49)
<SGautam> *it, not I
<SGautam> ah, youtube messed up the compression due to the noise.
<geist> yah cool retro term is great
<geist> i have old older computer with a smallish LCD acting as a fake term with that
<geist> the effect is pretty good
<SGautam> this is not cool retro term :)
<heat> mjg, would you believe it got slower? lol
<SGautam> i tried running Cool-Retro-Term on Win32 it simply wouldn't compile, and when it did it just crashed, i guess I didn't bother much trying to fix Qt linkages, eventually I thought it would be fun to write a terminal emulator but it is not exactly fun.
* gog prr
vai has quit [Ping timeout: 260 seconds]
<gog> hi
<gog> hihihihih
<SGautam> hello
<heat> ah shit i see why
<gog> repessimization
<heat> this is a lockless singly-linked-list and i accidentally used the lockless "atomic" variants
<gog> atomic dog
<SGautam> Is the difference between mutex and an atomic purely on the level at which they operate?
<SGautam> mutex => kernel level, atomic => architecture/cpu level
<heat> sure
<heat> but atomics do a lot more than mutexes
<gog> i thought atomic meant an operation runs to completion or it doesn't, no partials or side-effects
<heat> it also doesn't race with any other operation going on in the CPU
<heat> two atomic adds in two different cores will never race with each other
<mjg> heat: ?
<mjg> patch mofo
<mjg> one thing you may do is add a sysctl to flip between imlementations at runtime
<mjg> to rule out funzy problems
qubasa has quit [Ping timeout: 246 seconds]
<mjg> oh 00:41 < heat> this is a lockless singly-linked-list and i accidentally used the lockless "atomic" variants
<mjg> lmao
<mjg> a geezer told me atomics are chip tho
<mjg> so don't worry about it
<mjg> gog: the term atomic is overloaded
<gog> i'm working on the database definition
<mjg> gog: mere aligned mov of 8 bytes from memory to a register is considered atomic in the sense it is all or nothing
<gog> yes
<mjg> at the same time lock xadd is atomic in the sense you are guaranteed to see a sane value, but you are also suffering a synchro cost with other cpus
<mjg> which is TURBO FUCKI^WEXPENSIVE
<mjg> basically anything with the lock prefix and xchg with a memory oeprand (which has an impliedl ock prefix) == atomic and SLOW AF
<mjg> anything else "atomic" is the same as regular op
<gog> hmm
<mjg> it's mostly about preventing the compiler from fucking with codegen
<gog> yes
<bslsk05> ​gist.github.com: close_range.patch · GitHub
<mjg> for example void *ptr = obj->ptr;
<mjg> in principle can be 8 one byte loads
<gog> i think i'm confusing it with memory fencing
<mjg> so you may get a shafted value if it changes in the meantime
<gog> or something to do with preventing in flight uops from having a dependency on the ressult until the last step in its pipeline is done
<gog> idk
<mjg> all the lock'ed ops on amd64 also come wiht a full barrier
<mjg> so
<gog> i don't know what computerws are
<mjg> to add to the confusion
<mjg> preventing shit from going across the barrier is part of what makes them expensive
<mjg> heat: is that f_llist really safe to use an arbitrary point? i think there was a list like htat but i can't recall if that's the one
<mjg> don't you need to init the list osmehow?
<mjg> first
<heat> wait a sec, i think i see a brainfart
<mjg> some LLIST_INIT(mofo);
<heat> no, that's not the problem
<mjg> iteration?
<mjg> what's this: + node = __llist_del_all(&free_list);
<heat> well, the whole patch is wrong
<mjg> i would expect there to be a mere foreach
<heat> that's the problem
<mjg> on free_list
<heat> i can't use f_llist before the file is dead (aka ref = 0)
<heat> so the idea doesn't work
<mjg> right
<mjg> 's what i asked
<mjg> 00:55 < mjg> heat: is that f_llist really safe to use an arbitrary point? i think there was a list like htat but i can't recall if that's the one
<heat> yeah
<mjg> lemme check the file
<mjg> maybe there is a free sucker in there
<heat> obviously if the same struct file were in multiple fd tables you'd race
<mjg> the struct is big af
<heat> REAL kernels have BIG structs
<heat> the freebsd ""kernel"" is a just a toy
<mjg> union {
<mjg> struct llist_nodef_llist;
<mjg> unsigned int f_iocb_flags;
<mjg> struct rcu_head f_rcuhead;
<mjg> };
<mjg> that's the union i remembered
<mjg> well i'm gonna write my patch then
<mjg> no issues of that sort, innit
<heat> something I didn't address is cond_resched shenanigans
<heat> which you will have to deal with
<heat> i think
k0valski188912 has quit [Quit: Ping timeout (120 seconds)]
<heat> REAL kernels never "preempt"
<heat> what the fuck is preemption anyway? it's just a massive con
* geist cuts heat off right there
<heat> real talk i've never actually benched it
<heat> should be a fun test
<gog> ima stop you righ tthere
<mjg> btw heat, i have a sketch how to ditch that cmpxchg16b in kmem alloc
<mjg> *and* support interrupts
<gog> i know what can help us all
* gog puts on a singsongy voice
<heat> why do you want to ditch it?
<gog> depessimization
<mjg> heat: slow af
<heat> you didn't prove it's slower than the alternative
<heat> and the people back then did bench it
<heat> it was faster
<mjg> guy replaced interrupt disablement (which is turbo slow) with cmpxchg16b (again slow)
<mjg> if he had preemption disablement a'la bumping a counter and branching
<mjg> it would be a different manner
<mjg> matter
<mjg> but he could not as is due to the need of this code working with interrutps
<mjg> maybe you are reading too much into the commitm essage
<heat> right, but this code needs to work with ints
<mjg> i can make it work with ints without disabling them
<mjg> or using cmpxchg16b
<mjg> or at least seems so so far
heat has quit [Remote host closed the connection]
heat has joined #osdev
<mjg> key is to make non-irq variant transactional with a series of compiler barriers
<mjg> and stores to per-cpu state
<mjg> then you can recognize you interrupted the fucker and roll it back
<heat> the cmpxchg idea is already kinda transactional
<mjg> yes but slow af
<mjg> my code will add some stores
<heat> are you sure that's faster?
<mjg> not ZERO COST ABSTR^WIDEA but better
<mjg> ye the cpu can mostly parallelize them
<mjg> 's liek 1-2 cycles
<mjg> all i need is for the cpu to pretend they happen one by one if an interrutp occurs
<mjg> and tis already guaranteed
<mjg> however, my preferred plan of action instead of rolling wich mcgyver shit is to have a variant which does not work with interrupts
<mjg> life would be better for everyone
<heat> i don't think the change to reduce the kmalloc min align from 128 on arm64 has been merged yet
<heat> it has been like, what, 8 months?
<heat> so good luck have fun
<mjg> that's a massive hit or miss mate
<geist> this sounds very x86 centric
<gog> reality has an x86 bias
<mjg> :)
<mjg> it very much is, yes
<mjg> you may notice the non-hack variant is not though
<geist> was gonna say the stores and the chopping thing, but actually i guess even a weak memory model like arm and riscv has to maintain that too
<geist> ie an irq happens between two stores
<heat> somehow alpha flips you off here
<mjg> code executing on one cpu is guaranteed to see a sequentially consistent state
<mjg> against itself
<geist> right
<mjg> heat: modulo compilation errors and testing i think it looks nicer too https://dpaste.com/9MTE62DKM
<bslsk05> ​dpaste.com <no title>
<mjg> than ze original
<heat> btw slub accounting also uses cmpxchg_double
<mjg> you know what's funny about cmpxchg_double_trouble
<mjg> they did not optimize the asm
<heat> that looks ok
<mjg> klassik with hand-rolled asm inline for cmpxchg is that it emits 'sete %1' and then you test on it
<mjg> because back in the day compilers did not know how ot idnicate the result in eflags
<mjg> they did update it for cmpxchg, just not the 16b variant
<mjg> will patch it later
<heat> i see you're on a roll
<heat> have fun
<mjg> i know right
<mjg> fucking TURING AWARD coming my way
<mjg> fun fact: the linux author of close_range was collaborating with a freebsd dude on the same syscall
<mjg> and they committed equivalent problem
<mjg> i fixed it in freebsd
<heat> turing award for mjg59
<mjg> :[
<heat> oh wait, wrong mjg
<mjg> feels == hurt
<mjg> :X
<mjg> mjg86 tyvm
<heat> mjgx86istheonlyarchitecture
<mjg> 's actually my year of birth
<mjg> coincidence? i don't think so
<heat> arm64? more like arm shitxty crap
<mjg> arm69 amirite
<moon-child> mjg: what's wrong with the stack trick
<moon-child> for interrupts
<mjg> i like it, but i'm too old to really do it
<mjg> as in sounds like fun but who is going to debug this shit
<moon-child> haha fair
<mjg> personally i would be opposed to /landing/ something like this without a massive reason
<heat> what stack trick?
<mjg> that is to say, if i was 20, i would totally submit
* moon-child is 20
<mjg> go ahead mate
<heat> im actually 20
<heat> so tell me what the stack trick is
<heat> and i'll send it
<moon-child> heat: it's like turning off interrupts but better
<heat> its like turning off interrupts but you turn off the computer and go to sleep
<moon-child> if you're the interrupt handler and you detect that the main code is in a critical section
<moon-child> you overwrite the return address with the address of the interrupt handler (and stash the original somewhere)
<moon-child> so once it finishes it hands control back over to you
<heat> thanks i hate it
<moon-child> why
<moon-child> it's amazing
<heat> it's awful
<heat> forces you to always have frame pointers on too
<moon-child> no frame pointers = no stack traces = no tracing = sad anyway
<heat> you dont need frame pointers to stack trace anyway
<moon-child> then you don't need them for the stack trick either
* moon-child gtg
<gog> sadge
gog has quit [Quit: byee]
janemba has quit [Read error: Connection reset by peer]
nyah has quit [Quit: leaving]