<heat>
mjg, mofer does fbsd have their own fs testing thingy? have they tried xfstests?
<mjg>
there is a bunch of crap like fsx
<mjg>
i don't know if xfstests specifically were ported
<mjg>
i would assume so
<Ermine>
s/mofer/mon/
<heat>
i kinda need xfstests but i'm missing umount
<heat>
and that would require some effort
npc has joined #osdev
<mjg>
lol
<mjg>
you are the hello world kind of guy aren't you
<heat>
what
frkzoid has joined #osdev
<Ermine>
I'm the hello world guy here
<heat>
sometimes mjg shits on onyx like it's a real system and i'm always conflicted between being offended or being proud of building such a notable thing myself
tomaw has quit [Read error: Connection reset by peer]
<mjg>
i'm shitting on it while taking into account 1. this is a one-person project 2. you claim you take it seriously
<mjg>
to that end, i don't expect you are going to get a xfs or zfs port
<mjg>
i do expect you are going to have a working umount (LOL)
<mjg>
maybe you are inhabited by a spirit of some early days unix geezer
xenos1984 has quit [Read error: Connection reset by peer]
<mjg>
these dudes had swap configured by hardcoding shit in the kernel
<mjg>
did not have a syscall for halting the box
<mjg>
so what's umount even
<mjg>
are you retyping shit you got from ouija board?
tomaw_ has joined #osdev
<heat>
not sure if there's a single hobby OS with umount
tomaw_ is now known as tomaw
<heat>
>i don't expect you are going to get a xfs or zfs port
<heat>
sounds ez to me
<heat>
porting zfs would probably be a solid testament to my vfs but otoh i dont want to mess with the whole opensolaris deal
<mjg>
let me guess
<mjg>
having umount automatically means it's not hobby?
<mjg>
my impression was that you are larping onyx being a real system
<mjg>
with time constraints taken itno account
<heat>
umount is a functional edge case that isn't really important in the grand scheme of things
<heat>
that's why it's commonly missing
<mjg>
i agree run of the mill hobby os probably should not care
<mjg>
but then again people who write that don't larp it being a real thing
<mjg>
just have something they wanted to do
<mjg>
perhaps you can explain your idea of taking the os seriously in a hobby setting
<heat>
i try my hardest to make a technically sound system
<heat>
even though if anyone's running it in prod LOL PLEASE STOP
<heat>
i do want umount and remounting and all that shit, as much as i want hugepages and yadda yadda, but my time is finite and i have to focus to on certain things
<heat>
it is that umount and remounting and a revamp of that bit of the kernel was in order, so i'm probably working on it soon
<heat>
now if your point is that when i say i "larp linux" i actually mean you should replace all instances of linux with my very serious contender, well, that's just wrong
<heat>
larping implies some shitty immitation of whatever it is you're larping
<mjg>
i don't see how one can get that idea given
<mjg>
18:54 < mjg> i'm shitting on it while taking into account 1. this is a one-person project 2. you claim you take it seriously
<mjg>
so i very much expect you to stick to a lulfs
<mjg>
also meaning this is not usable in actual real-world setting
<heat>
it's totally usable in simple cases
* mjg
burps
<heat>
but if you're expecting it to be google's backbone, well, probably not
xenos1984 has joined #osdev
<mjg>
which part of the following sentence you don't understand:
<mjg>
19:11 < mjg> 18:54 < mjg> i'm shitting on it while taking into account 1. this is a one-person project 2. you claim you take it seriously
<mjg>
i just noticed i'm missing a 'to' here, maybe that's resulting in confusion
<heat>
>but my time is finite and i have to focus to on certain things
<mjg>
but in that spirit, do you think adding umount is what qualifies the os for google backbone?
<heat>
no, but it definitely helps
<heat>
given what e.g containers do with filesystems and mounts
<mjg>
's fine with me, just you are flip flopping between defending not having umount on basis "what for" and claiming it's a matter of priorities
<mjg>
i see a lot of ground between "usable at google" and onyx + umount and onyx
<mjg>
you know
<heat>
i didn't say what for, i always said it's a matter of priorities
<heat>
which is why most hobby osen don't have it
<mjg>
you gave me bullshit about hobby os not having umount
<mjg>
which in this context is not relevant
<mjg>
anyhow, this convo is really not getting anywhere, is it
<mjg>
so tell you what
<mjg>
you get vnode recycling goin'
<mjg>
and i'm gonna test it
<mjg>
how is that
<heat>
in any case onyx with umount is probably usable for oracle's backbone
<heat>
call me larry we'll settle some things
<mjg>
larry said he is rolling out sortix
<heat>
i would love to get inode recycling but my dcache is leaking refs and i don't know where
<heat>
but it ends up actually leaking filesystem inodes cuz they never get reaped by the fs code, yay
<mjg>
could unmount support help debug that
<mjg>
:thinkingface:
<heat>
yeah if xfs found it
<heat>
xfstests i mean
<mjg>
so i just pulled on onux and see the zero page stuff
<mjg>
you are going all linux
<heat>
what zero page stuff?
<mjg>
anon: Flush the TLB when mapping over zero pages
<heat>
other systems don't do zero pages?
<mjg>
bsds and solaris don't
<heat>
i thought it was pretty standard
<mjg>
no it's a linuxism as far as i know
mavhq_ has joined #osdev
<mjg>
ey heat, can you give me an operational onyx image with will-it-scale?
<heat>
i think geist has mentioned fuchsia does it and they also scan committed pages for all-0s and replace them with zero pages
<heat>
l8er, aight?
<mjg>
so happens i'm looking at pipes in freebsd and they suck terribly
<mjg>
it is plausible onyx is faster(!)
<mjg>
i'm in no rush, just sayin'
<heat>
my pipes are pretty simple
mavhq has quit [Ping timeout: 244 seconds]
<mjg>
the bsds have a sleepable lock inducing more on/off cpu cycles than necessary when pushing data
<mjg>
i verified perf sucks hardcore compared to linux
<heat>
i also have a mutex
<mjg>
i suspect you have a spinning lock there, in which case it should also suck compared to onyx
<heat>
but it spinz
<mjg>
right
<mjg>
so i expect onyx to do better on these grounds
<mjg>
don't you want to know if you do something legitimate better
<mjg>
apart from being funny, it's not something i'm going to suffer
<heat>
it might yeah
<Ermine>
mjg: you can write "optimization for dummies" book
<heat>
whatever the fuck vmalloc is doing seems really... odd
<heat>
i've seen on /proc/vmallocinfo like ~2300 unpurged vm_areas, each 5 or 6 pagen long
<heat>
looks like a dramatic waste of page tablen to me
<dostoyevsky2>
> hating on rust is so hot right now
gog has joined #osdev
<mjg>
Ermine: 1. don't PESSIMAL 2. the end
<Ermine>
I haven't seen any hot rust haters
<Ermine>
mjg: don't PESSIMAL is easier said than done
<dostoyevsky2>
Ermine: I wanted to say something but then I forgot as I was too busy hating rust
<mjg>
Ermine: step 0. is FUCKING PROFILE
<mjg>
Ermine: a real workload
<Ermine>
and then
<mjg>
then break it down into smaller parts you can ubench
<mjg>
to get better visibility
<heat>
Ermine, find me a hot C programmer
<heat>
that's not named bryan cantrill
<Ermine>
I believe openbsd and freebsd people know what is profiling
<mjg>
here is an easier guide by Geezer McUnix
<mjg>
just claim it's all i/o
<Ermine>
heat: bryan is rust guy isn't he
<heat>
historically a C programmer
<mjg>
openbsd know about profiling about as much as they do about security, to my understanding anyway
<heat>
i don't think he writes code anymore
<geist>
heat: yeah re: scanning for zeros, though that's generally replaced now by a zram style compressor
<heat>
oooh fancy
<geist>
the page compressor detects zeros while it's at it and dedups it
<mjg>
what kind of stats are you getting on this?
<geist>
zeros? lots, annoyingly. user space software sucks
<geist>
they're always allocating some large ass thing and zeroing it out and then not touching it
<mjg>
that i know, but liek what's the reality there
<Ermine>
heat: gotta admit poeterring is hot
<mjg>
oh ye the memset(buf, 0, GIGANTISH) before memcpy
<mjg>
classic
<geist>
enough that it shows up
<mjg>
wait that's in fuchsia?
<geist>
and for this particular use case it's all about running in low memory situations
<mjg>
so that's yoru own software fucking up like that?
<geist>
no swap, not a lot of ram, etc
<geist>
some our own, some not
<mjg>
i know rust coerces people into zeroing when they don't need to
<geist>
exactly, rust is a big offender
<mjg>
system's language right there
<geist>
and in general 'safe' c++ is too, since the google style guide, etc has rules about always zeroing everything, etc
<mjg>
have you tried looking at total thread counts?
<mjg>
because based on what i had seen up to this point i also expect you get plenty of avoidable threads
<geist>
probably
<mjg>
speaking of lowmem 'n shit
<geist>
keep in mind it's a microkernel, so lots of threads is sort of par the course
<mjg>
certainly
<mjg>
i'm saying the rustards like to "thread pool" a lot
<mjg>
and by thread pool they just spawn n threads cause why not
<geist>
a few hundred processes, probably 5-10 threads a piece, etc
<geist>
easily over 1k threads
<mjg>
multiply that fuckton of procs spawned and you get a disaster
<mjg>
there is the idea that spawned threads are cheap
<geist>
well we tune everything for that
<heat>
C++ does that unavoidably
<heat>
also never forget CHROMIUM is also fuchsia software
<mjg>
i firefox, no that it acts sane
<mjg>
not*
<geist>
yep. that's i think one of the biggest offenders, and largely a black box
<Ermine>
does it fuck up threading
<heat>
i meant re: memset over allocated memory
<geist>
but it's not really that much of a problem, mind you. we're paid to make things work, so we make it work
<mjg>
kind of a sellout mentality mon
<mjg>
to not even bitch about it :-P
<geist>
yah a general idiom everywhere is foo bar = {}; for structs, etc
<mjg>
you would think rust with all its strictness would precisely be the lang to NOT need this
<geist>
mjg: sure, but it's a little different when you're on a team and paid for it. if you bitch about it constantly no one listens to yo uanymore
<Ermine>
vulkan tutorial i'm following does VkLol lol{};
<geist>
the best way to get your voice heard is pick your battles, and dont turn into a negative nancy
<heat>
good
<mjg>
meanwhile even the internals love to zero to shut up the compiler
<geist>
but actually that's a really gnarly feature we have enabled in the compiler: tell it to fill all locals with garbage
<geist>
it finds bugs, but it's so much extra work
<mjg>
hm
<mjg>
is that really helpful tho?
<heat>
yep
<mjg>
do you have asan et al?
<geist>
occasionally, yes
<mjg>
i would epxect that to sort things out
<geist>
though i have to admit we haven't found much in the kernel with it
<geist>
we do
<Ermine>
how to enable this feature?
<heat>
bugfree MINIMAL microkernel vs bugfull SHIT BLOATED monolithic kernel
<geist>
hmm, i forget the switch. it's a clang feature
<geist>
look for something like 'fill' etc
<mjg>
well i don't get it -- what does it find that (k)asan does not?
<geist>
it's cheap to run all the time, whereas kasan is not
<mjg>
cause if it is worthwhile i'll try it ou on my product
<mjg>
oh you always run it?
<geist>
yes
<mjg>
ok that's different
<mjg>
i assumed something strictly for a test farm
<geist>
there's a performance hit for sure. but i think the general idea is it's acceptable
<mjg>
defo to ponder
<mjg>
well i presume you are operating with some specified budget
<mjg>
as opposed to "as fast as possible"
<geist>
and yo ucan individually override it, fwiw. some some of the core data structures we have tagged with the attribute to disable
<geist>
right
<geist>
one thing it does that you can't eaisly do any other way is it also zeros out paddings within structures and objects
<geist>
since you otherwise can't easily get to that stuff
<geist>
again, i find the whole thing pretty dubious but the security folks are very keen on that sort of thing
<geist>
so it's a give and take
<mjg>
dude
<mjg>
security folk are only take
<mjg>
and lie while doing it
<Ermine>
is that filling thing enabled at compile time
<geist>
right, so you have to achieve a balance
<Ermine>
?
<geist>
Ermine: yes
<geist>
it generates extra code to fill stuff on creation
<mjg>
fwiw linux likes to be built with zeroing registers
<mjg>
i mean vars
<geist>
zeroing registers i think we also enabled too
<geist>
there's a security switch to zero registers before exiting a function that i think we have on on debug builds
<mjg>
that one comes with a huge turd in gcc tho
<geist>
really the big one we have is secure stacks (on x86) and shadow call stacks (on arm)
<mjg>
say you have void func(...., bool loflag) { char buf[GIGANTISH]; if (!lolflag) return; .... }
<geist>
that's honestly the big one, personally i think if you have that on the other ones are much less interesting
<mjg>
it's going to emit zeroing the buf
<mjg>
even for the immediate return case
<heat>
-ftrivial-auto-var-init=zero mons
<geist>
ah yeah. you can also tell it to zero init with something like 0xaaaaaa iirc
<geist>
fill values that end up with a non canonical value i've found to be pretty great
<heat>
yes
<heat>
but =zero is supposed to be prod-ready
<heat>
its safer than making it crash
<mjg>
there isa funny story in openbsd
<mjg>
they had the same poison value for years they would init stuff by hand with
<mjg>
then they flipped bits the other way and found more bugs
<mjg>
:d
<mjg>
not surprising, but funny
<geist>
hah. a thing we generally picked up from my code (was kinda new to google) was to add magic values to a lot of stuff
<geist>
and honestly i think that finds more use-after-frees than anything else i've seen
<geist>
or general corruption
<Ermine>
crash > doing shit
<heat>
uefi is high on magic values too
<mjg>
in the entire ordeal i would be worried about reproducibility of builds though
<geist>
it's pretty good about finding dma corruption and general hardware instability
<geist>
we find that surprisingly large amount of time. if you are running hundreds or thousands of machines running unit tests you'll start to see patterns
<geist>
heck we even found a ARM machine a few years back in our test fleet that literally had a broken floating point unit
<geist>
would generate bad vectors and we'd see it in a unit test, on that one machine
<mjg>
:p
<mjg>
hardware was a mistake mon
<geist>
but what happens is the kernel tends to be the canary, since the debug builds have a crapton of assserts and internal checks
<geist>
tends to be the thing that stubs its toe first
<geist>
or stray DMAs over the kernel
<geist>
not having ECC is a mistake, full stop
<geist>
but alas.
<geist>
9/10 times a hardware failure in the test fleet is bad ram
<Ermine>
should i buy ecc memory for desktop
<geist>
well, a) you need a desktop machine that can do it (AMD machines can, intels probably no, screw intel)
<geist>
b) it'll be probably 2x the price
<geist>
c) you'll lose a little bit of performance
<mjg>
2x the price, 0.999999x the crashes
<geist>
for a server, 100%. for a file server? 100%
<geist>
well, crashes is fine. corruption is what i care about
<mjg>
your storage is of more concern in a desktop
<geist>
i dont want it silently corrupting things
<mjg>
ye i agree, things are not good here
<geist>
which i had, years ago. a file server that silently corrupted my shit (a bunch of mp3s at the time)
<mjg>
well that was not necessarily ram
<geist>
mp3 corruption is annoying since it can take a while to notice it
bauen1 has joined #osdev
<mjg>
storage going bad is pretty standard
<geist>
it was 100% ram because once i noticed corruption (via md5 summing stuff) i did a ram test and it was hella broken
<mjg>
which is what i was after in the above comment
<mjg>
so for example zfs checksums stuff and has copies specifically to combat shite storage
<geist>
you could md5 sum the same file, entirely in the file cache and it would get a different answer
<geist>
yep, that would help a lot now. this was like 20 years ago
<mjg>
i think this is when zfs got the feature mon :D
<geist>
20 years ago you'd have to run SOLARIS
<mjg>
albeit at the time you probably had to be on solaris
<geist>
to get zfs
<acidx>
I'd take corrupted mp3s over running 20 year old solaris
<geist>
bbiab. gotta go. boat docking
<mjg>
well a production-quality freebsd port was not far off from that timeline mon
Gordinator has quit [Quit: My client has closed - perhaps I did that, perhaps I didn't]
<heat>
CHECKSUMS BABY
<heat>
WOOOO
<mjg>
checksummen == good
<kof673>
https://0x0.st/s/5vA6EAnyt-hTxnKE5Qje4Q/X9Qm.c untested, incomplete, probably full of bugs, but i am attempting "portable" md5 code, with a base type of 8, 9, 16, 32, 36, or 48 bits, in case you don't have a 32-bit type :D
<mjg>
portable to what
<mjg>
discord?
<kof673>
"in case you don't have a 32-bit type" lol
<mjg>
ah the configure spirit
<kof673>
i think i've seen a 16-bit before, but not sure of licensing, i am using john walker "public domain" version in C
<kof673>
the 48-bit trickiness, is the 56030 dsp, 24-bit char/short/int, 48-bit long (and long long, but identical)....so it needs some reworking for that. the others, can just simulate 32-bit stuff, and pdp-10 gcc i believe the 36-bit type can be accessed as 4x 9-bit uchars
<kof673>
36-bit should be identical to 32...just clamp to 32 for safety where needed i believe
<kof673>
i avoid memset(0) at the end, because strictly i am not sure you are guaranteed to be able to do that, but not sure i have ever seen such a platform...the indentation funniness at the end
<heat>
the too many parens is weird but i get it
<heat>
the ptr -> member thing is terrible though, congrats
MiningMarsh has joined #osdev
netbsduser has joined #osdev
rom4ik has quit [Quit: bye]
rom4ik1 has joined #osdev
eck has quit [Quit: PIRCH98:WIN 95/98/WIN NT:1.0 (build 1.0.1.1190)]
eck has joined #osdev
<Ermine>
heat: are there any specific complexities in implementing SCM_RIGHTS over datagram sockets?
<kof673>
i did find one interesting post, but did not save
<kof673>
basically was claiming "K&R 2" ...void * could hold "any pointer" including function pointers. but this was changed at the insistence of one vendor/compiler-writer, to create separate data/function pointers. but they ended up fixing their compiler anyways. his reasoning was void * 1) cannot be dereferenced anyway, without casting first 2) can just be large enough to hold either data or function pointer, if they differ
<kof673>
that was how he read the standards anyways "any pointer" he included void * cast to/from function pointers
<kof673>
1) differs from how char * was being used prior. so he was arguing that is what void * was supposed to be, or how he thought it should be, but one single vendor lobbied otherwise, even though they later fixed their compiler.
<kof673>
there would still be separate data and function pointers, but void * could hold either
<kof673>
posix of course mandates same size IIRC...so you can say this happened "in practice" anyways, but it could've been guaranteed rather than "extensions" to standards or in posix case, a subset
rom4ik1 has quit [Quit: bye]
rom4ik1 has joined #osdev
getz has quit [Changing host]
getz has joined #osdev
<kof673>
"spot the bug" the 8-bit/9-bit cases should not be shifting by 13 lol those are just for completeness but :D
rom4ik1 has quit [Quit: bye]
<netbsduser>
Ermine: i think most implementations of right passing include a tracing GC
<Ermine>
netbsduser: that's for both stream and datagram sockets, I'm asking for stuff which is dgram-specific
<Ermine>
Heard that it's broken in freebsd
<netbsduser>
it's different in freebsd
<netbsduser>
i had to deal with this for systemd
<netbsduser>
i forgot the exact details
rom4ik1 has joined #osdev
<netbsduser>
but it (together with SCM_CREDS/SCM_CREDENTIALS) differs subtly between freebsd and linux
<netbsduser>
expect special fun with MSG_PEEK
stilicho has joined #osdev
rom4ik1 has quit [Quit: bye]
rom4ik1 has joined #osdev
<chiselfuse>
is dtrace useful/used much nowadays?
<mjg>
on linux no
<chiselfuse>
mjg: what compensates on linux then?
<mjg>
ebpf
bauen1 has quit [Ping timeout: 265 seconds]
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
stilicho has quit [Quit: Client closed]
memset has quit [Remote host closed the connection]
memset has joined #osdev
navi has quit [Quit: WeeChat 4.2.3]
netbsduser has quit [Ping timeout: 244 seconds]
Starfoxxes has quit [Read error: Connection reset by peer]
netbsduser has joined #osdev
cow321 has quit [Remote host closed the connection]
cow321 has joined #osdev
memset has quit [Remote host closed the connection]
memset has joined #osdev
memset has quit [Remote host closed the connection]
memset has joined #osdev
<heat>
Ermine, i don't think so
<heat>
but tbqh i dunno
<heat>
i'm not a SCM_RIGHTS specialist, and this is all COMPLETELY UNDOCUMENTED IN POSIX
<heat>
POSIX THE GREAT STANDARD THAT DOES NOT DOCUMENT IMPORTANT STUFF
<Ermine>
yeah, posix, you had one job
<heat>
they basically say "SCM_RIGHTS lets you pass fds, here's the struct" and boom, nothing else
<heat>
MSG_PEEK behavior? nope, not specified!
bauen1 has joined #osdev
<sortie>
heat: It doesn't even say that much
<sortie>
It says SCM_RIGHTS exists and does something like that, it doesn't even mention fds, or not to use it, or that you pass ints, or what not
<sortie>
It's a bit wild whenever POSIX tries to standardize something as a stub that you cannot use, like ioctl or posix_devctl
<heat>
ioctl was entirely defined for the best feature ever, STREAMS
<Ermine>
do streamers use STREAMS
<nikolar>
STREAMS
X-Scale has joined #osdev
<Ermine>
what is even posix_devctl
<heat>
it's a new made up ioctl
<heat>
that *no one* implements
<Ermine>
google gives links to qnx docs
<Ermine>
but those redirect to their home page
<Ermine>
posix, you had one job [2]
<heat>
posix is the US congress of operating systems
<heat>
in that they pretend to work but don't actually do anything of note
goliath has joined #osdev
<heat>
sorry, pthreads were okay, posix_spawn ended up being /okay/ too
<Ermine>
another day, another pipewire issues
<heat>
classic
<heat>
if i had to jump on a voice call without issues speaking or sharing my screen, i'd think i accidentally booted into windows
<Ermine>
or it is a miracle
<heat>
RING THE CHURCH BELL
<Ermine>
not so long ago zoom just crashed when I tried to share my screen in sway
xenos1984 has quit [Read error: Connection reset by peer]
<heat>
THE YEAR OF THE LINUX DESKTOP IS UPON US
<Ermine>
that's why I have x11 plasma as a backup desktop
memset has quit [Remote host closed the connection]
<karenthedorf>
When writing x64 interrupt handlers: Am I right in thinking that on entry, the stack is normally misaligned, unless an error code has been pushed? Hardware aligns to 16 bytes, the pushes 5(no error code) or 6(error code) 64-bit words?
<karenthedorf>
I then push 9 registers (The SYS-V ABI caller saved registers), which realigns the stack in the non-ec case but misaligns it in the ec-case? So I should add 0x8,%rsp when there's an error code?
<karenthedorf>
I'm confused because I was starting from copying what clang does with __attribute__((interrupt)), but it seems to do 2 extra 64-bit pushes in the ec case, which is non-sensical.
vdamewood has joined #osdev
<karenthedorf>
gcc does what I just described.
xenos1984 has joined #osdev
X-Scale has quit [Ping timeout: 256 seconds]
<gog>
karenthedorf: generally most ISRs will push for the non-ec case
gildasio1 has joined #osdev
gildasio has quit [Remote host closed the connection]
<bslsk05>
github.com: sophia/kc/core/cpu/exceptions.S at main · adachristine/sophia · GitHub
<gog>
line 27
<gog>
or rather, line 4 begins the macro, like 27 begins the condition applied to the macro
<karenthedorf>
gog: Yeah, other than a few specific ones with vectors <32
<karenthedorf>
But those are some pretty critical ones like #PF
<gog>
my macros cover all current cases
<gog>
i think
<gog>
but i only actually define bodies for #PF and #GP
<karenthedorf>
gog: https://pastebin.com/WedtWhNN This is what I've ended up with. Seems to align the stack correctly if I intentionally take a page fault. (I wwill probabally need to pass the address of the stack frame to C eventually, right now just pass the vector and error code)
<gog>
that's a workable approach too, but for me i pass the entire stack frame as a parameter to the C code
<gog>
so it always has to be the same size
<gog>
interrupts and exceptions are convenient times to do context switches
* vdamewood
inserts a fish into gog's interrupt handler
<karenthedorf>
Yeah I could have INTERRUPT_STUB push 16 bytes. Or have EXCEPTION_STUB pass 16 above the stack pointer.
* gog
vectors to fishy
<karenthedorf>
Depending if I want the EC in the stack frame or passed separately
SGautam has joined #osdev
<gog>
yeah that's essentially the same approach as me, only two different macros instead of one with conditionals
josuedhg has quit [Quit: Client closed]
josuedhg has joined #osdev
<heat>
karenthedorf, push a dummy error code
<heat>
and keep it in the stack
<karenthedorf>
That's probabally the better way yeah.
<heat>
then it's ez to handle any case, no ifs buts and maybes
antranigv has quit [Ping timeout: 272 seconds]
netbsduser has quit [Ping timeout: 260 seconds]
npc has quit [Remote host closed the connection]
<karenthedorf>
Yep, that means I no longer need any postscript in the stub. (optional: pushq $0), push rdi, mov $idx,rdi, jmp common_stub is all it needs.
<heat>
add $8, %rsp; you don't actually need to store :)
<karenthedorf>
Well... current implementation of my interrupt handler ust prints the interrupt number and the error code (if it's non-zero). So right now I do. In future no.
<heat>
aight
<heat>
also i meant sub, not add :)
<karenthedorf>
Also gcc and clang both prefer `push %rax` over `sub $8,%rsp` as it's a smaller instruction. Not sure that applies to immediates.
<heat>
gcc and clang prefer weird stuff sometimes
<heat>
it *might* be that it's 0.01% faster, i dunno i'm not a compiler :)
<bslsk05>
gitlab.freedesktop.org: drivers/gpu/drm/nova · nova · drm / nova · GitLab
<mcrod>
why wouldn’t they be mainlined?
<Ermine>
3 months ago though
<Griwes>
heat, they are still a trash fire, though they get fed more information from us these days than until recently, so maybe it'll get better
<heat>
mcrod, there's a whole API wrapper layer around nvidia.ko
<heat>
because they do share this driver between systems
<heat>
mainlining (making it "linux-pure") would be anti-business
<mcrod>
ah
<Griwes>
I've heard whispers of maybe landing something, just not in /drm/
<Ermine>
amd shares stuff between systems as well, doesn't it
<heat>
probably not
LambdaComplex has quit [Server closed connection]
<heat>
considering radeon and amdgpu are different drivers
<Griwes>
the windows graphics layer is its own beast that needs its own special treatment
<Ermine>
that's what they said me in some issue
<Griwes>
so there's already a whole bunch of stuff that's not shared
<heat>
intel literally develops two completely separate drivers with two separate teams with no shared knowledge between
<Griwes>
and a huge portion of the shared code has been pushed into the firmware on the gsp
<Ermine>
that explains why intel windows drivers work better than linux ones
<heat>
do they?
<karenthedorf>
If it's anything like AMD, nouveau will continue to exist, poorly maintained, in "legacy hardware" mode until it dies of bitrot.
<guideX>
do you guys find it tough to find time to work on your os, I find myself working on it in the wee hours of the morning, I have these bags under my eyes lately xD
* karenthedorf
types this from a laptop that's too old for working AMDGPU support
<karenthedorf>
And the last fglrx release was over a decade ago.
<Ermine>
heat: I feel that yes
<puck>
mind you, the nouveau driver runs at full speed under modern GPUs (GSP, same as the open nvidia driver)
<puck>
(afaict)
<heat>
nouveau driver running at full speed must be like a scooter at full speed
goliath has quit [Quit: SIGSEGV]
<mcrod>
can confirm nouveau is garbage on my 3090ti
<mcrod>
not using the proprietary drivers might as well be death
<mcrod>
i don’t even know why they bother
<mcrod>
nouveau has been around since forever and it’s nowhere close to decent usability
<Ermine>
did you try with nvk_zink?
<Ermine>
nvk+zink i mean
<mcrod>
no
phr3ak has quit [Server closed connection]
phr3ak has joined #osdev
<mcrod>
that sounds like it would be more trouble than it’s worth
<heat>
you don't get it mcrod
<heat>
you get to be the beta tester for a 3D driver
<heat>
it's gr8
<heat>
don't worry this one is written in rust
<Ermine>
well I just was genuinely curious
<Ermine>
I can't test since I don't have nvidia hardware
<heat>
it's possible it might help, it's possible it might crash
<heat>
oh wait it can't crash, it's rust
<heat>
it'll just panic!()
<Ermine>
it panics instead
<heat>
.unwrap()
memset has quit [Ping timeout: 260 seconds]
<Ermine>
did I say that Karol Herbst is rust fan apparently?
<Ermine>
anyway, I won't say everything that happened on that way to the triangle
<karenthedorf>
First create a vulkan instance and device. Then code the rest of the fscking owl.
<heat>
give up when you realize you need to do matrix math
<karenthedorf>
(Also, I hope you have the right color space and not the horrible default newbies pick of RGBA8888_UNORM,COLORSPACE_SRGB with no color correction in the shader)
<Ermine>
heat: easiest part tbh
<heat>
says the math guy
<heat>
you know i need to relearn matrix multiplication every six fucking months
<mcrod>
matrix math isn’t that bad
<Ermine>
I spent a lot of night time to compute eigenvectors, Jordan forms, QR secompositions, etc
<Ermine>
I was really lucky with my linear algebra seminarist
<heat>
i understand, but otoh i always forget how to fucking MULTIPLY A FUCKING MATRIX HOW DOES ONE DO THAT
<heat>
it's magic man
<mcrod>
write a game engine
<mcrod>
you’ll never forget
<heat>
game engines use linear algebra libraries
<Ermine>
take lines of the first matrix and multiply it by the columns of the second, ezpz
<mcrod>
if you aren’t doing it all bare
<mcrod>
what are you learning
<Ermine>
anyway, isn't gpu supposed to do that job
<mcrod>
note: i’ve never written a game engine
<heat>
bro a game engine is a little more than matrix multiplication
<heat>
great q ermine, i think it depends?
<Ermine>
game engine is a FUCKING LOT
<heat>
if you want to do a certain op in the shader or in the CPU
<mcrod>
yes i know
<mcrod>
game engines are in my mind the Big Three software projects to attain godhood
<mcrod>
no, i’m not that dramatic.
<heat>
"if you aren't doing it all bare what are you learning" is a terrible sex ed slogan mcrod
sebastiencs has quit [Server closed connection]
X-Scale has joined #osdev
<mcrod>
no it’s perfect if you think about it
sebastiencs has joined #osdev
<Ermine>
well okay
<Ermine>
anyway, the unclear part for me is how graphic pipeline and render pass got assembled
<heat>
mcrod, what are the other two?
<heat>
dont say os and emulator dont say os and emulator dont say os and emulator
amj has quit [Server closed connection]
amj has joined #osdev
<mcrod>
i was going to say os
<Ermine>
and ...
spareproject has joined #osdev
<mcrod>
game engine, os, C++ compiler
<heat>
c++ compiler??? admit it, you were going to say emulator but you're taking the piss instead
<mcrod>
:)
<heat>
ALTHOUGH a C compiler would probably be in my top enlightening software projects yeah
<heat>
not C++. fuck that
energizer has quit [Server closed connection]
<mcrod>
C++ is just an exercise in how well you can parse
<mcrod>
parsing for me is fucking H A R D
<heat>
C++ is super insane, the parsing is insane, don't forget the templates and the PIMPL and the SFINAE and the OH GOD NOT THE CONSTEXPR NO PLEASE NO
<Ermine>
you need to admit that your life is too short to implement a useful C++ compiler
<mcrod>
NOT THE CONSTEXPR!
energizer has joined #osdev
X-Scale has quit [Ping timeout: 256 seconds]
<Ermine>
you need the goodhood first
<heat>
most vexing parse!
<mcrod>
for the record
<heat>
void f(double my_dbl) {
<heat>
}
<heat>
int i(int(my_dbl));
<heat>
fuck me
<mcrod>
you get a medal of honor if you accomplish any of the above projects
<mcrod>
someone who does all 3 is considered an honored elder
<Ermine>
now I'll maybe rewrite this boilerplate dropping glfw and using libwayland and egl
<heat>
problem is none of those projects are ever finished
<mcrod>
exactly
<heat>
Ermine, seriously reconsider that
<Ermine>
why
<karenthedorf>
egl? For vulkan?
<heat>
you dropped glfw and now you're dealing with egl and wayland insanity, wait now it doesn't work on xorg either
<karenthedorf>
But yeah, wayland isn't too insane. X meanwhile...
<heat>
oh not egl, they have some windowing extensions
<heat>
in vulkan
<heat>
WSI?
<karenthedorf>
heat: Yes.
j`ey has quit [Server closed connection]
j`ey has joined #osdev
<Ermine>
yeah, WSI, my bad
<heat>
i love glfw, it's literally perfect
<Ermine>
it's hello world, I have no need to have it work on everything
<karenthedorf>
GLFW doesn't do the WSI parts of vulkan for you. With the exception of "You need this extension and here's a VkSurfaceKHR. Now code the rest of the swapchain and main loop"
<gog>
can't even pronounce glfw
<Ermine>
s/work/working/
<heat>
gee el eff double-u
<karenthedorf>
Making a VkSurfaceKHR yourself is like 2 lines of code.
<gog>
eff double-u too
<Ermine>
i did that
<heat>
fuu
<Ermine>
as per tutorial
<gog>
double-yew
<heat>
did you mean: double-jew
<karenthedorf>
Please don't use vulkan-tutorial, if that's what you mean by 'tutorial', it's not maintained and has synchronization bugs.
<mcrod>
is it sex time yet
<heat>
gog the antisemtic darn
<heat>
mcrod, wrong window
<mcrod>
ah right
<Ermine>
well i'm already using it
<gog>
i didn't mean that heat
<heat>
isn't j -> y a pretty common nordic pronounciation
<heat>
maybe swedish only?
<gog>
i meant yew as in the tree
<heat>
i know dont worry i'm not cancelling you
<heat>
i am not a right winger
<gog>
i'm cancelled already it's fine
<gog>
you can cancel me
* mcrod
ok’s gog
MiningMarsh has joined #osdev
Left_Turn has quit [Read error: Connection reset by peer]