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.)
<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
<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
<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
<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
<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.
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]
<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
<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
<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?