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
<zid> banned :(
gog has joined #osdev
vdamewood has joined #osdev
lanodan has joined #osdev
vdamewood has quit [Ping timeout: 246 seconds]
gog has quit [Quit: byee]
navi is now known as navi-foo
vdamewood has joined #osdev
navi-foo is now known as navi
<mjg> lol
<mjg> fedora/vdamewood
<mjg> what gives mate
<mjg> are you a contributor
vdamewood has quit [Ping timeout: 255 seconds]
navi is now known as navifoo
ThinkT510 has quit [Ping timeout: 264 seconds]
ThinkT510 has joined #osdev
foudfou_ has joined #osdev
foudfou has quit [Ping timeout: 260 seconds]
navifoo has quit [Quit: WeeChat 4.2.1]
vdamewood has joined #osdev
vdamewood has quit [Ping timeout: 264 seconds]
housemate has quit [Quit: "I saw it in a TikTok video and thought that it was the smartest answer ever" ~AnonOps Radio [LOL]]
vdamewood has joined #osdev
vdamewood has quit [Quit: Life beckons]
mavhq has quit [Remote host closed the connection]
<zzo38> Matrices can be useful for some kind of calculations. (For example, you can compute the derivative of a function f(x) by passing f([x,1;0,x]) instead; the result will be [f(x),f'(x);0,f(x)].)
mavhq has joined #osdev
<zzo38> Also, to use macros (or any other language features) in Haskell, you must add a declaration at the beginning of the file of what language features you are using, so you can easily tell which files will use macros by the top of the file. Also, I think macros are much less often used in libraries than they are in C, so it is less likely that you will have to use them.
<kof673> re: returning structures... i might just do "out" parameters struct foo * ret_foo or even.... void * * ret_vp (must not be NULL, if *ret_vp then user already allocated, else on success, *ret_vp points to where malloc()-allocated
<zzo38> I do often do things like that, although sometimes returning structures directly (especially small structures) makes sense.
edr has quit [Quit: Leaving]
<kof673> yeah, i typically just put in separate out parameters :D i know it costs a dereference...but that is my habit because sometimes with say 4 args, i let user pass NULL for "don't care for that return value" .... so they can get just the part(s) they want, and then the return value is for success/error/specific error/whatever
<kof673> not saying that is good...just why i rarely would end up with returning a structure...it is either * (null on failure) or return value (success/failure/etc.)
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #osdev
heat_ has quit [Ping timeout: 256 seconds]
smeso has quit [Quit: smeso]
smeso has joined #osdev
<childlikempress> 'you can compute the derivative of a function f(x) by passing f([x,1;0,x]) instead; the result will be [f(x),f'(x);0,f(x)]' what does this mean
alpha2023 has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
<childlikempress> presumably f is a function defined over scalars so what does it mean to pass a matrix into it
alpha2023 has joined #osdev
Vercas3 has quit [Quit: buh bye]
Vercas3 has joined #osdev
lentement has joined #osdev
Vercas3 has quit [Client Quit]
Vercas3 has joined #osdev
<zzo38> It can still work; e.g. (x^3-10x^2) is still meaningful with matrices, because you can multiply a square matrix by itself, and you can multiply by scalars, and add/subtract a scalar multiple of identity matrix, and can add/subtract matrices of the same size.
<zzo38> Also e^x also you can do it because e^x = x^0/0!+x^1/1!+x^2/2!+x^3/3!+x^4/4!+... so that also will be possible to calculate with matrices, too.
Vercas3 has quit [Client Quit]
Vercas3 has joined #osdev
[Kalisto] has quit [Quit: Ping timeout (120 seconds)]
[Kalisto] has joined #osdev
Vercas3 has quit [Client Quit]
Vercas3 has joined #osdev
<childlikempress> ok, so it obviously works for +- and *k. i convinced myself it works for *x (general exponentiation) if you turn it into matrix multiplication/exponentiation https://0x0.st/XAnW.txt. i find your taylor series argument convincing. but now i need to taylor-ify everything so meh
<childlikempress> more generally it seems like there must be some underlying structure revealed here but i don't understand what
Vercas3 has quit [Quit: buh bye]
chase_osdev has joined #osdev
Arthuria has quit [Ping timeout: 268 seconds]
Vercas3 has joined #osdev
lentement has quit [Remote host closed the connection]
Vercas3 has quit [Client Quit]
Vercas3 has joined #osdev
chase_osdev has quit [Ping timeout: 268 seconds]
goliath has joined #osdev
Matt|home has joined #osdev
lentement has joined #osdev
lentement has quit [Ping timeout: 256 seconds]
lentement has joined #osdev
lentement has quit [Ping timeout: 255 seconds]
neo has quit [Read error: Connection reset by peer]
neo|desktop has joined #osdev
pg12 has quit [Ping timeout: 240 seconds]
pg12 has joined #osdev
gbowne1 has quit [Quit: Leaving]
netbsduser has joined #osdev
CryptoDavid has joined #osdev
nick64 has joined #osdev
GeDaMo has joined #osdev
childlikempress has quit [Ping timeout: 252 seconds]
bauen1_ has quit [Ping timeout: 268 seconds]
childlikempress has joined #osdev
theyneversleep has joined #osdev
Nixkernal has quit [Ping timeout: 268 seconds]
Nixkernal has joined #osdev
xvmt has quit [Read error: Connection reset by peer]
Nixkernal_ has joined #osdev
<sortie> <heat_> sortie just banned passing some types of fds (unix sockets) for sortix which is technically ok i guess
Nixkernal has quit [Ping timeout: 272 seconds]
<sortie> nikolapdp: I only ban sending an unix socket over another unix socket, if it already has any fds being sent on it
<mjg> is this the easy way out
<nikolar> how often does that happen anyway
<nikolar> passing sockets over sockets
xvmt has joined #osdev
<mjg> it only happens with people trying to fuck with the system
<nikolapdp> so basically it's a feature to prevent you from doing that
<mjg> makes sortix literally unusable
<mjg> windows93.net is my only os now
<sortie> Basically it prevents cycles. If a Unix socket has a fd being sent on it, you cannot send that fd over another Unix socket (until the original socket is free of fds).
<nikolapdp> what are you running it on mjg
Nixkernal_ has quit [Ping timeout: 264 seconds]
<sortie> nikolapdp: Imagine a e.g. an init style daemon spawner that listens on all the unix sockets, and spawns processes in time, transferring the sockets to the processes over a communication channel
<mjg> sortie: easy way out
<mjg> nikolapdp: GNU/onyx
<sortie> mjg, alternative is garbage collection, in my reference cycled kernel??? I think not!!
<kazinsal> "sending a unix socket over another unix socket"
<kazinsal> yo dawg
lentement has joined #osdev
<mjg> funny part in the area is that old bsds used to have a global list of file pointers
<mjg> all allocated file pointers
<mjg> as in you fd_alloc or similar and it gets added there
<sortie> Like heat pointed out last night, they actually implemented this with garbage collection in v7 unix
<mjg> solely for ccle scans
<kazinsal> there's a lot of real clever stuff implemented in bizarre ways in ancient unix
<sortie> In my OO designed kernel, doing garbage collection would actually be quite hard
<mjg> i wonder how would this look like RUST
<kazinsal> iirc the pre-v6 file system uses recursion in its block allocation algorithm
<kazinsal> to save space on disk
lentement has quit [Ping timeout: 260 seconds]
pebble has joined #osdev
pebble has quit [Client Quit]
bauen1 has joined #osdev
<immibis> sortie: that sounds like a reliability nightmare more than a garbage collector is. Sending a Unix socket FD could fail at any time.
<immibis> and then what are you supposed to do about it?
<sortie> immibis: There is a reasonable predictable rule
<immibis> read and discard messages until sending succeeds?
<sortie> Basically you would have a situation where Unix Socket A contains Unix Socket B which contains file descriptor C
<sortie> I imagine it's very rare in the first place to send a unix socket over a unix socket
<immibis> I don't imagine it's that rare. It will be very rare in your OS because it suffers from failures caused by race conditions that applications can't do very much about.
<sortie> And if you do so, Unix Socket A is usually an important communication channel designed for this, and Unix Socket B is not, it's just a more regular one. And Unix Socket B is probably still being set up and isn't activated and used yet, i.e. there wouldn't be a File Descriptor C on it
<nikolapdp> so you only allow i imagine you'd becompletely fine forbiding sockets over sockets
<sortie> I do allow sockets over sockets, and it is a useful and powerful feature, it just has that one restriction
navi has joined #osdev
<kazinsal> one of these days I should probably read up on the semantics of unix sockets
<kazinsal> I don't think I've ever actually written any code that uses them
<nikolar> what i meant is that you could probably forbid it and not even notice
<sortie> Yet I don't want to restrict things more than I need to since it is a powerful and useful facility
<immibis> yeah so imagine that init daemon you mentioned. If any server program receives FDs on its unix sockets (e.g. dbus server, x11 server) it can't possibly be used with this unit system because it will randomly fail to transfer the socket to the new process based on the client's timing.
<sortie> But garbage collection is extremely difficult to implement in my kernel and it would only handle one super rare weird corner case
<sortie> That is a fair point
<immibis> Linux also has a garbage collector in it for this one super rare weird corner case.
<sortie> But sending a file descriptor immediately on a first date is considered rude
<immibis> then you are inventing weird rules
<sortie> I hear you
<immibis> like you can't run dbus, only sortie-dbus
<immibis> which is a variation that makes sure to do a round trip before sending any FDs
<sortie> I don't do that kind of socket stuff in my init though
<nikolapdp> why would you want to run dbus anyway, sounds like a feature :P
<sortie> It has full dependency tracking and starts daemons up in the right order
<immibis> actually dbus sends creds on its first byte, not FDs, but you can probably send FDs on the first round trip in some scenario
<immibis> or imagine a different authentication option that uses an FD
<sortie> But again: It is extremely difficult for me to implement garbage collection. The entire kernel is built deeply around reference counting and encapsulated object oriented principles with private fields and interfaces. It's not designed for outsiders to go poke and recognize internals.
<sortie> I build loads and loads and loads of kernel stuff where nothing ever needed this and then very late game I realize this obscure edge case was supposedly a requirement?
<sortie> For a case that's super rare and I can forbid?
<sortie> If anything breaks, I'm sure I can find solutions
<sortie> Even if it is sortie-dbus
<sortie> Cus I can patch any ports I want
<nikolapdp> PATCHEN
bauen1 has quit [Ping timeout: 240 seconds]
runxiyu_ has quit [Quit: ZNC 1.8.2+deb3.1 - https://znc.in]
runxiyu_ has joined #osdev
Benjojo has quit [Ping timeout: 256 seconds]
SanchayanMaity has quit [Ping timeout: 255 seconds]
nohit has quit [Ping timeout: 256 seconds]
pax_73 has quit [Ping timeout: 256 seconds]
mcrod has quit [Ping timeout: 256 seconds]
geist has quit [Ping timeout: 255 seconds]
cuppajoeman has quit [Ping timeout: 255 seconds]
sskras has quit [Ping timeout: 256 seconds]
danlarkin has quit [Ping timeout: 256 seconds]
kkd has quit [Ping timeout: 255 seconds]
nick64 has quit [Ping timeout: 268 seconds]
jbowen has quit [Ping timeout: 272 seconds]
kazinsal has quit [Ping timeout: 268 seconds]
CryptoDavid has quit [Ping timeout: 268 seconds]
bauen1 has joined #osdev
kazinsal has joined #osdev
Benjojo has joined #osdev
nick64 has joined #osdev
pax_73 has joined #osdev
CryptoDavid has joined #osdev
mcrod has joined #osdev
SanchayanMaity has joined #osdev
jbowen has joined #osdev
sskras has joined #osdev
cuppajoeman has joined #osdev
danlarkin has joined #osdev
kkd has joined #osdev
geist has joined #osdev
nohit has joined #osdev
heat has joined #osdev
<heat> sortie, i don't see how implementing unix socket gc would be any harder than it is on existing C kernels
<heat> they have refcounts too, and the OO stuff should simply be a non-factor as well
<sortie> heat: OO stuff is a big reason why it's not easy
<sortie> It means e.g. the Unix socket class has to go poking through the private encapsulation of the file descriptor class, through the vnode, and then back to an inode, which it then has to recognize as it's own type
<sortie> Not to mention the recursive lock issues here that could deadlock
<sortie> You need to essentially do a GC cycle on close() of a Unix socket
<sortie> It really is just not how my kernel works at all
<sortie> The Sortix way is that if a tiny little requirement gets in the way of a simple, clean, efficient solution; then we explore if that requirement can be dropped or amended so a better implementation is possible.
MrCryo has joined #osdev
<nikolapdp> the sortix philosophy
<sortie> ungetc for instance is a similar thing, where it's mere existence, means all of stdio needs to cooperate. In this case, it was not worth it to get rid of it, and I accepted the complexity.
<kof673> not ... to put words into anyone...but c.f. new jersey versus mit whatever :D something something 90%, the last 10% takes 90% of the time to implement, etc.
<sortie> nikolapdp: It's a real thing. Granted it's mostly headcanon and unwritten, but the members of my #sortix community will definitely know a lot of the guiding principles I use all the time. You gotta have a philosophy of some sort if you're writing an operating system, or you will default into one.
gareppa has joined #osdev
<kof673> ^^^ you get someone's philosophy no matter what :D
<sortie> I mean if you rush into something and build it quick without thinking too much, that is also a philosophy in of itself
<kof673> yep
<sortie> The best thing about osdev is that it's 100% philosophy in a way. Cus yeah you get to hello world, but after that? You have endless choices.
<GeDaMo> "The first 90 percent of the code accounts for the first 90 percent of the development time. The remaining 10 percent of the code accounts for the other 90 percent of the development time." https://en.wikipedia.org/wiki/Ninety%E2%80%93ninety_rule
<sortie> GeDaMo: A lot of that is also why osdev is competitive. You can do a lot with the first effort.
<sortie> You gotta appreciate e.g. how much Linux and Windows has gone out of their way to explicitly intentionally suck and be complex
<sortie> If you just do the simple thing, you cannot compete with their complexity, and that is an advantage
<GeDaMo> Part of the complexity is because of backwards compatibility
<sortie> Part of the complexity is just plain bad ideas implemented weirdly
<GeDaMo> "It seemed like a good idea at the time" :P
<sortie> Part of the complexity is good and needed
<sortie> But in a new OS, you have the opportunity to rethink these tradeoffs
<kazinsal> part of it is because we predicated the structure of the entire internet one some finnish college student's hacker project
<kof673> > you cannot compete with their complexity, and that is an advantage sort ie is winning at double-sided wisdom today lol
<GeDaMo> Even if your own system is simple, you still have to deal with external complexity
<sortie> kazinsal: Sortix is a big and professional operating system unlike the Linux hobby operating system. I tried Linux once but didn't bother with setting up an initrd and it paniced. https://pub.sortix.org/sortix/screenshots/sortix-cross-compiling-linux-kernel.png
pebble has joined #osdev
SGautam has joined #osdev
bauen1 has quit [Ping timeout: 252 seconds]
<FreeFull> I once got rustc to compile binaries that ran on sortix
<FreeFull> Didn't really take it anywhere beyond a basic graphical mandelbrot renderer, though
Left_Turn has joined #osdev
<nikolar> sortie: what an amateurish system that linux is
<sortie> I hear it's pretty advanced by now but it's a lot of work to build it all. This Linux from Scratch guide will take some time to complete on Sortix
<zid> nikolar: Please be patient with linux, it is from the 1900s
<nikolar> Ah that explains it
Arthuria has joined #osdev
pebble has quit [Quit: KVIrc 5.2.4 Quasar http://www.kvirc.net/]
<heat> sortie, on my kernel it'll be relatively easy to check if a given fd is a unix socket
<heat> from there it's pretty simple
<heat> and my network stack is *by far* the most OOP-y C++-y part of the kernel
<heat> i actually use classes there
<heat> and INHERITANCE
<mjg> OH
<mjg> no cussing
<heat> inheritance isn't cussing
<heat> multiple inheritance is
<mjg> DIAMOND
<heat> diamonds are a programmer's best friend
<kof673> > Flute Boy is a young man who, before Link, went to Death Mountain to search for the Golden Power narrator: you must putrify first
* kof673 sides with heat
<nikolapdp> heat i thought you wrote in c
<heat> mostly yeah
<nikolapdp> so no then
<heat> i can trivially convert most of my kernel into C
<heat> silly header dependencies aside
<heat> i won't do it atm because there's little reason for the churn, and the little RAII helpers are nice, usually
<nikolapdp> so not c then
<heat> i feel like when i say "i basically write C" you skip the "basically"
<nikolapdp> well you either write c or you don't
<heat> and it's not a valid way to read sentences
<nikolapdp> c doesn't have lambdas or classes or inheritance or aii
<nikolapdp> raii
<heat> 1) yet
<nikolapdp> ok, knowing how the c comittee seems to be working now, that's actually a fair argument
<heat> 2) you don't write C, C does not have __attribute__ nor statement expressions nor inline asm nor typeof nor...
<heat> you either write C, or you don't
<zid> he's still trolling about that?
<zid> christ
<nikolapdp> lol
<GeDaMo> To C or not to C, that is the question? :P
<nikolapdp> for heat, it's clearly not to C
<heat> oh yes i'm definitely trolling about that, i even brought the topic into the discussion!
<heat> <heat> i thought i wrote in c
<heat> smh heat
<nikolapdp> you did repeatedly say that you write c
<heat> no, i have repeatedly said i write very-Cish C++, i've also written and read and model my code around lots of C code
<nikolapdp> no, you've repeatedly said you wrote c until you got called out
<nikolapdp> then you started with c-isjh
<heat> wrong
<nikolapdp> lol sure
<GeDaMo> 🅲
<zid> GeDaMo ur black box has a smudge
<nikolapdp> > Enclosed Alphanumeric Supplement
<zid> won't be seeing night like that in scotsland for a while
<zid> you're on like 4 hours of nautical twilight, 0 hours astro twilight, 0 hours night
<GeDaMo> Yeah
<zid> I get a bit of astro, I'm a southern jessie
<heat> it doesn't matter anyway, we'll all be writing rust in no time
<bslsk05> ​www.timeanddate.com: Sunrise and sunset times in Aberdeen
<nikolapdp> oh that's neat
<nikolapdp> we get like two and a half hours of actual night
<zid> wow, pathetic, actual night
<GeDaMo> I'm a reverse vampire! :P
<nikolapdp> nice
<zid> That's what edin looed like last night
<GeDaMo> That's the sort of thing we have too
<zid> you're only a couple miles away
<GeDaMo> Plus 100 or so :|
<zid> could walk that
bauen1 has joined #osdev
<nikolapdp> just do (echo '<'; bla | cut)
<nikolapdp> per line
<zid> I knew it involved parens
<zid> but I forgor how
<zid> nah doesn't work
<zid> cus I have more than one line
<zid> while read line; do echo "<" $line; done? :P
<nikolapdp> you could also be silly and do bla | cut| sed -En 's/(.*)/<\1/p'
<zid> | awk '{print "<" $0}'
gareppa has quit [Quit: WeeChat 4.1.1]
goliath has quit [Quit: SIGSEGV]
foudfou_ has quit [Remote host closed the connection]
foudfou has joined #osdev
Arthuria has quit [Ping timeout: 264 seconds]
<heat> nikolapdp, does 2.11BSD have sed and awk?
<nikolapdp> it does actually
[Kalisto]0 has joined #osdev
<heat> cool
<heat> they sound like later inventions so i guess they were backported
<heat> awk at least
barg has joined #osdev
<nikolapdp> heat: Nov 30, 1979: Awk has been modified yet again...
<nikolapdp> apparently, maybe not
[Kalisto] has quit [Ping timeout: 246 seconds]
[Kalisto]0 is now known as [Kalisto]
<heat> huh, TIL
<nikolapdp> can't remember if it was there in unix v7
<heat> what patch are you on?
<nikolapdp> 195
<nikolapdp> that's like 1993-1994 i think
<heat> 1994 woah
barg has quit [Client Quit]
<heat> i'm diving thru the more recent patches
<heat> your cc doesn't even support ansi C!
<nikolapdp> it doesn't yea
<nikolapdp> had to change the code for the client to do k&r functions
<nikolapdp> also it has partitions hard coded in drivers
<nikolapdp> unlike disklabels the later patches introduced
<nikolapdp> also seems to be a bit more unstable than geist's so probably that was improved too
<heat> it's admittedly pretty cool some randos still maintain a random unix version for a random old unobtanium machine
<nikolapdp> it's probably less unobtanium than you think
<nikolapdp> at least in the us
<nikolapdp> over here in europe, yeah it's practically unobtainable
edr has joined #osdev
Turn_Left has joined #osdev
<heat> we were still discovering fire by the time the PDP-11 was out in the US
<nikolapdp> apparently lol
<nikolapdp> i don't even know if it ever became a thin in any european country
<nikolapdp> like i wouldn't be surprised if there are like less than a 100 pdp-11 in all of europe (ignoring the weird soviet clones)
<mjg> still more than netbsd deployments
<mjg> #shortsfired
<nikolapdp> kek
[Kalisto]4 has joined #osdev
Left_Turn has quit [Ping timeout: 268 seconds]
<heat> i use midnightbsd
<nikolapdp> that's a thing
<mjg> i use mirbsd
<mjg> i win
[Kalisto] has quit [Ping timeout: 268 seconds]
[Kalisto]4 is now known as [Kalisto]
<nikolapdp> i use bsd
<nikolapdp> i win
<mjg> which one
<mjg> cause you probably don't
<mjg> win
<heat> you can't ever win using bsd
<mjg> you are a negative nancy heat
<heat> sorry mjg i'm team sysv
<mjg> respectable
<heat> sigrelse gang
<mjg> poll or select
* mjg is a select guy
Left_Turn has joined #osdev
* Ermine yawns
<heat> is /dev/poll an option?
<mjg> of course, but then you lose
<Ermine> you can't win with linux either
<mjg> linux is autolose
<heat> ofc Ermine you only win with windows
<heat> windowen operating system
<Ermine> fk you stole my line
<heat> the moment you install windowen is the moment you touch grass
<nikolapdp> who needs grass anyway
<Ermine> i have windowen installed, do i need to reinstall it
Turn_Left has quit [Ping timeout: 256 seconds]
<mjg> pop quiz
<mjg> is it "x window system" or "x windowen system"
<kof673> mechanism, not policy
<nikolapdp> it's "x windowing system"
<nikolapdp> smh
<Ermine> 1st
<mjg> kof673: bloat, not leanness
<Ermine> BLOAT
<kof673> yes, but i mean the spirit of x is they can't pick a spelling :D
SGautam has quit [Ping timeout: 268 seconds]
nikolapdp has quit [Remote host closed the connection]
zxrom has quit [Ping timeout: 246 seconds]
<HeTo> http://www.dosemu.org/ seems to imply you can win with Linux
<bslsk05> ​www.dosemu.org: DOSEMU Main Page
<Ermine> sure sure, let me install i386 linux first
nikolapdp has joined #osdev
<nikolapdp> dang, wrong terminal :P
<Ermine> hello there
<nikolapdp> oi
<heat> mjg, trick question, it's "en windowing system"
<heat> you didn't think i'd spot the hidden plural
<HeTo> I was surprised to find out that version 1.2.2 claims x86-64 support with emulation for 16-bit code and running DPMI code natively
<Ermine> xen windowing system
<Ermine> virtual 8086 mode goes brrrrr
theyneversleep has quit [Remote host closed the connection]
<kof673> x has root window and x nest so....definitely windowen, definitely windowen </rain man>
<kof673> *xnest nested x server
Turn_Left has joined #osdev
<mjg> y window system
<mjg> ey heat, history quiz
<mjg> what was before x11
<mjg> what was before x
<GeDaMo> W
<mjg> i asked the genz, boomer
<mjg> but since you are speaking up, what does 'dd' stand for
<GeDaMo> I can't remember it's some IBM thing
<mjg> no
<kof673> the kids say disk destroyer :D
<mjg> it's "convert and copy" but cc was already taken
<nikolapdp> kek
<GeDaMo> «According to Dennis Ritchie, the name is an allusion to the DD statement found in IBM's Job Control Language (JCL),[3][4] in which it is an abbreviation for "Data Definition"» https://en.wikipedia.org/wiki/Dd_%28Unix%29
Left_Turn has quit [Ping timeout: 256 seconds]
<mjg> huj
<mjg> huh even
<mjg> where is that from
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 255 seconds]
<GeDaMo> Looks like Usenet
alpha2023 has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
alpha2023 has joined #osdev
<mjg> i don't recall for shit where i got the cc thing from
<mjg> it's been quite some time now
<GeDaMo> That's also on Usenet :P
<GeDaMo> But given the IBM thing comes from Dennis Ritchie, I think I have to go with that
<mjg> is it dennis ritchie posting that statement
<mjg> if so i take it
<mjg> or is it someone claiming dmr said this muhc
<dostoyevsky2> > Dr Andrew S Tanenbaum – often known as "ast" for short – has been honored in the ACM Technical Awards 2023 with the Association for Computing Machinery's Software System prize. The award is for his creation of the MINIX operating system. It's not as famous as the offspring it directly inspired – the Linux kernel. As well as that, though, MINIX 3 is a true FOSS microkernel OS, and as it's the
<dostoyevsky2> software that powers the system management controller embedded in most modern Intel processors, it's exceptionally widely used.
<GeDaMo> The name is Dennis Ritchie but the email address is hidden https://groups.google.com/g/alt.folklore.computers/c/HAWoZ8g-xYk/m/HDUVxwTVLKAJ
<bslsk05> ​groups.google.com: origin of the UNIX dd command
<mjg> huh
<mjg> ok that's probably true then
<mjg> kind of a bummer
<mjg> apart from being funny the cc story does seem fitting
<nikolapdp> yeah definitely sounds like an early unix story
* mjg puts it next to "640KB ought to be enough for everyone" quote
<mjg> :[
<mjg> GeDaMo: thanks for ruining my childhood
nikolapdp has quit [Ping timeout: 264 seconds]
<GeDaMo> You're welcome! :P
<mjg> :]
<zid> kind of ironic that minix ended being the management slave for the cpu to run the real software, linux
Left_Turn has quit [Ping timeout: 268 seconds]
nikolapdp has joined #osdev
nikolapdp has quit [Remote host closed the connection]
nikolapdp has joined #osdev
<nikolapdp> somehow randomly lost internet at home
<nikolapdp> nice
<zid> I stole it
<zid> Your internet is a time share now
<nikolapdp> hey put it back
<nikolapdp> i need that
<zid> I needed to send a packet to greece so I just used yours
Matt|home has quit [Ping timeout: 256 seconds]
<zid> The other, better, balkan microstate
<nikolapdp> SERBIA BEST
<zid> serbia isn't even the best country in the dinaric alps
<nikolapdp> like you'd know
Left_Turn has joined #osdev
<bslsk05> ​thursdayquiz-2023-july-06.tiiny.site: Symmetry puzzles
<zid> are they aware this is absolutely unhinged
xenos1984 has quit [Read error: Connection reset by peer]
xenos1984 has joined #osdev
op has joined #osdev
xenos1984 has quit [Ping timeout: 246 seconds]
xenos1984 has joined #osdev
CryptoDavid has quit [Quit: Connection closed for inactivity]
lentement has joined #osdev
lentement has quit [Ping timeout: 246 seconds]
xenos1984 has quit [Ping timeout: 264 seconds]
gog has joined #osdev
zxrom has joined #osdev
<zzo38> I think it is useful to send UNIX sockets over UNIX sockets though (my operating system design effectively requires something like that, because all file descriptors work much like UNIX sockets)
xenos1984 has joined #osdev
dude12312414 has joined #osdev
op has quit [Remote host closed the connection]
dude12312414 has quit [Ping timeout: 260 seconds]
<Ermine> and you need to implement gc as a a consequence. So much for unix simplicity
<mjg> everything is a gc
dalme has joined #osdev
<mjg> unix has fearless simplicity
<heat> unix simplicity is a lie
<nikolapdp> hear comes heat with a rant, prepare yourselves
<Ermine> heat is right though
<nikolapdp> i didn't say he wasn't
<heat> if you don't want to read my messages just /ignore me kthxbye
<Ermine> and the cake is real
<mjg> why so aggresive heat
<mjg> are you ok
<nikolapdp> he's never ok
<Ermine> would be cool if that xt thing specified how it actually larps windows
<nikolapdp> xt thing?
<Ermine> github.com/xt-sys
<bslsk05> ​github.com: XT-Sys · GitHub
nick64 has quit [Quit: Connection closed for inactivity]
<nikolapdp> ah right, i remember
<nikolapdp> ExectOS Operating System
<nikolapdp> ExectOS OS
<mjg> when is onyx merge window opening
* mjg is sitting a large pile of patches
<mjg> oh wait, they are not for onyx
<mjg> apologies
<nikolapdp> lel
<bslsk05> ​github.com: Update FAQ to cut any unintentional speculations · xt-sys/website@bc656c6 · GitHub
<nikolapdp> spicy
<mjg> 9/10 commit
<mjg> would be 10/10 if those were *additions*
<Ermine> mjg: onyx patchen when
<nikolapdp> i imagine never
<mjg> i'm gonna fork it on github
<mjg> ohnoyx is the name
<nikolapdp> kek
<mjg> if (int st = f.from_fd(fd); st < 0)
<mjg> return st;
<mjg> fuck me
<mjg> is that how c++ is written
<heat> it's a great little feature they got around c++14 i think
<nikolapdp> indeed it is mjg
<heat> would be really fucken handy in C sometimes
<nikolapdp> i can agree with that
<mjg> fuck it i'm gonna rust
<heat> instead of: if ((st = from_fd(fd)) < 0)
<mjg> rust support when
<heat> some day
<mjg> f.from_fd(fd)?;
<mjg> :[
<nikolapdp> yeh if(let some(x) = whaterever())
<nikolapdp> sorry, no parens
<mjg> fuck you and your some
<Ermine> did they borrow this from go?
<mjg> ? your way out of everything
<heat> what syscall is that anyway?
<mjg> sys_fstat
<nikolapdp> mjg what are you reading anyway
<mjg> i'm trying to assess the level of SUCK
<bslsk05> ​old.reddit.com: Blocked
<nikolapdp> mjg: the levels of suck of what
<heat> sys_fstat isn't the most optimized thing
<heat> it takes a ref and allocates a struct file
<Ermine> patchen welcomen
<heat> correcten
<nikolapdp> Ermine that's just german now
<mjg> fstat allocates?
<mjg> what?
<Ermine> German is willkomen or something like this
<nikolapdp> it is yeah
<mjg> willkomen? is that accurate?
<heat> mjg, yes it reuses the bog standard path walking into a struct file, and the ->stat callback takes a struct file too
<mjg> sounds like a 1;1 copy of the oriignal wod
<mjg> heat: mon i am saying *sys_fstat, not fstatat
<Ermine> translator says willkommen
<mjg> you presumably translated "welcome"
<Ermine> yes
<heat> oh right
<bslsk05> ​en.wiktionary.org: willkommen - Wiktionary, the free dictionary
<mjg> well
<heat> ok sys_fstat is good then
<mjg> what makes you think "patches welcome" would be the same "welcome"
<mjg> it may happen to be true, but the above is not a legit method
<heat> you'll notice i have a default_stat that doesn't need an indirect call for sane filesystems
<Ermine> welcomen is not a legit word in the first place
<mjg> that's a linuxism
<mjg> Ermine: i asked some germans, we will see soon enough
<Ermine> neither in actual English nor in mjgspeak
<mjg> OH
<heat> what is?
<mjg> generic_fuckyou or similar
node1 has joined #osdev
<mjg> except linux further microoptimizes this by having a flag
<heat> not in this case
<bslsk05> ​elixir.bootlin.com: stat.c - fs/stat.c - Linux source code (v6.9.6) - Bootlin
<mjg> if (flags & AT_EMPTY_PATH && strlen(s.data()) == 0)
<mjg> fucking PESSIMAL
<heat> haha
<mjg> unless the compiler can optimize this, which changes are it does not
<mjg> i just yesterday ran into PESSIMAL strlen where teh compiler did not do fuck to damage control
<nikolar> changes are indeed
<mjg> heat: can you disasm sys_fstatat
Turn_Left has joined #osdev
<Ermine> btw is naive strlen impl pessimal?
<mjg> what is your native ipml
<Ermine> char *p = s; while(*p) p++; return p - s;
<heat> my strlen isn't the best but it's not naive and probably Okay Enough
<zid> gcc replaces it with a builtin
<zid> idk about clang
<nikolar> -fno-builtin then
<mjg> regular per byte is shite
<gog> it's pessimal because each load corresspondss with a tessst
<Ermine> naive, not native
<mjg> the standard way is the mycroft trick
<mjg> with magic bit fucking to detect a 0
<gog> bit fucking
<zid> but strlen is pretty hard to optimize unless you know that the string has trailing spce after it
<mjg> you seen how it's done?
<mjg> i don't see a better description
<gog> i have
<heat> i have a bitfuck yeah
<zid> like, if you *know* all your allocations are rounded up to a 16 byte boundary, you can use sse/avx, but technically you can't if you don't
<gog> i jussst liked the turn of phrase
Left_Turn has quit [Ping timeout: 246 seconds]
<zid> because I might put the string at the end of memory and make you read fault
<gog> my replacement keyboard just left poland btw
<nikolar> also if you try to access across page boundris, you can get into issues
<zid> gog: is it polish?
<nikolar> yeah zid, exaclty
<Ermine> anyway, i've took my strops from meaty skeleton
<mjg> don't access across page boundaries
<gog> it'ss got cz/sk keycapss
<mjg> done
<mjg> it's not hard to sort out
<zid> weirdo beardo
<gog> i could replace them with the ones i have but the mechanisssm are ssso delicate
<zid> is it at least iso
<gog> not really worth the risk of breaking it
<mjg> you check for alignment upfront
* Ermine gives gog a piece of cheese
<mjg> if misaligned you do an aligned read and fill in the spurious bytes with non-zero
* gog fassscinate
<zid> If it's ANSI you should send it back
<gog> it'sss not it's ISO
<mjg> after you are done with the shite you can safely do word-sized
<zid> good girl
<gog> ANSI wouldn't fit in my chassis
<bslsk05> ​gist.github.com: fstatat disasm · GitHub
<zid> ansi keyboards existing is nuts to me
<mjg> 0xffffffff810852e0 <+160>: call 0xffffffff811152f0 <strlen(char const*)>
<mjg> looks like it is being called?
<heat> yep
<mjg> 0/10 please remove the repo
<heat> not my fault
<mjg> you should not have strlen'd there
<heat> improve clang
<mjg> albeit, just in case: do you have builtins?
<heat> yes
<heat> this is just clang being bad
<mjg> ye as i said it failed to optimize other strlen-related bullshit yesterday
<mjg> so this here looked pretty suspicious
<mjg> why tf would you strlen it anyway tho
<mjg> the fuck is wrong with you
<gog> we ssshould never test the length of anything
<mjg> this is basically bsd engineering ethos
<zid> needing to test the length of something betrays that your program is forgetful
<mjg> gog: lulbuf[0] == '\0'
<mjg> there
<heat> https://godbolt.org/z/TPTGx61ez lord knows what's going on
<bslsk05> ​godbolt.org: Compiler Explorer
fkrauthan has quit [Quit: ZNC - https://znc.in]
<gog> yes
<Ermine> mjg: go and fucking patch this
<mjg> :(
fkrauthan has joined #osdev
<mjg> i'm gonna have to create an alter ego to do it
<mjg> yo what does 'st' stand for?
<mjg> status?
<heat> yes
<mjg> where did you take that from
<mjg> it's not linux
<heat> idk
<heat> i'll do err or ret next time, sorry
<mjg> 0xffffffff8108536c <+300>: call 0xffffffff81017f40 <__errno_location()>
<mjg> what on earth is this
<heat> old horribleness
<heat> i am slowly erradicating errno usage
<dostoyevsky2> I found this kernel in just one-line of code: `kernel = \begin{bmatrix} 0.05 & 0.2 & 0.05 \\\ 0.2 & -1 & 0.2 \\\ 0.05 & 0.2 & 0.05 \end{bmatrix}' <- it's crazy what you can do in LaTeX
<nikolapdp> wow
<nikolapdp> heat you had errno in the kernel?
<heat> yes
<heat> i deeply regret it and it's a PITA to remove
<mjg> heat had the following feature
<mjg> he would ask the process if it is willing to die upon receiving SIGKILL
<mjg> the process would return an error
<mjg> and then the kernel would make a sad face
<nikolapdp> wat lel
<mjg> this is where errno here came from
<heat> what
<mjg> what
<heat> btw i do have a sadface in the kernel
<heat> find it
<mjg> in soviet russia processes kill kernel
<mjg> is it ascii art or mere smiley
<heat> ascii
<nikolapdp> grep -R ':(' ?
<mjg> usystem/network/netctld/src/v6/addrcfg.cpp: * We failed. :((((
<nikolapdp> heat is it for the bsod
<gog> ¯\_(ツ)_/¯
<gog> test
<nikolapdp> gog: this is what i see B/\_(c)_/B/
goliath has joined #osdev
<zid> He's a happy c person holding hands with some B people
<gog> the say command has changed in conversation
<gog> it renders as an action without an actor or ssomething
<heat> nikolapdp, panic
<zid> The what command
* gog me
<gog> no
<mjg> my kernel does not even implement panic
<zid> that's /me
<mjg> it fearlessly restarts
<zid> always has been always will
<zid> or possibly /em if you're weird
<heat> it's still there even though i haven't printed that out in forever, cuz it just scrolls the screen even more
<mjg> there is no panic
<nikolapdp> heh doesn't work for mw
<gog> yoda doesns't like exceptions
<gog> there is no try, only do
<mjg> do you know who has ascii art on panic
<mjg> linux on sparc port
<heat> i know, i think i stole that idea from the wikipedia page on panic
<mjg> :p
<heat> it's a cute thing but gosh darn it's not useful when screen space is limited
<nikolapdp> what's two characters between friends
<bslsk05> ​dpaste.com <no title>
<mjg> this is what i would add
<heat> the heck is that
<mjg> cowsay mofo
<heat> yeah but what's the art?
valshaped7424880 has quit [Read error: Connection reset by peer]
<mjg> bud-frogs
<zid> how many of the letter r does the word strawberry have though
<nikolapdp> 2
<zid> please individually list every letter in the word strawberry and provide a running tally
<heat> dat boi is here to tell you yor kernal has krashed
<heat> panic qr code would be dope but idk how much info i can encode in one
<nikolapdp> S 0, T 0, R 0, A 0, W 0, B 0, E 0, R 1, R 2, Y 2
valshaped7424880 has joined #osdev
<nikolapdp> mjg what's that sparc linux panic art
<zid> nikolapdp: Your chatgpt certified sticker is in the mail
<Ermine> mjg: where's your kernel
<heat> "4,296alphanumeric" hmmm that might work
<Ermine> OptimalOS
<nikolapdp> thanks zid, i appreciate it
<bslsk05> ​lore.kernel.org: PROBLEM: kernel crashes when running xfsdump since ~6.4 - Nick Bowler
<bslsk05> ​imgur.com: There are three Rs! - Album on Imgur
<nikolapdp> ha nice
<mjg> Ermine: in my dreams mon
<Ermine> mon
<Ermine> just like my PessimalOS
<mjg> i thought that's onyx
<Ermine> onyx is neither pessimal nor in dreams
<mjg> i refer you to the strlen above
<heat> have you seen my strlen impl? it's Okay(tm)
<mjg> where.dat
<Ermine> it's just one of many lines
<mjg> if you mycroft it then it's fine
<mjg> albeit there are different spins on how to do it
<heat> kernel/lib/libk/string/strlen.cpp
<mjg> some variance in bit fucking
<mjg> ye that's mycroft
<Ermine> you see? OPTIMAL
<mjg> although i have to warn you compiles somtimes like to emit SHITE asm for it
<mjg> strnlen
<heat> i know, clang codegen was kind of terribad for this func
<mjg> // Can we optimise it as above? Maybe, who knows
<mjg> mjg knows
<mjg> yes, you can
<heat> we can, but we don't care
<heat> it's not really used anywhere important
<mjg> - // Can we optimise it as above? Maybe, who knows
<mjg> + // Can we optimise it as above? Yes, but we don't care.
<mjg> please commit my contribution
<heat> ok heat@
<Ermine> lgtm ok ermine@
<heat> haha my 2016 commits were great
<Ermine> > char esa[NAM$C_MAXRSS]; -- is it some VMS C code?
<heat> see 33a43fb227dafc1e083afa95231ea103f12c83ba
<heat> >MMK -- Make Utility for OpenVMS
<heat> yes
<mjg> i have a commit with a facepalm in ascii art
<heat> do start sending those to the lkml
<mjg> i might
<mjg> i got osme mild shit talk committed
<heat> vfs bit spinlock stuff?
<mjg> there is no shit talk there
<mjg> besides i did not do bitlocks
<mjg> there it is:
<mjg> locking: remove spin_lock_prefetch
<mjg> ...
<mjg> Removal from new_inode and of the entire thing are in the same patch as
<mjg> requested by Linus, so whatever weird looks can be directed at that guy.
<mjg> in a different commit i sneaked in "Code at hand has a rather tortured history."
<heat> btw look at what i found a few days ago: https://linuxlists.cc
<bslsk05> ​linuxlists.cc: LinuxLists.cc - Mailing List Archive
<heat> it's neat
<heat> the users bit i mean
<Ermine> finally, some good looking lkml archive
<mjg> one dude has a great facility somewhere
<mjg> technically subscribed to all the lists
<heat> the archive actually sucks, i just like the contributor profiles
<mjg> but automagically filters by files modified
<mjg> so he catches all the traffic he wants with almost none of the traffic he does nto care about
<bslsk05> ​linuxlists.cc: LinuxLists.cc - Profile: Mateusz Guzik
<heat> mjg in the dark ages
<mjg> lol i don't even remember almost any of that stuff
<Ermine> vger one is worse
<bslsk05> ​linuxlists.cc: LinuxLists.cc - [PATCH] net: ipv4: current group_info should be put after using.
<mjg> some fucking guy off list was unable to grasp how a refcount leak can be used to escalate privs
<Ermine> no more posts after 2018?
<mjg> no longer at rh
<mjg> note this is for the @redhat.com account
<Ermine> what about posting on your own?
<mjg> it is there under different address
<mjg> looks like they stopped updating last week tho
<bslsk05> ​linuxlists.cc: LinuxLists.cc - [PATCH] x86/CPU/AMD: inline amd_clear_divider
<mjg> empty func call sneaked in to all system calls
<vin> Has anyone played with jemalloc extent hooks? Bizarly, I see jemalloc requesting extents multiple times for a single 100B malloc
<heat> Ermine, i do like lore a lot and the visual simplicity is nice
<mjg> lore is great
<mjg> vin: no, but i would make sure to be running fresh jemalloc
<mjg> vin: it remains actively developed but they are no longer doing releaes
<mjg> so...
<bslsk05> ​linuxlists.cc: LinuxLists.cc - [PATCH 0/2] stop lockref from degrading to locked-only ops
<mjg> slower than freebsd == fucking top kek
<mjg> (well, that's for being slower than solaris, which also happened in a different bench)
<heat> >when doing a 20-way stat(2) on
<heat> the same tmpfs-backed file.
<heat> don't you hate it when you accidentally stat the same file from 20 cores
<heat> in a loop
<mjg> you may be missing the part where stuff gets stated in parallel a lot
<nikolapdp> yeah shucks
<mjg> and this merely checks oout if there is any lullery in the process, which was found
<vin> Yes I it cloned yesterday and built it mjg > extent_alloc_hook called with new_addr=(nil), size=2097152, alignment=4096, offset = 2097152, current_file_size = 33554432; > hook returning range: [0x7fffb7000000, 0x7fffb7200000) and offset: 2097152; > extent_alloc_hook called with new_addr=(nil), size=28672, alignment=4096, offset = 4194304, current_file_size = 33554432; > hook returning range:
<vin> [0x7fffb7200000, 0x7fffb7207000) and offset: 4194304; mallocx succeeded, pointer=0x7fffb7200000
<mjg> jemalloc has a test suite
<mjg> i would make sure that passes
<heat> i would hope it passes on linux
<mjg> taken from fresh dev branch?
<mjg> for all i know they broke something for themselves
<heat> something something continuous integration
<mjg> mofo get a job and do it for few years
<mjg> then come back with comments about CI
<mjg> one thing about real world projects which do have CI and which "passes"
<mjg> is that they DISABLE TESTS FOR THAT TO HAPPEN
<mjg> :]
<heat> for flakey tests maybe
<mjg> flakey is the obvious thing
<mjg> but no
<mjg> there is gonna be a regression nobody cares to fix
<mjg> and CI has to be green by the process
<mjg> so disable the test
<heat> any other disabling is just irresponsible
<mjg> it's literally what happens a lot
<mjg> i am even ignoring quality of tests
<mjg> which is notoriously shite
<mjg> speaking of ci, there is a grifger on youtube which likes to claim to promote it
<mjg> dude has ideas like "branching is inherently bad bro, just commit to master bro and let CI take care of it"
<nikolar> lol yeah we got recommeneded to watch that sort of thing at $job
<nikolar> since we're moving to the whole ci/cd thing
<heat> "because seqcount_spinlock_t has been entirely broken and went from being 4 bytes back when, to now being 64 bytes" lol
node1 has quit [Quit: Client closed]
<mjg> heat: it did not tho
<heat> was the L man misreading some cacheline alignment in pahole or something
<mjg> heat: the L man built a kernel with lockdep
<heat> oh lockdep
<bslsk05> ​threadreaderapp.com: Thread by @ashleygjovik on Thread Reader App – Thread Reader App
<mjg> heat: if you are reading the thread, read the fucking thread
<heat> this archive sucks for thread reading
<heat> and i CBA to pull up lore
<mjg> drop it mon
<mjg> nikolar: so the problem is that people who can do ci don't need to be told to do ci
<mjg> nikolar: and the rest is going to appease the process and miss the point
<nikolapdp> also we got a consulting firm or something
<mjg> what passes as "ci" in typical corp environment is utter crap
<mjg> ye it's a grift
<nikolapdp> they are really pushing the crappiest way to do it
<nikolapdp> it's indeed a grift
<mjg> all consulting is selling bullshit with made up metrics for management
<mjg> they can claim there is n commit made daily or n runs of the test suite daily
<mjg> management can pretend they got visibility into the dev process
<mjg> and consequently everything got better
<heat> mjg, at what point does it really matter to group struct members by cacheline?
<heat> rcu?
<nikolapdp> lol and when they got asked question that they don't know the asnwer to, they are like we'll get back to that
<nikolapdp> and they don't
<mjg> heat: it always matters
<mjg> heat: however, for stuff which gets dirtied in a multicore setting it matters fuckton-fold
<heat> i feel like it's a little microoptimizey when you have a bunch of overhead in other places (like locks)
<heat> but i've never really tested
<mjg> for example in this particular case the refcount is the only thing which gets bounced around
<mjg> ... as long as you pad it
<mjg> consider the following
<mjg> suppose this is a single-threaded environment and you yolo'ed var placement
<mjg> you are getting cache misses you would not, so you are slower for no good reason
<mjg> but you are only going to get more misses if you replace the stuff in the cache
<mjg> suppose this is a multi-threaded environment and you once more yolo'ed var placement
neo|desktop has quit [Read error: Connection reset by peer]
<mjg> and that some of the struct keeps getting dirtied
<mjg> now not only you are getting misses you would not with ok placement for single-threaded execution
<mjg> but the stuff you just pulled may get invalidated almost immeidately
neo|desktop has joined #osdev
<mjg> so you may be getting multiple misses for the same line
<mjg> it's terribad
<heat> yeah but struct optimization for single-thread != multi-threaded isn't it
neo|desktop has quit [Read error: Connection reset by peer]
<mjg> in corner cases, like the one in the patch, indeed they are different
neo|desktop has joined #osdev
<mjg> butthe fundamental concept of whacking misses remains
<heat> for single-threaded as long as you pack the struct in the less cachelines possible you're happy
<mjg> mofo the goal is to reduce misses, aight. basic multicore hygiene says to separate frequently read and rarely modified fields from stuff which is modified a lot
<mjg> if you read the thread the L man says they already had the padding, but it went bust unintentionally when things got resized within the struct
<mjg> someone increased the size of the embedded name array
<heat> i know
<mjg> the entire thing is super pedestrian, the only funny bit is that it was doing worse than freebsd
<heat> just saying that if the code is single-threaded (or bound by a big ass lock or some shit) then packing for size is probably better
<mjg> other than that it is not worth linking
<mjg> heat: ye it is a tradeoff
<mjg> and in this particular case the right thing to do is to split stuff
<mjg> if total memory usage was never a concern all locks would land in their own cachelines etc.
gbowne1 has joined #osdev
<mjg> i shall note that in real world projects the placement is often pretty shite, mostly newest additions last, without any regard for what is being used with what
<zid> This lawsuit is wild
<mjg> in cases like that optimization for multicore is often also an otpimization for single-threaded
<mjg> good news is that you can just RUST
<zid> Starts off with multiple health code / epa / etc violations for illegally venting solvents right next to her apartment complex's HVAC
<mjg> and pretend the issue does not exist
<zid> ends with them breaking into her house and bugging it, and sending her death threats, after firing her
dude12312414 has joined #osdev
<heat> mjg, unironically rust does reorder your struct layout
<heat> by default
<mjg> it probably packs for size
<heat> yea
<mjg> right
<mjg> that is probably a sane default
<mjg> at the asme time if you FEARLESSLY CONCURRENTLY execute code
<mjg> you can't afford this kind of approach
<heat> well you can override it
<heat> i dunno if you can do some sort of PGO and it reorders stuff for you, maybe not
<mjg> i know you can, i'm just taking jabs at their marketing
spare has joined #osdev
<netbsduser> one thing i resent about rust
<netbsduser> it is a truth universally acknowledged that the conflation of structure alignment with element alignment, as the attribute aligned does in C, is wrong
<netbsduser> rust boasts about being new and different but has much the same behaviour
<dostoyevsky2> didn't they invent rust to rewrite firefox in it?
<zid> you want.. leading padding on structures?
<bslsk05> ​gist.github.com: new_inode.h · GitHub
<mjg> maybe, for startes you need to pahole on it
<heat> i don't
<mjg> you don't want
<mjg> waht
<heat> clangd shows me the struct layout
<mjg> clangd?
<mjg> how
<heat> yea
<mjg> lsp?
<heat> yea
<mjg> huh
<mjg> will have to check it out
<mjg> anyhow
<heat> there was also a way to pull it up in neovim, don't remember how though
<mjg> after you think you got a layhout which makes sense you need to - hold on to your seat - microbench while looking at it with a profiler
<mjg> to make sure there is no false sharing going on
<heat> WHAT?!
<mjg> in this case you would run things like open/close/stat/read/write on it
<heat> yeah ik but i don't have that fancy perf stuff for cache lines
Left_Turn has joined #osdev
<mjg> there is this perf kvm thing
<mjg> sometimes it works, other times it does not
<heat> doesn't work here
<mjg> right
<mjg> so plan b is you can catch IPs which take the longest
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
<mjg> and just check what code is it
<mjg> dragonflybsd has a hack of the sort in systat
<mjg> (-pv i think?)
<mjg> if you need an inspiration
<nikolar> i don't know about neovim, but for vim-lsp, you just put it in your config to use clangd for c files and it just works (tm)
<dostoyevsky> dragonflybsd is best bsd imho
<mjg> i don't remember how he did it, i think it logs IP from timer interrupt
<heat> doesn't just looking at the will-it-scale results just work?
<mjg> no
<mjg> absent the freebsd result
<mjg> how would you even know that few mln is slow
<mjg> or rather, avoidably slow, since some bouncing is guaranteed to be there
<heat> i could roughly compare with other systems *shrug*
<mjg> .. :d
Turn_Left has quit [Ping timeout: 246 seconds]
<mjg> suppose you find you are lagging
<heat> i'm in a tough spot mon
<mjg> how would you figure out where
<heat> i would not
Turn_Left has joined #osdev
<mjg> i just gave you a way out, it is another guerilla project
<mjg> akin to your flamegraphs
<mjg> nothing turbo complicated
<mjg> in fact you can probably reuse some of the code, but instead of logging traces you only take IPs
<mjg> and make sure to fire more often
<heat> i would like for perf to just work :(
<mjg> .:D
<heat> what does freebsd use?
<mjg> bespoke solution named pmcstat
<mjg> it is a little crappey tho
<mjg> however, now that you mention it, it is *plausible* there is an even easier way out
<mjg> there is a very simple kernel driver to make intel tooling work, but it only reports counters
<mjg> (see cpuctl on freebsd)
<heat> adding code to read pmcs would be okay as long as there's ok tooling on the user side
<mjg> it is *plausible* making it work with actually catching IPs 'n shit is not much work
<mjg> i'm afraid pmcstat internasl are a tirefire
<heat> i don't care about the internals, i care about the output
Left_Turn has quit [Ping timeout: 256 seconds]
<mjg> i mean making a compatible interface would be an exercise in misery
<mjg> :]
<heat> oh ew pmcstat pokes MSRs?
<heat> like, directly, with the cpuctl thing
Left_Turn has joined #osdev
<mjg> pmcstat does not use cpuctl
<mjg> pmcstat uses hwpmc which is utter garbage
<mjg> (pmcstat itself also being garbage)
<heat> >EDOOFUS
<heat> EWHATNOW
<mjg> don't read that code
<mjg> i regert mentioning it
<heat> don't worry, just looked at the manpage
<mjg> netbsd has a primitive tool to look at this, i have no idea how it works though
<mjg> maybe it is something to consider
<mjg> i don't know the name either, you gonna have to grep
Turn_Left has quit [Ping timeout: 268 seconds]
<heat> the gang implements perf
<mjg> or you know
<mjg> fuck onyx
<mjg> and write some linux
<mjg> there is plenty of breakage to go around
<heat> i would love to write linux but i can't really find my spot there
<mjg> what would be your spot if it existed
<heat> probably mm or fs
<mjg> if you are looking to fuck with some perf there is breakage everywhere
<mjg> mm and fs
<heat> i'm not skilled enough to find the breakage
<mjg> it's as easy as running will-it-scale
<mjg> and perf topping it
<mjg> albeit you are going to go past laptop scale
<mjg> have to*
<heat> :)
<mjg> here is what i would suggest
<mjg> take a gander which syscalls and libc routines don't have benchez yet and add them
dude12312414 has quit [Ping timeout: 260 seconds]
<mjg> it is vritually guarateed they suck
<mjg> example: realpath
<mjg> how will-it-scale did not already have stat or access is beyond me
<heat> realpath isn't a syscall b0ss
<mjg> it is on freebsd
<mjg> and it is a series of readlink calls on linux
<mjg> interestingly there is no readlink bench
navi has quit [Ping timeout: 264 seconds]
<mjg> i have plans to add a realpath syscall on linux btw
<heat> interestin
<heat> uhhh realpath is problematic for reasons unknown to me
<mjg> it's gonna be with blackjack, hoookers and full rcu operation
<mjg> there is forward progress problem i did nto figure out yet
<mjg> which is why i did not post any patchez
<mjg> yolo code for benching is trivial to add
<heat> old musl realpath did open + readlink /proc/self/fd/N + close
<heat> and that had problems for some reason
<mjg> you may not have a free fd to populate
<mjg> besides wtf is even that idea, LOL
<nikolar> rust does some ioctl i think
<mjg> ?
<mjg> it may be using F_GETPATH on os x if the file is already open
<mjg> but for a random-ass path there is no magic ioctl or shit
<nikolapdp> we've already looked into this already mjg remebmer
<mjg> yea, that was when it had a file open
<bslsk05> ​github.com: implement realpath directly instead of using procfs readlink · heatd/musl@29ff759 · GitHub
<mjg> and was reporting a path to that
<nikolapdp> ah yeah right
<mjg> that's fundmantally different from realpathing a random file
<heat> reading the commit msg, if they axed it cuz old kernels didn't have O_PATH, this is extra musl boomerism to add to the pile
<mjg> heat: i was going to say proc, but then i figured proc is already ssumed
<mjg> > this avoids calling getcwd (which may fail)
<mjg> hehe
<mjg> getcwd is what virtually does not fail tho
<heat> this sounds totally revertable, as long as you add the fallback logic in case of failure
<heat> fast path would be procfs, slow path would be the crip walk all over the filesystem
<mjg> opening a file is already the slow path mon
<mjg> in fact the entire thing as implement is a slow path
<mjg> because so far linux does not offer anything better
<mjg> it is one of the few remaining spots where freebsd is doing better :-P
<heat> opening the file will be a lot faster than slowly opening the path
<mjg> for single threaded procs it is going to be less work
<mjg> for shitters with highly contested file_lock i beg to differ
navi has joined #osdev
<heat> could have it dependent on the existence of locks :)
<heat> s/locks/threads/
<mjg> gross
<zid> hrmph I don't have anything to read nik
<zid> fix it
<mjg> you convinced me to put some effort into that realpath
<mjg> there is probably a trivial way out i'm missing
MrCryo has quit [Remote host closed the connection]
<mjg> it's gonna be rcu all the way forward and back
<mjg> fully scalable as long as everything is in dcache
<nikolapdp> zid: here read this sentence
<nikolapdp> you're welcome
<zid> 300 pages to go, get typing
<heat> mjg, i hope you feel guilty, you're going to make all musl users pay for an extra syscall that leads to ENOSYS
<heat> imagine the power wasted
Matt|home has joined #osdev
<mjg> you mean it's going to happen on every readlink call
<mjg> every time
<mjg> they are not big on caching the state or something iirc?
<heat> correct
<mjg> what is the reason?
<heat> no one cares
<heat> syscalls are free
<mjg> dude syscalls speed you up
<kof673> re: CI earlier......i suspect that happens with many things.
<kof673> (paraphrase) there are 3 kinds of truth: lies, damned lies, and statistics
<kof673> +computer benchmarks is commonly appended
dude12312414 has joined #osdev
dude12312414 has quit [Client Quit]
agent314 has joined #osdev
gbowne1 has quit [Remote host closed the connection]
gbowne1 has joined #osdev
gorgonical has joined #osdev
<gorgonical> what is up colonel developers
<gog> hi
<gog> i'm not developing rn
<gorgonical> I currently am dealing with the consequences of my own disorganization
<gorgonical> A lesson I will not learn from
<kof673> crit bit tree seems to work...so i need to test on: 16-bit, 64-bit ....and 24-bit lol
<Ermine> why is kernal.org occupied...
<heat> armageddon soon
<gog> finally
* gog patiently awaitss the ssweet embrace of death
<bslsk05> ​lore.kernel.org: [PATCH 0/2] NUMA emulation for arm64 - Tvrtko Ursulin
<heat> emulating NUMA on the rpi5 makes it measurably faster lol
<mjg> there is probably loss of similar caliber on amd54
<mjg> fucking with memory channels is a real thing
<mjg> that said NAK on the patch
<mjg> implement without faking stuff
alpha2023 has quit [Ping timeout: 264 seconds]
<kof673> people..."and of the dove is born the phoenix" har-makhu supposedly double horus.....lost in translation :/
<mjg> i read it as "phoronix"
<gog> get out more
<gog> touch grass
<mjg> nice try, grass is covered in dog poo
<gog> coward
<gog> it's jussst a bit of poo
<mjg> do cats it dog pool all of a sudden
<heat> mjg, whats the difference between getting fake NUMA data from ACPI or fake numa data from the cmdline? :)
<heat> a node is a node
<mjg> "irrelevant questions for $100"
<mjg> by faking numa layout you are losing actual information about locality
<mjg> so how about they instead make the allocator undersatnding memory controllers 'n shit
<mjg> instead of hackind around it
<heat> probably, but the easier and honestly best solution is to just create more nodes
<mjg> it's the hacky way out
<heat> if you want to mess with the nodes after, it's your choice
<mjg> i wonder how much of this win is reduced lock contention
<heat> well, their choice
<mjg> faking numa nodes is a lol hack even used by netflix for at least 6 years now
<mjg> it may seem endearing for a minute
<mjg> but it is not
<heat> nothing about pg_data_t and linux "nodes" needs to be exactly about NUMA
<mjg> dude claims he is adding pretend numa
xenos1984 has quit [Read error: Connection reset by peer]
<heat> correct cuz atm it is the unfortunate truth
<mjg> then see my commentary aboe
<geist> oh cute: re the rpi5 thing
<geist> that kinda checks out, depends on how the memory controller interleaves (or doesn't) the different chip selects
<geist> if it's not, and the 4 or 8 GB or so is say 4 2GB chip selects, then splitting it that way may make total sense
<mjg> fuck that
<bslsk05> ​lore.kernel.org: [PATCH v2 0/5] Rosebush, a new hash table
<mjg> here is smething
<heat> oh v2 dropped? cool
<bslsk05> ​www.geekwire.com: Attention Required! | Cloudflare
xenos1984 has joined #osdev
<geist> yeah super sad
netbsduser has quit [Ping timeout: 256 seconds]
alpha2023 has joined #osdev
alpha2023 has quit [Ping timeout: 252 seconds]
<childlikempress> 'fake numa' what doug16k told me this was something the memory controller could do a good job of automatically
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 256 seconds]
alpha2023 has joined #osdev
<heat> the fraud doug16k is slowly being exposed
alpha2023 has quit [Ping timeout: 252 seconds]
alpha2023 has joined #osdev
Turn_Left has quit [Read error: Connection reset by peer]
spare has quit [Remote host closed the connection]
<heat> i should probably note that i appreciate(d) doug16k a lot and was just being ironic
<heat> should someone take this out of context
alpha2023 has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
alpha2023 has joined #osdev
MiningMarsh has quit [Ping timeout: 268 seconds]
MiningMarsh has joined #osdev
lentement has joined #osdev
<mjg> i did not know the guy
<mjg> that well
<mjg> but did not appreciate him
<mjg> dude tried toalking shit to me for using vtune (lol)
Matt|home has quit [Remote host closed the connection]
<mjg> (btw vtune is great if you can get it)
<mjg> (intel only tho)
<heat> perf > vtune
<mjg> OH
<mjg> this is why people say linux fucks are hippies
lentement has quit [Ping timeout: 252 seconds]
<heat> hippie communist perf vs capitalist corporate intel vtune
* Ermine turns on soviet march
<Ermine> nortti: oh my. I used to have an account on these
<Ermine> is vtune a bsd thing?
<heat> no
<mjg> lol
<mjg> mon
<mjg> if it was how would doug even know about
<mjg> it's a quite sophisticated profiler
<mjg> i suspect doug might have been talking shit because vtune also gives tips what the problem is
<heat> oh so vtune's taking your job? you should be against it mon
<mjg> ya man people are worried about chatgpt?
<mjg> it's vtune all along!
<mjg> was
[Kalisto]0 has joined #osdev
[Kalisto] has quit [Ping timeout: 256 seconds]
[Kalisto]0 is now known as [Kalisto]
goliath has quit [Quit: SIGSEGV]
navi has quit [Ping timeout: 256 seconds]