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
<geist> chiselfuse: make sure you have the absolutely current manual. AMD didn't add support for avx512 until zen 4
<geist> but also could be if you're looking at the system manual or so it may not mention it
<geist> would be over in the ISA or base arch part of the register
<geist> manual
<heat_> https://godbolt.org/z/WfaqcxTe6 i need to start biasing my counts
<bslsk05> ​godbolt.org: Compiler Explorer
<heat_> for pure sex codegen
<heat_> it's so optimal
<nikolapdp> what do you mean by biasing
<nikolapdp> bias of -1 or something?
<heat_> -1 = 0 yeah
<nikolapdp> ah yea
<nikolapdp> i mean no bias is like two instructions of difference
<nikolapdp> hardly noticable
<heat_> as soon as you go out of these status flag boundaries you need to do crappy exchange (or cmpxchg in some archs) ops
<heat_> it'll at least probably scale worse (although i have to admit i've never measured lock xadd vs lock add)
<nikolapdp> eh don't know
<heat_> and in any case it's just so hot to be so OPTIMAL
<nikolapdp> lol
<nikolapdp> so you're going to add an annoying bias
<heat_> annoying how?
<nikolapdp> got to remember that it's biased
<heat_> i'll add an inline for it
<nikolapdp> sure lol
<heat_> you weren't expecting the genius move of USING A FUNCTION
<nikolapdp> from you, never
<heat_> if i were doing this in C++ i'd just use a private and have a mapcount() member function too
<nikolapdp> same idea, hide it behind a function
<nikolapdp> also you are using c++
* Ermine yawns
<heat_> all of this code is seen from C and is therefore C, virally
<nikolapdp> lol sure
<Ermine> __attribute__((hidden))
<nikolapdp> we can stoD
<nikolapdp> we can still see you
<zid> int class;
<zid> I write exclusively code for RPGs, so that people can't accidentally compile it with a C++ compiler by mistake
<zid> I am benevolent
<nikolapdp> thank you zid for your service
<zid> every project should have an rpg.c in it
<nikolar> i'll figure out a way to put rpg.c in my kernel
<heat_> don't bloat 2.11BSD
<mjg> whcih version is the superiorest
<nikolapdp> i will make a syscall just to spite you
<zid> sys_init must be called by every process before mmap works, and you pass it the class of memory management you want
<zid> void sys_init(int class);
<nikolapdp> nice
<zid> enum INIT_CLASS { INIT_CLASS_GENERIC };
<heat_> 2.11BSD doesn't have mmap
<heat_> i'm /pretty/ sure
<heat_> mmap was an extension for deh VAX
<nikolapdp> i mean you have like 8 pages per process
<nikolapdp> mmap is not particularly useful
gog has quit [Ping timeout: 240 seconds]
<heat_> yeah
<heat_> mmap and sockets and ipc and all that jazz was added because the VAX WAS SO POWERFUL
<zid> okay then, no other syscalls work, nikolar, stop being picky
<zid> you saw the genius
<zid> you just wanted to deny my glory
<nikolapdp> do you mean unix sockets
<nikolapdp> because i have networking
<nikolapdp> zid i am sure we can fine some other usage for "class"
<heat_> yes that's because they backported networking to your skunkworks OS
<nikolapdp> yes exactly, the pdp powerfull enough
<nikolapdp> for tcp/ip
<nikolapdp> not much more
<nikolapdp> lol
<heat_> don't you have like a separate kernel for networking and it swaps back and forth?
<nikolapdp> something like that yeah
eck has quit [Quit: PIRCH98:WIN 95/98/WIN NT:1.0 (build 1.0.1.1190)]
eck has joined #osdev
<nikolapdp> eck is that actually old windows
<eck> a friend wouldn't ask and a gentleman wouldn't tell
<nikolapdp> heh
<zid> quick, talk in nothing but utf-8
<zid> that looks like ascii but isn't quite
<zid> like russian B and stuff
<heat_> 𓂺
<nikolapdp> <heat_> p:
<heat_> lol what
<zid> I need to check whitequark for what he said
<zid> nop, eit's a box there too
<zid> anyone?
<nikolapdp> that's what you said heat
<nikolapdp> i am pretty sure it's the penis hieroglyph
<heat_> yes
<zid> makes sense as something he'd say
<heat_> i'm currently trying to figure out why you saw p:
<nikolapdp> didn't even need to see it to know
<nikolapdp> how's that going
<nikolapdp> btw i think it's a 7bit serial so maybe that helps
<zid> is it just ignoring the top bit
<zid> do you get p: if you do that
<heat_> i can't see why the p is a p, but : is the last utf-8 byte & 0x7f
<nikolapdp> python thinks i get p 0x13 0x02 :
<nikolapdp> so yeah that explains it
<heat_> ohhh 0xf0 & 0x7f is p
<nikolapdp> yea
nikolapdp has quit [Remote host closed the connection]
<heat_> i didn't check that one, i was assuming it didn't go anywhere
<heat_> fun
<nikolar> yeah be careful what you paste into a non utf8 terminal lol
<heat_> don't post egyptian!
<nikolar> i didn't mean to
<nikolar> wrong thing in the clipboard i guess lol
<heat_> if you find me a funnier unicode codepoint i'll stop posting the penis hieroglyph
nikolapdp has joined #osdev
<nikolapdp> ok back
<zid> nikolar wanna know my new porn name?
<heat_> damn your pdp is fast to reboot
<nikolapdp> oh i don't have it throttled
<bslsk05> ​i.imgur.com <no title>
<nikolapdp> though it would've rebooted anyway, i was mostly waiting for linux to let me bind the bloody port
<nikolapdp> that's a great name
goliath has quit [Quit: SIGSEGV]
frkzoid has quit [Ping timeout: 260 seconds]
eschaton has quit [Remote host closed the connection]
eschaton has joined #osdev
<heat_> wooo i can now swap out mapped pages
<heat_> i am happy
navi has quit [Ping timeout: 272 seconds]
<Ermine> conngrats
<chiselfuse> geist: well navigating for this manual is kind of whack unlike the intel one. so if you can find a link to an official page that always serves the latest please send it to me. mine is revision 4.07 dated June 2023, all 5 volumes. https://0x0.st/XA2D.pdfnn
<bslsk05> ​0x0.st <no title>
<chiselfuse> oops https://0x0.st/XA2D.pdf
<heat_> Ermine, thanks
<heat_> chiselfuse, if you don't like it just use the intel SDM *shrug*
<kazinsal> the AMD manuals also have a lot of model specific bringup information iirc
<kazinsal> so they can be pretty densely packed with stuff that makes you go "hwa"
<heat_> aren't those the BKDG ones?
<heat_> (rip)
<kazinsal> yeah those were great
<zzo38> Some of my ideas relating to operating system design: scorpion://zzo38computer.org/blog/c_OPERATING_SYSTEM_DESIGN.scorp
<bslsk05> ​zzo38computer.org: 404 Not Found
<heat_> what's a scorpion protocol
<chiselfuse> heat_: i actually find the amd ones more intuitive. i just remember them not really having a page for them, just a weird js search thing with weird titles for documents
<zzo38> Simple explanation: Use port 1517. Send R and then a space and then the full URL and then carriage return and line feed. A full explanation is available at scorpion://zzo38computer.org/specification.txt and is also available on GitHub as well.
<bslsk05> ​zzo38computer.org: 404 Not Found
<chiselfuse> compared to intel where they tell you what each document consists of
<zzo38> I had also set up a NNTP for discussion of the operating system design that I was doing.
<chiselfuse> zzo38: it only spits back the title of the document, not the bytes
<chiselfuse> i'm tempted to </dev/urandom the telnet
<zzo38> It is a binary file format (although the specification file is a plain text file, in order to avoid the problem that it is difficult to implement if you do not already have an implementation)
<zzo38> The NNTP is: nntp://zzo38computer.org/un2.org.zzo38computer.osdesign
<bslsk05> ​zzo38computer.org: 404 Not Found
<chiselfuse> zzo38: i'm able to pull the spec but the c_OPERATING_SYSTEM_DESIGN.scorp is just two lines of text
<chiselfuse> zzo38: is that a group on usenet that you have a proxy for available via nntp?
<zzo38> No; it is a local newsgroup (although discussion can also be made on Usenet, and I have posted some there too)
<zzo38> Also, c_OPERATING_SYSTEM_DESIGN.scorp is the Scorpion document file format (not a plain text file) and contains links to the actual articles.
<zzo38> (The specification, a program to download (using this and many other protocols, including Gemini, etc) the files, and also the fonts, is also available on GitHub.)
<chiselfuse> zzo38: well the links in the *.scorp file look like just titles, how can i use the as links?
<zzo38> The specification file explains it, but as far as I know the programs to display the file are not completely written yet anyways
<chiselfuse> w/e slrn failed to build
<zzo38> I had also written some thing relating to operating system design on Usenet (at comp.os.misc) although some of my ideas have changed over time
<Ermine> > scorpion > nntp
alpha2023 has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
alpha2023 has joined #osdev
<chiselfuse> does anyone know why the compiler didn't use rbp-10 and rbp-18 here?
<chiselfuse> it put rdi on rbp-8, then skipped both and populated rbp-20 onwards instead
<heat_> rdi is on -0x68
<zzo38> I would expect that the assembly code could be optimized better than that
<chiselfuse> heat_: oh sorry, i meant rbx
<chiselfuse> look at the smaller version of the function https://0x0.st/XA_5.c
<chiselfuse> everything is the same except that it doesn't skip the 16 bytes like in the longer version
<heat_> i don't understand how that function even works properly tbqh
<chiselfuse> heat_: what are you confused about?
<heat_> you reach the leave instruction with an unbalanced stack
<heat_> wait, no
<heat_> it should work
<chiselfuse> i am curious what you mean by unbalanced stack
<heat_> i didn't remember how leave worked exactly, and i saw it never poped rbx
<heat_> but leave does mov %rbp, %rsp
<heat_> and only then pops
<chiselfuse> yea
<heat_> in any case i don't see a reason why it's not using the first 32 bytes or so of stack
<chiselfuse> 16
<chiselfuse> don't make me doubt myself :P
<heat_> ah, i know why
<heat_> the struct is not big enough, and it's doing some funky redzone calculation
<chiselfuse> what?
<heat_> 104 + 8 + 8 + 8 = 128, 128 is the size of the redzone
<heat_> see how it's not bothering adjusting the stack pointer? it's using the redzone
<chiselfuse> brb reading what a redzone is
<chiselfuse> heat_: i don't understand what a redzone is
<heat_> hmm nah even playing with the code (and adding -mno-red-zone) i don't see why the stack allocation is like that
<heat_> it's in the system v abi
<heat_> x86_64
<heat_> but seriously this code is horrendous
<heat_> clang -O0 is a lot more sensible
<heat_> as soon as you give gcc -O1 it loses all of the stupid too
<chiselfuse> hmm sys v abi document considers the return address part of the new stack frame
<chiselfuse> why would it when rbp is pointing above it
<chiselfuse> when people say "stack frame" do you think of the area enclosed between rbp and rsp?
<chiselfuse> or rsp and one cell below rbp
rustyy has joined #osdev
<chiselfuse> heat_: anyways it looks like this empty space couldn't be a redzone because in this picture the redzone is on the lower address side of the stack frame, whereas here the empty space is on the higher address side and not even all the way because it's crammed between rbx and the rest
<heat_> no, it is the red zone
<heat_> -96(%rbp) is below the stack and above -128(%rsp)
<heat_> anyway it's late and i gtg
heat_ has quit [Ping timeout: 264 seconds]
janemba has joined #osdev
Gooberpatrol66 has quit [Quit: Konversation terminated!]
netbsduser has joined #osdev
Gooberpatrol66 has joined #osdev
netbsduser has quit [Ping timeout: 252 seconds]
bauen1 has quit [Ping timeout: 268 seconds]
Arthuria has quit [Ping timeout: 268 seconds]
bauen1 has joined #osdev
GeDaMo has joined #osdev
alpha2023 has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
alpha2023 has joined #osdev
node1 has joined #osdev
<geist> chiselfuse: huh yeah that seems like the latest, late 2023
janemba has quit [Read error: Connection reset by peer]
janemba has joined #osdev
node1 has quit [Quit: Client closed]
Left_Turn has joined #osdev
gbowne1 has quit [Read error: Connection reset by peer]
navi has joined #osdev
jeaye has quit [Ping timeout: 268 seconds]
janemba has quit [Read error: Connection reset by peer]
Turn_Left has joined #osdev
chase_osdev70 has joined #osdev
chase_osdev70 has quit [Client Quit]
chase_osdev has joined #osdev
Left_Turn has quit [Ping timeout: 260 seconds]
jeaye has joined #osdev
janemba has joined #osdev
obrien has joined #osdev
Left_Turn has joined #osdev
jeaye has quit [Ping timeout: 264 seconds]
jeaye has joined #osdev
Turn_Left has quit [Ping timeout: 268 seconds]
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 256 seconds]
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 246 seconds]
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
CryptoDavid has joined #osdev
Turn_Left has joined #osdev
Turn_Left has quit [Max SendQ exceeded]
Turn_Left has joined #osdev
vdamewood has joined #osdev
Left_Turn has quit [Ping timeout: 256 seconds]
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 256 seconds]
Turn_Left has joined #osdev
Turn_Left has quit [Client Quit]
Left_Turn has quit [Ping timeout: 256 seconds]
gog has joined #osdev
<gog> heat
<gog> oh
<zid> rip
<kazinsal> no hot tub :(
<vdamewood> no hot dogs
<GeDaMo> No hot chip
<vdamewood> hot chip?
* gog liess
<vdamewood> Just one?
<gog> eat hot chip and lie
* vdamewood gives gog a fishy
<zid> GeDaMo you're scottish not australian
* gog eat hot fishy and lie'
<GeDaMo> Australia didn't invent chips :P
<zid> they did 'hot chips' though
<GeDaMo> I don't know what that is :|
<kazinsal> the rest of the commonwealth should have adopted the halal snack pack
<zid> because they refuse to use the word crisps, they have hot chips and cold chips
<zid> for chips and crisps
<GeDaMo> Ah
<kazinsal> just because us canadians have poutine doesn't mean we shouldn't also get thick cut fries with doner meat and kebab sauce
<zid> and I suppose, if you leave them out long enough, cold hot chips
<vdamewood> kazinsal: Vladamir Poutine?
<kazinsal> that'd be ersatz potatoes, mysterious oil-based brown sauce, and "cheese curds" made from the fat deposits of deceased gopniks
<vdamewood> I'll take regular Poutine then.
<bslsk05> ​'Hot Chip - Over and Over (Official Video) (HD)' by HotChipVEVO (00:03:54)
<zid> funny music vid
chase_osdev has quit [Ping timeout: 260 seconds]
obrien has quit [Remote host closed the connection]
vinleod has joined #osdev
vdamewood is now known as Guest9595
vinleod is now known as vdamewood
Guest9595 has quit [Ping timeout: 260 seconds]
emm has joined #osdev
emm is now known as edmeme
housemate has joined #osdev
edmeme has quit [Quit: WeeChat 4.3.3]
<sortie> POSIX contains language that it must not be used to train artificial intelligence systems
gog has quit [Quit: byee]
gog has joined #osdev
emm has joined #osdev
emm has quit [Client Quit]
Vercas3 has quit [Ping timeout: 260 seconds]
edmeme has joined #osdev
CryptoDavid has quit [Quit: Connection closed for inactivity]
edmeme has quit [Remote host closed the connection]
Vercas3 has joined #osdev
gog has quit [Quit: byee]
bauen1 has quit [Ping timeout: 252 seconds]
<nikolar> Heh does it
bauen1 has joined #osdev
heat_ has joined #osdev
heat_ is now known as heat
<heat> gog
<heat> oh
* vdamewood roasts marshmallows on heat
<zid> it 24C.
<zid> Took until the solstice, but summer here
slow99 has quit [Quit: slow99]
slow99 has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
slow99 has quit [Quit: slow99]
housemate has quit [Quit: "I saw it in a TikTok video and thought that it was the smartest answer ever" ~AnonOps Radio [LOL]]
slow99 has joined #osdev
housemate has joined #osdev
housemate has quit [Remote host closed the connection]
housemate has joined #osdev
housemate has quit [Max SendQ exceeded]
Arthuria has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
gog has joined #osdev
vdamewood has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
housemate has joined #osdev
housemate has quit [Max SendQ exceeded]
slow99 has quit [Quit: slow99]
slow99 has joined #osdev
Arthuria has quit [Ping timeout: 256 seconds]
npc has joined #osdev
runxiyu is now known as Guest5141
Guest5141 has quit [Killed (zinc.libera.chat (Nickname regained by services))]
runxiyu_ has joined #osdev
runxiyu_ has quit [Remote host closed the connection]
runxiyu_ has joined #osdev
FreeFull has quit []
FreeFull has joined #osdev
aejsmith has quit [Ping timeout: 240 seconds]
aejsmith has joined #osdev
housemate has joined #osdev
housemate has quit [Remote host closed the connection]
housemate has joined #osdev
goliath has joined #osdev
housemate has quit [Read error: Connection reset by peer]
housemate has joined #osdev
Left_Turn has joined #osdev
Turn_Left has joined #osdev
Arthuria has joined #osdev
Left_Turn has quit [Ping timeout: 256 seconds]
Turn_Left has quit [Remote host closed the connection]
Turn_Left has joined #osdev
Turn_Left has quit [Ping timeout: 240 seconds]
housemate_ has joined #osdev
housemate has quit [Ping timeout: 268 seconds]
clever has joined #osdev
housemate_ has quit [Quit: "I saw it in a TikTok video and thought that it was the smartest answer ever" ~AnonOps Radio [LOL]]
housemate has joined #osdev
Left_Turn has joined #osdev
xenos1984 has quit [Read error: Connection reset by peer]
housemate has quit [Ping timeout: 268 seconds]
xenos1984 has joined #osdev
<nikolar> KERNAL
<Ermine> Oh no, got resume from suspend gpu failure again
<Ermine> Since it happens on kwin and never has happened on sway, all hail wlroots gang
node1 has joined #osdev
<nikolar> Kek
<nikolar> Does it happen on X
Left_Turn has quit [Ping timeout: 256 seconds]
<heat> i doubt the display server has anything to do with it
<heat> it's probably kwin getting his GPU into a state it fails to resume to
alpha2023 has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
alpha2023 has joined #osdev
<Ermine> kwin claims it's a kernal bug
<heat> well obviously
<heat> kwin's just using opengl, nothing fancy
<mjg> long time there was a great read
<mjg> how to report problems 'n shit
<mjg> it says to not claim there is a bug too easily
<mjg> tons of people using ze software, unlikely you ran into one!
<mjg> lul af
<Ermine> There's a bugreport actually on amdgpu bug tracker, I've checked in there
<zid> 'gpu failure' is always a kernel bug, is it not
Arthuria has quit [Ping timeout: 260 seconds]
node1 has quit [Quit: Client closed]
node1 has joined #osdev
Left_Turn has joined #osdev
node1 has quit [Client Quit]
Left_Turn has quit [Ping timeout: 256 seconds]
Left_Turn has joined #osdev
housemate has joined #osdev
netbsduser has joined #osdev
node1 has joined #osdev
emm has joined #osdev
<nikolapdp> KERBAL
<zid> KERBAL KERNEL is what my goal in life is
<nikolapdp> you can write in in kOS
<zid> I think writing it in perl would be more kerbal
<zid> or rust
<nikolapdp> how so
<nikolapdp> have you played ksp
<zid> ofc
<zid> perl is SUPER kerbal
<nikolapdp> the spacecraft are anything but safe
<nikolapdp> thus no rust
<zid> Like perl
<zid> Yea but they're also janky and hard to use
<zid> like rust
<zid> and can spontaneously abort
<nikolapdp> i find flying spacecraft more intuitive than rust:P
<zid> writing the rust is like using the spacecraft builder, you ned to use hidden options to get what you want, otherwise it just pretends to be easy
<zid> running rust is like flying the spacecraft
<nikolapdp> we should probably stop talking about rust, we'll trigger heat again
<zid> That's called re-entry
<GeDaMo> If you mix rust (iron oxide) with aluminium oxide you get thermite which burns hot :|
<nikolapdp> thus, the heat
heat_ has joined #osdev
<nikolapdp> we've summoned him
heat has quit [Ping timeout: 256 seconds]
npc has quit [Remote host closed the connection]
housemate has quit [Quit: "I saw it in a TikTok video and thought that it was the smartest answer ever" ~AnonOps Radio [LOL]]
housemate has joined #osdev
<nikolapdp> ILLUMOS
node1 has quit [Quit: Client closed]
node1 has joined #osdev
gbowne1 has joined #osdev
gbowne1 has quit [Remote host closed the connection]
<zid> is it monday yet
<GeDaMo> Calendar says no
gbowne1 has joined #osdev
<zid> shit
<nikolapdp> crap
<mjg> [= =
<mjg> wrong czanel
<zid> World is shit
<GeDaMo> Don't breathe in then :|
housemate has quit [Quit: "I saw it in a TikTok video and thought that it was the smartest answer ever" ~AnonOps Radio [LOL]]
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
<geist> chiselfuse: re: the AMD docs, looks like there's newer versions of them (april 2024) on AMDs site
<geist> but you're right, no where does it really mention ZMM or AVX512 in particular
MiningMarsh has quit [Quit: ZNC 1.8.2 - https://znc.in]
tomaw has quit [Remote host closed the connection]
tomaw_ has joined #osdev
tomaw_ is now known as tomaw
MiningMarsh has joined #osdev
<sortie> Hello
* sortie is speedrunning implementing POSIX.1-2024
<sortie> Sortix actually advanced enough that a lot of POSIX 2024 was already implemented before it was even released
<nikolapdp> how much is different between it and the previous one
<sortie> People were laughing at me when I implemented O_CLOFORK back in the day, and now it's actually in POSIX, and I'm probably actually the first operating system to implement it.
<sortie> nikolapdp: POSIX 2024 is honestly a mild upgrade to POSIX 2008, compared how POSIX 2008 was a big upgrade on POSIX 2001
<sortie> There's a lot of goodies in here though. I'm still going through the pdf and noting down all the new stuff. They have tables of new stuff in there, which are wildly inaccurate, and lots of new stuff is in there that they don't say is new unless you look at individual CHANGE HISTORY sections
<nikolapdp> maybe you should make a better tabD
<nikolapdp> table :P
MiningMarsh has quit [Quit: ZNC 1.8.2 - https://znc.in]
<sortie> Today I've implemented _Fork(, dladdr, getlocalename_l, memmem, pthread_cond_clockwait, pthread_mutex_clocklock, pthread_rwlock_clockrdlock, pthread_rwlock_clockwrlock, sem_clockwait, sig2str, str2sig, ALTMON_x, and ESOCKTNOSUPPORT, NSIG_MAX, and GETENTROPY_MAX.
<zid> did memmem actually change?
<zid> or did it just *become* posix, from C
<sortie> It's newly standardized, was an extension before
<zid> memmemmmem isn't C? :o
<zid> huh
<zid> yea, HUGE GAP
<nikolapdp> ?
<sortie> New POSIX 2024 features I already had in Sortix for a long time: getentropy, ppoll, qsort_r, reallocarray, strlcpy, strlcat, wcslcpy, wcslcat, dup3, pipe2, <endian.h>, O_CLOFORK, FD_CLOFORK, F_DUPFD_CLOFORK
<sortie> nikolapdp: Yeah I'm making a list of stuff as scan through the standard
<nikolapdp> nice
<nikolapdp> oh are we getting more _r functions
<sortie> Just qsort_r
<nikolapdp> ah
<zid> when do we get qsort as a gcc builtin
<nikolapdp> my guess is no
<zid> C++ people always make fun of C for it :(
<nikolapdp> how so
<zid> qsort slower than termplates
<nikolapdp> lel
<sortie> M_*l there's also a bunch of new long double constants, such as M_El with a high precision value of e
<zid> it needs a builtin to work fast
<sortie> neato bind to port 0 is now standardized as allocating a random port
<dostoyevsky2> nikolapdp: Are you already porting docker to pdp11?
<nikolapdp> why would i
<nikolapdp> i don't even like docker
<dostoyevsky2> idk bsd2.11 alone seems a bit boring in the long run, no?
<nikolapdp> nope
<dostoyevsky2> also, no systemd
<nikolapdp> good
<dostoyevsky2> I mean k8s won't even run without docker
<sortie> There's also a new PTHREAD_NULL, looks like it's just (pthread_t) 0
<nikolapdp> what's that for
<nikolapdp> initializer?
<sortie> A value that's unequal to any other thread id
<nikolapdp> ah oki
<dostoyevsky2> nikolapdp: If you had X11 then maybe 2024 could be the year of the pdp11 desktop
<sortie> REG_MINIMAL is also new for regcomp, preferring the shortest leftmost match
<sortie> SIGWINCH is now also standard which is nice (terminal size changed)
<sortie> Literally implemented that earlier this week lol
<sortie> Before I knew POSIX added it
netbsduser has quit [Ping timeout: 252 seconds]
xenos1984 has quit [Read error: Connection reset by peer]
goliath has quit [Quit: SIGSEGV]
<dostoyevsky2> hmmm.. wikipedia lists Linux as mostly Linux compliant... I thought they'd be fully compliant
<nikolapdp> linux is mostly linux compliant?
<dostoyevsky2> erm... wikipedia lists Linux as mostly POSIX compliant
<nikolapdp> heh
<nikolapdp> i was wondering what linux compliance meant :P
<nortti> gnu tooling makes some posix-noncompliant choices by default. see e.g. POSIXLY_CORRECT environment variable
<sortie> dostoyevsky2, there are also some various system level interfaces where Linux does things slightly differently, sometimes intentionally because it's better, or due to historical accidents that cannot be fixed, or because they refuse to do what POSIX mandates
<dostoyevsky2> Oh yeah, like sizes defaulting to 512bytes for df/du in POSIX
<sortie> For instance, the Linux kernel mailing list has a whole discussion and the consensus is that they refuse to implement O_CLOFORK even though POSIX just standardized it
<bslsk05> ​lore.kernel.org: Re: [PATCH v2] Implement close-on-fork - Matthew Wilcox
<bslsk05> ​lore.kernel.org: Re: [PATCH v2] Implement close-on-fork - Al Viro
<sortie> That is a big refusal though, most of it is more subtle differences
<sortie> Plus then there's a ton of error conditions and subtle behaviors that the standard technically specifies which the implementations may not implement correctly
<sortie> The standard is 4107 pages so no surprise if any implementation gets anything wrong even if they tried
<nortti> including stuff that's unix-certified, as heat_'s filesystem testsuite has shown
<dostoyevsky2> sortie: I always wondered how you are actually supposed to write portable shell scripts if there are always subtle differences between unix-like systems... so maybe posix actually might offer some guidance there
<sortie> POSIX is a huge part of the solution there
<sortie> POSIX defines a lot of the semantics of how the command line utilities work
<sortie> These generally agree. It's usually just a few well known things like 512/1024 defaults that differ.
xenos1984 has joined #osdev
<sortie> Although admittedly if you want to write a portable shell script, you usually end up relying on a few defaults that are consensus
<sortie> *few details
<sortie> E.g. POSIX has almost no opinion on the filesystem hiearchy
<sortie> “Austin Group Defects 188 and 1394 are applied, changing getenv( ) to be thread-safe.” ← Oh hey getenv is thread safe now.
<mjg> ... :d
<mjg> 1. don't use getenv
<sortie> getenv is fine
<mjg> in a mt prog?
<mjg> worst case you getenv your stuff upfront
<mjg> and be done with it
<mjg> there is nothing *sensible* a program can do for "mt-safe" state of getenv to be relevant
<sortie> getenv is fine in a multi threaded program
<sortie> It's setenv that's the problem in a multithreaded program
<nikolapdp> well, using both
<sortie> In such a program, you want to either carefully setenv after e.g. fork, or better yet, iterate environ and construct your own amended environment
<sortie> nikolapdp: Two concurrent setenv's will also explode, even if getenv is never used
<nikolapdp> true
<mjg> setenv is my point
<mjg> like wtf is either getenv implementation doing or the program doing for the "mt status" of that routine to matter
MiningMarsh has joined #osdev
<mjg> any program trying to fuck with itself by calling setenv in one thread and getenv in another deserves to see arbitrary bs or crash
<mjg> setenv is only of any use if you are about to exec
<sortie> The important part is that POSIX defined that getenv is never safe in multi threaded programs, and now they define reality that it is actually safe if used correctly
<mjg> on that front getenv is of any sensibility when you set up the program
<sortie> So it's only setenv that is the unsafe one
<mjg> do they explicitly specify mixing both does not work?
<zid> so presumably to be compliant before, you had to getenv everything into a local copy before all the threads started, then implment your own thready setlocalenv?
<sortie> They only need to say that setenv is not thread safe
<zid> now you only need to do that if you use setenv, not if you use threads
<mjg> all that env stuff is a shite concept anyway
<sortie> The environment is a solution to particular problems
<mjg> well the concept is not utterly bogus on its own, but the realities of hte implementiont definitely are
<mjg> total classic with env is typos in var name
<sortie> The environment is not a solution to most problems
<mjg> which is impossible to check for
<zid> yea I'm not sure you'd ever actually do what I described
<zid> cus.. why fuckin bother
<sortie> It is unfortunately a bit overused by people that should've used options or configuration files
<mjg> yep
<zid> It's useful for option injection into makefiles and stuff at least
<mjg> fortunately we are at least past the era where env was inherited from /etc/init.d/apache start lol
<mjg> or whatever the fuck you decided to start
<zid> ld.so taking a bunch of env options is great
<mjg> total classic: stuff works started from the shell, does not work on reboot
<mjg> all of env stuff is self-induced trouble
<mjg> i am not even going to rant about the loader
<sortie> Oh hey MAP_ANON and MAP_ANONYMOUS are POSIX now
<mjg> is posix even moving to a direction where you can write a fast network program in it
air has quit [Ping timeout: 268 seconds]
<dostoyevsky2> so If I have multiple threads and they'd be using getenv/setenv as a k/v database to nosql between each other that would be possible now with the new posix 2024?
<mjg> mon
<zid> no because setenv is still no good
<mjg> getenv and setenv code tends to be slower than faster
<mjg> it is not meant to be used much
<zid> but at least getenv is guarenteed to work if you don't do dumb shit!
<sortie> mjg: Best it has to offer is ppoll
<mjg> right
<mjg> part of the point i'm making here is that posix can't provide a fast multiplexing routine
<sortie> Which was sorely needed, so a poll main loop can also handle signals
<mjg> the de facto standard is epoll becuase linux, but epoll is utter dogshit which even linux people concede
<mjg> so you would need tomsething like kqueue
<mjg> but good luck convincing linux to add it
<sortie> mjg: In POSIX's defense, this is a good thing. It's up to BSD & Linux to build a good API and get consensus on it.
<mjg> et voila, you will never be able to make a non-sucky posix program handling multiple fds
<sortie> I promise it will be worse if POSIX invented an API for you.
<sortie> posix_kpoll
<mjg> it will never happen because linux got a "it is shite but ultimately works" api
<nikolapdp> that's not wrong
<mjg> sortie: general point being the standard is linux, continued posix existence is some committee cicrlejerk
<sortie> mjg: Yeahj I disagree
<mjg> linux can decide to nak anything they want and there it goes
<sortie> They did do that with O_CLOFORK
<mjg> well see O_CLOFORK for an example yhou linked yourself
<sortie> It'll be interesting to see how that plays out
<mjg> one dude over there had the right point: fork + exec is a shite model
<mjg> so O_CLOFORK only deals with a self-induced problem
<sortie> posix_spawn does exist
<mjg> that's vfork + exec in practice
<mjg> :d
<mjg> i don't know how good that is even if not implemented like that
<mjg> oooff spawn de facto requires the forking step?
<nikolapdp> how so
<mjg> The posix_spawn() and posix_spawnp() functions support a small, well-defined set of system tasks that the child process can accomplish before it executes the executable file.
<clever> that reminds me, i was messing with risc-v32 musl nommu, and discovered a rather glaring flaw in linux (and musl)
<clever> its nommu, so you must use vfork, no fork for you!
<clever> 1: musl lacked some vfork stuff on rv32, so it defaulted to standard fork()
<clever> 2: linux allowed that, trashed its own state, and paniced :P
<immibis> mjg: it can be implemented as fork/stuff/exec, but it can also be implemented as a complete unit by the kernel
<sortie> Sortix is probably the first system have MSG_CMSG_CLOFORK lol
<immibis> compromise: all FDs are closed on exec except the ones you meant to keep, but FDs can be stored in environment variables
<mjg> sortie: looks like solaris has it
<mjg> when did you add it
<sortie> mjg: 2021-12-28 it looks like (but probably older, file descriptor passing was WIP for many years) but OK that is because I didn't have file descriptor passing for the longest time
<sortie> mjg: I had SOCK_CLOFORK since 2013-03-19
<bslsk05> ​blogs.oracle.com: fw_error_www
<mjg> 2020 vintage
<mjg> aight let's search for SOCK_CLOFORK on darwin
<mjg> they don't have *that* specifically
<mjg> so you indeed may be first
<mjg> looks like solaris did not add it either
<bslsk05> ​docs.oracle.com: socket - man pages section 3: Basic Library Functions
<mjg> my bad, i assumed they would add it in one go
<mjg> aight you beat SOLARIS
<sortie> I PREDICTED POSIX 2024 BY 11 YEARS
<mjg> you got also get-prenaked by about 7
<mjg> on linux
<sortie> get-prenaked?
<mjg> huh
<mjg> you also got pre-naked by about 7
<sortie> I don't know what that means
<mjg> they naked the stuff on linux in 2020
<immibis> that's before you take your clothes off, i guess
<sortie> naked?
<immibis> oh nacked
<immibis> NAKed
<sortie> Stubbed?
<sortie> AH
<sortie> NAK
<mjg> in openbsd they "ok" everything
<mjg> in linux they NAK
<mjg> Hey Linus!
<mjg> -NAK!
<immibis> Hey Linus!
<immibis> [TCP retransmission of frame sent 12:14:31 am]
<mjg> dude probably has a one-button "NAK" reply on this phoen
<mjg> his phone
<sortie> Admittedly it is important to have people that can say no to bad ideas
<mjg> this is why i miss Drepper in glibc
<mjg> as utterly shite as the c-style is over there, dude at least gatekept some bs
<mjg> the one you can see as the end user
<sortie> > Austin Group Defect 1462 is applied, changing time_t to have a width of at least 64 bits.
<sortie> HOLY SHIT
<sortie> 2038 APOCALYPSE CANCELED
<zid> smh Y292B problem still there
<mjg> how to dodge the Y2K problem: POSIX declared the year has to be stored as a 4 digit number
<mjg> problem avoided
<mjg> this is why the world did not go down
Arthuria has joined #osdev
emm has quit [Quit: WeeChat 4.3.3]
<immibis> mjg: but what about wayland where they constantly say no to reasonable ideas
<immibis> like windows having icons in them
<mjg> dude i'm on a tiling wm
<mjg> what fucking icons
<mjg> seams sane to me
<mjg> NAK
<sortie> Fuck I can't believe POSIX.1-2024 added LOG_UPTO I can't believe they got their emergency priorities like that
<mjg> are you getting sortix posix-certified?
<mjg> i had no idea the syslog family is part of posix :O
<sortie> I'm sorry these are Jeopardy rules, you have to have to phrase your statement about LOG_UPTO in the form of a question
<mjg> "what is a syslog priority added by the new posix issue"
<sortie> Nothing much, you?
<mjg> what is one of the answers in the "wassup" commercial series
<mjg> or am i misremembering :X
<bslsk05> ​www.urbandictionary.com: Urban Dictionary: mon
<immibis> what's LOG_UPDOG? nothing much, LOG_YOU?
<mjg> :X
<mjg> i should have known
<sortie> Thank you immibis
<sortie> Alright that gets me through 270 pages of POSIX-1.2024 defining every single header in POSIX and I found all the new interfaces and definitions.
node1 has quit [Ping timeout: 250 seconds]
<sortie> Fun fact: The official list of new POSIX functions is missing half of the new functions.
<immibis> should have called it POFIVEANDAHALF
<sortie> It really says something that off the top of my head I can tell whether any given symbol is in POSIX or not
<immibis> i'll shut up now
<mjg> so i think i got a decent idea
<mjg> how to handle fds vs exec
<sortie> 20 commits today to implement POSIX 2024. Nice.
<mjg> there could be a system call to create an empty file descriptor table, giving you a fd to interact with it
<mjg> you could fcntl whatever fds you have into it
<sortie> closefrom(2)
<mjg> create whatever layout you want
<mjg> finally when doing an exec or shit you would tell the kernel you already have a table and which fd represents it
<mjg> there
<mjg> arbitrary fucking state of the table sorted out
<mjg> nobody sneaking in any fds unless you have code actively trying to fuck itsel over
<mjg> ... by modifying the new table in unwanted ways
<childlikempress> posix 2024? they're still making new posixen? why??
<mjg> ofc make it illegal to install the fd into it
<mjg> fdt able it
<mjg> childlikempress: maybe they are prepping to fuck up mutexes even mroe
<sortie> Only change they did was pthread_mutex_clockwait which was a key improvement
<mjg> nobody sane uses pthread mutexes mate
<sortie> childlikempress: It's important to gradually evolve the standard, make some fixes to it, add stuff there's new consensus on among implementations, etc
<mjg> who even claims to implement posix anymore
<mjg> apart from solaris
<sortie> That part is actually fairly irrelevant
<dostoyevsky2> mjg: aix hpux irix
<mjg> what makes it important to evolve the standard
<sortie> Yes nobody actually gets those certs as far as I know
<sortie> But the important part is that all of the community operating systems have a document to look to when there's disagreement on semantics
<sortie> It also helps new players such as me get up to speed
<mjg> if you want a speed up pass lkp
<mjg> erm ltp
<sortie> The biggest value is to people that want to write portable applications
<mjg> this would be a great argument up until about 2005 or so
<mjg> who cares now
<sortie> Again, me.
<sortie> Just because you don't see any value to you does not mean it doesn't have a big value
<sortie> I ported over 80 pieces of key software to my OS
<mjg> i am saying the people out there writing stuff only eer target linux
<sortie> POSIX is why that is possible
<dostoyevsky2> sortie: seems to be solved by newer programming languages to write more portable code
<mjg> linux being quasi-posix is what made it possible
<sortie> More or less, probably more on the less side
<sortie> But rather that a lot of key programs *are still being written to be portable to operating systems in practice*
<sortie> Say perl, python, or sshd doesn't compile on my OS? If I'm following POSIX, I can file a bug.
<sortie> You gotta remember that 99% of software doesn't matter
<sortie> So what there's a trash heap of Linux specific stuff?
<mjg> if something like python cares about it that's interesting
<sortie> Doesn't really matter
<childlikempress> 'can file a bug' only if perl/python/sshd claims to support posix
<mjg> sshd being a bsd project and perl being an old yeller i see why they would are about some portability
<sortie> childlikempress, generally every single piece of core operating system software cares about being portable to Linux and the BSDs
<mjg> does posix copy_file_range?
<childlikempress> posix compatible firefox when
<sortie> childlikempress: Graphics is out of the scope of POSIX
<mjg> ah the c standard route
<sortie> Again these programs generally does not care about POSIX specifically, or restrict themselves to POSIX, but they care about being portable to the common operating systems.
<mjg> i agree something rust runs on a surprising number of systems
<mjg> pertyt niche at times even by bsd standards
<sortie> So if they end up using a Linux extension, you can file a bug saying that's not in POSIX, and perhaps you can find a way to make it more POSIX compatible. Or you can implement the extension. I do that too.
<mjg> but then if you check the amount of hacks in there you will see the posix thing is not thinging
<sortie> What actually matters is "the consensus Unix interface where Linux & BSD agree"
<sortie> It's a real thing that evolves as each system propose extensions and if they're any good, the other ones will implement them, and then sometimes those gets submitted to POSIX if there's consensus
<sortie> A lot of the new stuff in POSIX 2024 is stuff that got consensus and then got standardized so the last remaining systems have to add it too
<dostoyevsky2> > Very few BSD and Linux-based operating systems are submitted for compliance with the Single UNIX Specification, although system developers generally aim for compliance with POSIX standards, which form the core of the Single UNIX Specification.
<dostoyevsky2> I wonder if they could do something about making more OpenSource OSes compliant also
<dostoyevsky2> But I guess in practice it just works well enough
<childlikempress> mjg: re mutex, tbh i don't care if posix fucks it up further; just spec futexes :P
<childlikempress> actually c++ apparently has them, but they screwed it up :p
<heat_> mornin linux useren
<mjg> mornin?
<sortie> Hello heat_
<heat_> yes mjg it's 00:04
<sortie> heat_, many new POSIX 2024 discoveries, I tagged you in a bunch
<heat_> aka MORNING
<heat_> i see there's a big backlog
<sortie> heat_: I found wild things in there :D
<heat_> >file lock
<heat_> useless
<dostoyevsky2> sortie: Wild things is exactly the stuff you want to find in standards
<heat_> endian.h is cool
<heat_> >mkostemp, ptsname_r, secure_getenv, WCOREDUMP..
<heat_> all alright
<heat_> >MAP_ANON and MAP_ANONYMOUS
<heat_> lmfao ofc that wasn't standard
<heat_> accept4 is nice
<heat_> 64-bit time_t is problematic on many systems but okay i guess
<sortie> heat_: 32-bit time_t is gonna be problematic in (checks notes) 14 years so...
<dostoyevsky2> Are any members of opensource OSes actually in the POSIX comittee?
<heat_> yes
<heat_> red hat has a guy
<heat_> i think
<dostoyevsky2> but they can't certify any linux/bsd as POSIX compatible?
<sortie> Lest I give anyone here bad ideas, anyone can submit proposals to POSIX
<heat_> linux is not POSIX compatible
<heat_> sortie, yes and our love4boobies friend just made POSIX useless with O_CLOFORK
<mjg> :d
navi has quit [Ping timeout: 268 seconds]
<sortie> heat_: It remains to be seen how that plays out. I am curious.
<heat_> if anyone is not stubborn and changes their mind frequently, it's linux maintainers!
<sortie> If Linux refuses, they might end up putting it in an option
<heat_> seriously what's LOG_UPTO
<heat_> is it like LOG_UPDOG
<sortie> Nothing much, you?
<heat_> lol
<heat_> is it actually a thing though?
<heat_> it is. fuck that lol
<sortie> <syslog.h> LOG_UPTO(pri) mask for all priorities from LOG_EMERG through pri inclusive in the order listed in the list of priority symbolic constants below. Any additional implementation-defined priorities not included in the list below shall not be included in the mask.
<dostoyevsky2> sortie: I amma submit a batman() system call to let the OS project a bat symbol on the clouds, e.g. AWS or GCP or Azure
<heat_> dostoyevsky2, also note that POSIX certification is near-useless and would mean you can't update any of the involved software
op has joined #osdev
<heat_> and you also need to pay the big dollars to the cartel the great austin group
<sortie> niht
<sortie> heat_: Beself.
<heat_> sortie, niht
<sortie> heat will take it from here.
<mjg> is DOCKER posix compliant?
<sortie> is DOCKER a sandwich or soup?
<heat_> is DOCKER a fruit or a vegetable
<sortie> is DOCKER a container or a whale
<mjg> what was first: webdev or docker
<heat_> webdev
<dostoyevsky2> mjg: I think you capslocked that sentence incorrectly
<heat_> no dostoyevsky2 you need to pay us big dollars so you can get the certification testsuite for the DOCKER(TM) trademark
<heat_> hth
<mjg> are DOCKER containers posix-ceritified?
<mjg> i am not running shit until they are
<heat_> depends
<heat_> adelie linux is trying to be POSIX certified i think
<mjg> ? :D
<dostoyevsky2> mjg: Docker doesn't even run on posix-compliant OSes... It's linux only, if you run docker anywhere else it's wrapped into a linux vm
<mjg> but the stuff inside might be only using posix interfaces
<heat_> mjg,
<bslsk05> ​git.adelielinux.org: src/unistd/renameat.c · posix-compliance · Adélie Linux / musl · GitLab
<heat_> this branch is full of similar hacks to make it POSIX compliant, cuz the kernel surely isn't
<Ermine> oh, mjgspeak got on urban dictionary?
<heat_> quick someone add OPTIMAL and depessimize
<mjg> dude
<mjg> i picked up 'mon' from somewhere
<mjg> just like 'depessimize' and some of the other stuff
<heat_> al viro's school of english
<heat_> plonk
<heat_> or was it plop? whatever
<mjg> that's where i picked up 'cunt'
<mjg> plonk mofo
<mjg> here is a mneominic for you
<mjg> remember what you want to write and know it's the other thing
<mjg> done
<heat_> mneominic lol typo haha get owned
<mjg> johny mnemonic
<mjg> (actual movie too)
<mjg> btw Ermine do you think 'mofo' is mjgspeak?
<mjg> arguably 'mofer' is
<Ermine> idr anyone else using either of those words
<Ermine> so yes
<heat_> i say mofer
<heat_> checkmate
<Ermine> you say OPTIMAL too
<mjg> you picked it up from me dawg
<heat_> depemissimize
<heat_> depessimize
<mjg> Ermine: 'mofo' is defo standard
<mjg> haha typo lol owned
* Ermine picks an illumos distro
<mjg> ('defo' is also standard)
<heat_> i typo'd, my life is ruined smh
<mjg> now which fucker came up with KERNAL
<mjg> was not me
<heat_> osdev forum trolls saying kernal
<Ermine> some commodore mofer
<mjg> mon
<Ermine> :]
<heat_> mon when are you and dalias clashing? i can't wait
<Ermine> > The Open Source Enterprise Server OS with just the features you need
snappy has quit [Ping timeout: 252 seconds]
<heat_> tell me in advance so i can go buy some popcorn
<Ermine> yeah we need to get popcorn ready
<Ermine> Now I wonder if anybody uses illumos in real world setups
<heat_> yes
<zid> If they did it wouldn't be a real world setup
<heat_> oxide
<zid> it'd be a toy setup
<Ermine> So we can contact them and ask to use onyx instead
<heat_> mr cantrill have you considered ditching your bad unix for mine? thanks
<mjg> joyent used to... then samsung reprovisioned everything as linux
<mjg> how did that happen
<heat_> joyent lost its joy and became ent
<mjg> the new illumos fork is named HELIOS
<Ermine> sadgent
<mjg> the one from oxide
<childlikempress> bitches born after 1990 can't joy, all they know is ent😔
<zid> what's ent
<Ermine> f u bitch
<zid> I'm born before 1990, shouldn't I know
<mjg> i'm neither born after 1990 nor a bitch
<heat_> mjg: isn't helios something else?
<mjg> heat_: you may be thinking about their rust microkernel or some shit
<heat_> i am
<mjg> i don't remember how they call that
<Ermine> s/rust/hare
<mjg> probably bonwick's arse
<Ermine> Drew's microkernel
<heat_> bonwick's not with them :(
op has quit [Remote host closed the connection]
<mjg> "hubris"
<heat_> last i read bonwick went heavy into storage
<heat_> and now he's like an investor or some shit
<mjg> he made big bucks scamming EMC into buying it
<heat_> it's what happens when you take the zfs crack
<mjg> or maybe they scammed htemselves
<mjg> it was not zfs
<zid> ZFS users are 20x more likely to have suffered catastrophic data loss
<zid> just saying
<mjg> was some custom hw+sw solution for some weird-ass i/o setup
<zid> correlation there
<mjg> which turned out to not have any market for
* Ermine downloads openindiana
<mjg> it required the end application to explicitly know how to use it
<mjg> Ermine: dafuq
<heat_> indiana voted top 5 worst US states
<mjg> and top 5 worst illumos distros
<Ermine> there isn't OpenWest Virginia
<mjg> (there are 5)
<Ermine> and no OpenOregon
<heat_> OpenUtah
<mjg> there is however OpenAlabama
<heat_> OpenOhio
<mjg> i hear they have an init system in php
<Ermine> Wait, are all OSen OpenOhio?
<heat_> onyx is openutah
<heat_> we do be soakin out here
<Ermine> there are 9 illumos distros though
<heat_> mjg, mon explain something
<mjg> :O
<mjg> nein
<heat_> what kind of workload causes a cow chain/fork chain or whatever
<mjg> some of that shit is de facto dead MON
<mjg> heat_: you mean how do you end up with deep vm object chains?
<heat_> yes
<heat_> or analogous problems
<mjg> to my undestanding this only happens with userspace actively trying to be PESSIMAL
<heat_> what kind of workload does fork->fork->fork->fork->fork->fork
<heat_> ok so why is it a big problem?
<mjg> they *can* do it
snappy has joined #osdev
<Ermine> Don't superservers fit the description?
<mjg> what superservers
<heat_> In the actual program (running as a daemon), a child is reading data
<heat_> while its parent is processing the previously read data. At any time
<heat_> exiting and new processes being fork()ed.
<heat_> there are only a few processes in existence, with older processes
<Ermine> they fork for each connection
<heat_> i'm flabbergasted
<mjg> Ermine: if they exit or exec after that's of no consequence
<Ermine> never saw deep process trees
<heat_> anyway i'm asking cuz linux has rediscovered this stupid problem (for anon_vmas and anon_vma_chains) quite a few times, in different forms
<mjg> i don't know what linux is doing with anything there
<mjg> i was talking ze bsd land
<mjg> with ze mach vm
<heat_> anon_vma_chain was a change around 2010 cuz "yoo what if you fork 1000 processes, and CoW a different page each process, now an anon page rmap lookup needs to go through 1000 processes!"
<heat_> which is the kind of problem that makes me wonder wtf is up in the real world that these are real problems
Left_Turn has quit [Read error: Connection reset by peer]
<bslsk05> ​'i n f i n i t e DRAGON DREAM FEET - The original' by LENNOZ (00:00:24)
<heat_> and then in that message i posted, someone figured out that fork->fork->fork->fork->fork creates a deepening chain of anon_vmas (and they had to solve that)
<heat_> somewhere they also realized linked lists are not okay and now they're using an interval tree, which is OPTIMAL but it again makes me wonder what the actual scale of these issues is
<bslsk05> ​'Zlad! - Elektronik Supersonik (Official Video) [HD REUPLOAD]' by Working Dog Productions (00:03:05)
<heat_> it is worth noting that this is anon memory hence FORK
<mjg> i don't know of any legitimate usage where a forked process forks again and so on
<mjg> Ermine: you are hailing from .ru, right?
<bslsk05> ​'РЕПЕР СЯВА - ОТДЫХАЕМ ХОРОШО' by СЯВА (00:02:51)
<mjg> klassiKK
<Ermine> oh fuck
<Ermine> never heard of this shit
<mjg> dude what
<mjg> fucking klassikk this side of the border
<Ermine> in .pl?
<mjg> da
<Ermine> lol
<heat_> mjg, if there's no legitimate use of a forked process forking, why are CoW chains such a big problem in mach vm?
<mjg> fuck knows what happened in vm
<mjg> as for ze bsds the problem is that fuckers can make them if the ywant
cow321_ has joined #osdev
<mjg> here is a funny scenario
<mjg> fork
<mjg> fork again
<mjg> the mid-process execves "/bin/true"
<mjg> the bottom child now has a chain of 3 vm objs
cow321 has quit [Ping timeout: 268 seconds]
<mjg> do the fork + parent exec thing in a loop
<mjg> and the chain just keeps growing