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
brunothedev has quit [Quit: WeeChat 3.6]
<zid> heat: did you still want new bench.cpp running
<heat> yeah
<zid> what does the final /%d mean
<zid> I thought it might be power of two alignments or something until it said 10
<heat> it's copy-size/misalignment
<zid> oh so it is alignments, but you just picked random ass numbers
<heat> it has a bunch of normal powers of 2 plus some rando numbers I randomly added
<zid> 0 1 4 8 10
<heat> 10 is a bit of an outlier at the only non power of 2
<heat> but idgaf
<bslsk05> ​gist.github.com: gist:37741bfa625eab3cb926e33bb79b6e1c · GitHub
brunothedev has joined #osdev
brunothedev has quit [Client Quit]
<zid> That might need sorting by column 3,1,2 order
<zid> after split on /
nyah has quit [Quit: leaving]
<heat> thank you
<heat> im even more confused
<zid> nice
<heat> i think your vm is fucking with the results
<heat> but this looks legit
<zid> I think your face is a mess
<zid> let's not throw stones
<heat> fuk u
<heat> but seriously that sharp-ass 4KiB rep movsb stuff is pretty bizarre
<heat> which completely disappeared it seems
<zid> new g++ who this
<mjg> ?
<heat> question mark
<mjg> watching some Lost?
<zid> we didn't say pessimal so he doesn't know what's happening
<mjg> millenial show, you might have missed it
<heat> PESSIMAL
<mjg> OH OK
<heat> PESSIMAL UNIX GEEZER OPENBSD FUCKERY SOLARIS SUNOS
<heat> but yeah it seems that the optimal alignment for ERMS really is 32 byte
<heat> also seems that glibc memcpy gets spanked by rep movsb here, which is funny
<mjg> what size
<mjg> doc manual says to use it for > 2KB
<mjg> maybe they use it for 2KB + 1 :p
<heat> IIRC I googled around yesterday and AMD patched glibc to use it for >L1 cache?
<heat> something like that
<heat> anyway i'm happy with these results, these make sense. the other ones absolutely don't
Left_Turn has quit [Ping timeout: 248 seconds]
<heat> the funny bit here is that no alignment seems to have an impact except 32
<heat> there's no point in 16-byte, etc
<heat> i guess their ERMS only does AVX on 32-byte aligned addresses? sounds silly like that
<heat> or maybe there's some sort of slow path
<mjg> i'm confidnet i had seen improvement frm going anything not 16 to 16
<mjg> i don't remembert which cpu though
<mjg> at the time it could have bveen anything broadwell and older
<mjg> and probably ta least one amd
<heat> yeah idk, see the results in the gist
<bslsk05> ​gist.github.com: bench3.cpp · GitHub
Arthuria has quit [Remote host closed the connection]
Lumia has quit [Ping timeout: 255 seconds]
zaquest has quit [Remote host closed the connection]
Lumia has joined #osdev
_xor has quit [Quit: bbiab]
slidercrank has quit [Ping timeout: 248 seconds]
dude12312414 has joined #osdev
[itchyjunk] has quit [Read error: Connection reset by peer]
dude12312414 has quit [Remote host closed the connection]
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
gildasio has quit [Remote host closed the connection]
terrorjack has joined #osdev
gildasio has joined #osdev
Left_Turn has joined #osdev
Left_Turn has quit [Ping timeout: 248 seconds]
gildasio1 has joined #osdev
gildasio has quit [Ping timeout: 255 seconds]
heat has quit [Remote host closed the connection]
Lumia has quit [Ping timeout: 260 seconds]
Lumia has joined #osdev
Lumia has quit [Quit: ,-]
Brnocrist has quit [Ping timeout: 255 seconds]
Celelibi has quit [Ping timeout: 260 seconds]
<geist> you know, retro thing that might be interesting to figure out after the fact: what sort of '3D' capability did a S3 VirGE actually come with?
<geist> at the time they were known for being not really 3d, and was a real bargain bin cheapo card, but there was probably *some* sort of capability
<geist> like some super limited triangle blitting capability
<geist> at least wikipedia seems to indicate it had some decent amount of support for some of the basic fixed function stuff, jsut wans't very fast
<klys> geist do you have an early pci system?
<geist> yeah i have a few
<klys> runs a kernel?
<geist> yes.... though am i signing myself up for work? :)
<klys> naw just following up. I guess svgalib was interesting when it came to cards like this
<geist> oh oh i see
<geist> yeah. i remember s3 trios and s3 virges being the defacto cheapo card chipset for a while
<geist> like the Dell Dimension P90 i got in 1995 and took to college was a Number 9 card with a S3 in it
<bslsk05> ​github.com: svgalib-1/s3.c at master · ryanmcgrath/svgalib-1 · GitHub
<geist> goddamnit why do i waste brain cells remembering precisely the video card i had on one of my computers in 1995
<geist> cripes.
<klys> aww line 1595 says it can't handle 1152x864
<geist> oh manm i remem,ber having a 17" that could do that
<geist> if you had a good DAC. otherwise it looked fuzzy
<klys> yeah it does if your dac is old
<geist> i remember paying good money for a matrox millenium II (still have it) because they were known to have good solid DACs at the time
<geist> and they did
<geist> plus you could upgrade it to 8MB
pounce has quit [Remote host closed the connection]
pounce has joined #osdev
<klys> wasted my evening installing blender 3.5-beta on w7pro64
ThinkT510 has quit [Quit: WeeChat 3.8]
<geist> word. that sounds like solid entry to the wasted evening doing silly computer shit list
<klys> hbu
GeDaMo has joined #osdev
ThinkT510 has joined #osdev
riverdc has quit [Quit: quitting]
riverdc has joined #osdev
nlocalhost has quit [Ping timeout: 276 seconds]
Left_Turn has joined #osdev
selve has quit [Remote host closed the connection]
selve has joined #osdev
MaxLeiter has joined #osdev
Left_Turn has quit [Quit: Leaving]
elderK has joined #osdev
Celelibi has joined #osdev
brunothedev has joined #osdev
craigo has joined #osdev
craigo has quit [Quit: Leaving]
[itchyjunk] has joined #osdev
craigo has joined #osdev
[itchyjunk] has quit [Remote host closed the connection]
bgs has joined #osdev
dennis95 has joined #osdev
elderK has quit [Quit: Connection closed for inactivity]
<bslsk05> ​github.com: MultibootBasicGraphics/vga.cpp at master · Slapparoo/MultibootBasicGraphics · GitHub
<bslsk05> ​paste.sr.ht: paste.txt — paste.sr.ht
<ddevault> problem: I/O through a proxy like this is gon' be pretty slow
<mrvn> ddevault: I simplified that a lot. I don't share memory. So "io::read(buf)" would loose access to "buf" until read returns. And then I though removing and returning "buf" is stupid, lets have read just allocate the buffer itself and return it, safes half the INVLPG.
<mrvn> driver: alloc pages (map), perform IO, send pages back, system: driver page table are active, unmap buf, switch to PROC A page table, map buf, wake up PROC A.
<ddevault> so there's an extra copy in there?
<mrvn> ddevault: no, the pages are transfered. There is one INVLPG in there.
<ddevault> or the reader does not provide a buffer, it just gets one full of the data it wanted; which implies heap thrashing and/or a non-POSIX-like interface?
<mrvn> totally non-POSIX
<mrvn> What is your worry with head trashing? It's 47-55 bit address space.
<mrvn> s/head/heap/
Celelibi has quit [Ping timeout: 248 seconds]
<ddevault> just lots of allocations
<ddevault> since there would not be buffer reuse?
Celelibi has joined #osdev
<mrvn> ddevault: no.
<mrvn> If you have shared memory you should look into io_uring. You could use a ring of buffers too, not just commands.
<ddevault> yeah I'm familiar with it and it's something I want to play with in terms of design
<ddevault> but for now I want something which balances simplicity with performance/utility
<mrvn> Your proxy would turn into a uring object instead.
<mrvn> Are you doing page table separation for the kernel?
<ddevault> no, but I might
<mrvn> Do you map all physical memory somewhere in kernel space?
<ddevault> yes
<mrvn> then "look up page caps
<mrvn> " would also translate user pages to the phys mapped pages.
<ddevault> the kernel is more or less uninvolved in this transaction
<ddevault> IPC calls and replies visit the kernel, but it just copies registers over (and potentially capabilities)
<mrvn> io::read(buf) ==> user pages -> phys io_vec ==> io::read{io_vec}(vec)
<mrvn> and you probably need an allocation in there to create the io_vec.
<mrvn> I assume you don't want your driver to access the users page table.
Left_Turn has joined #osdev
<ddevault> no, but it gets the relevant page capabilities and can map them into its own address space (shared mem)
<mrvn> Urgs, that will be slow. (just like my code)
<bslsk05> ​git.sr.ht: ~sircmpwn/mercury: cmd/usrinit/main.ha - sourcehut git
<ddevault> something like this
<ddevault> note: destroying the pages destroys only this process's copy of them, and unmaps them in the process
<mrvn> I guess you then have all the disadvantages of separate page tables like I have and none of the advantages of not having shared memory.
<ddevault> not sure I follow the consequences of the presence or absence of shared memory in your explanation
<ddevault> note that the reading process blocks during the operation
<mrvn> ddevault: you have to lock the vm structures and refcount how many processes have the page mapped
<mrvn> And with threads you have one thread writing to your memory while the driver reads or writes.
<ddevault> hm
<mrvn> Note that when you have caches then you have to lock down the "buf" pages, unmap them, do a shootdown to other cores, setup COW form the cached pages, map the pages, return.
<ddevault> yeah
<mrvn> And the unmap might have to be across multiple processes if the page is mmaped in multiple processes.
<mrvn> shared memory is hard. :)
<ddevault> lots to think about, thanks
<mrvn> One thing I'm considering is to have "read()" return a read-only buffer. If you want to modify it and write it back you have to copy it. Internally the process just gets the pages from the cache mapped. That would be a very simple shared memory.
nyah has joined #osdev
<mrvn> Maybe with a extra flag on read "mutable = false/true"
levitating has quit [Read error: Connection reset by peer]
marshmallow has quit [Quit: ZNC 1.9.x-git-170-9be0cae1 - https://znc.in]
nur has joined #osdev
wootehfoot has joined #osdev
brunothedev has quit [Quit: WeeChat 3.6]
heat has joined #osdev
dude12312414 has joined #osdev
<mjg> > During this debugging session, we saw quite a few examples of coding mistakes that fall in to the category of fairly basic and easily avoided textbook bugs.
<mjg> hue
<mjg> that is my experience with obsd
<bslsk05> ​research.exoticsilicon.com: ExoticSilicon.com - fixing cringeworthy bugs in the OpenBSD console code
<nortti> does anyone else notice excessive CPU usage from the favicon on that page?
<nortti> for me (firefox, linux, i3-2370M) it ends up pegging a core iff the favicon is visible, regardless of whether the tab is loaded or not
<heat> mjg, brb let me just modify my compiler to generate slightly less rop gadgets in exchange for horrible codegen
theboringkid has joined #osdev
kof123 has joined #osdev
theboringkid has quit [Quit: Bye]
theboringkid has joined #osdev
theboringkid has quit [Client Quit]
[itchyjunk] has joined #osdev
Starfoxxes has quit [Ping timeout: 255 seconds]
Starfoxxes has joined #osdev
marshmallow has joined #osdev
slidercrank has joined #osdev
Raito_Bezarius has joined #osdev
Raito_Bezarius has quit [Read error: Connection reset by peer]
Raito_Bezarius has joined #osdev
Raito_Bezarius has quit [Read error: Connection reset by peer]
Raito_Bezarius has joined #osdev
Arthuria has joined #osdev
gxt__ has quit [Remote host closed the connection]
gxt__ has joined #osdev
dennis95 has quit [Quit: Leaving]
elastic_dog has quit [Ping timeout: 248 seconds]
elastic_dog has joined #osdev
fkrauthan has quit [Quit: ZNC - https://znc.in]
fkrauthan has joined #osdev
<bslsk05> ​discourse.llvm.org: Avoidable overhead from threading by default - LLD - LLVM Discussion Forums
<heat> is buildkernel the only bench you have
<mjg> no, i also have package build
<mjg> also you ignored the variety of kernels i build!
<heat> "I would bench linking Chrome or something else of that sort but don’t have sensible means to do it"
<heat> this 100% proves someone is holding you hostage and making you buildkernel over and over
<mjg> have you tried linking chrome on purpose
<mjg> liek fuck me dude
<heat> why?
<heat> you have a fucking 96T machine
<mjg> there is 8 layers of magic before you get to the command
<heat> boohoo
<heat> cry
<mjg> i am
<heat> enjoy the magic of repo and gn
<mjg> bitch plz
<heat> its honestly not that hard
<mjg> i can't be arsed to get all the deps and whatnot so that it compiles on uuubuntu
<mjg> if they have anyone working on the linker, perhaps that person has means to bench and that would be ze bestesterest
<heat> ping maskray maybe
<mjg> i'll wait few days and we will see who bites
<heat> but srsly it's not that hard
<mjg> i don't know any maskray
<heat> it's the main lld guy, google
<mjg> i'm not claiming difficulty, just annoyrance
<heat> also was the one who added RELR support to rtld
<heat> the really fucking depressing bit is all the compute it needs to actually build
<mjg> also how on earth are you doing webdev and snizzing at benching with kernel build
<mjg> that's liek the age old way mate
<mjg> kids today!!
<heat> doing whatdev now
<mjg> erm, osdev!
<mjg> that was uncalled for
<mjg> apologies
<heat> because a kernel build is a very specific piece of software unlike other stuff
<heat> it's like doing an LTO build with the kernel and figuring out there's not much perf gain in it
<heat> and then you do it on a heavy C++/Rust program and you get big gains
<mjg> btw guess where is over 77% of the time spent
<mjg> when lld spawns 96 threads for fuck all reason
<heat> scheduling in/out
<mjg> 77.61% ld.lld-15 [kernel.vmlinux] [k] native_queued_spin_lock_slowpath ◆
<heat> aw
<mjg> but don' tell inux devs
<heat> for what lock?
<mjg> unclear as is, it comes from __clone3 so most likely tasklist_lock
<heat> ok, that's ok then
<mjg> - 73.78% 73.61% ld.lld-15 [kernel.vmlinux] [k] native_queued_spin_lock_slowpath
<mjg> 73.46% __clone3 (inlined)
<mjg> well it is less ok than you think, i happen to know this bit does not scale very well
<heat> unless you want RCU there
<mjg> to the point were freebsd(!) is doing better
<mjg> it totally does not have to globally lock anything, rcu or not
<mjg> the current state is an artifact of the implmentation
<heat> so how do you add your task to the list of tasks
<mjg> for one you may note you don't need a global list
<heat> sure you do
<mjg> nope, but it doessimply stuff vs shitters like ptrace
<heat> "list tasks" becomes a lot harder if you need to traverse a process tree
<mjg> see, they already do it in an incredibly racy manner
<mjg> you may as well have a bunch of lists which you leap frog
<heat> this is why you should test chrome: "In the default build configuration (no debug information), (circa Dec 2021) there are 8905295 sections (not counting the NULL section at index zero), 3325621 discarded COMDAT sections, 1372104 input sections (mostly SHT_PROGBITS, not counting SHT_RELA/SHT_SYMTAB or discarded COMDAT sections)."
gog has joined #osdev
<mjg> i did note chrome will need to be tested
<gog> ??
<heat> QUESTION MARK QUESTION MARK
<mjg> gog: the usual
<gog> hi
<heat> H I
<mjg> gog: have *you* seen Lost?
<gog> i haven't
<mjg> "questionmark" is one of the episodes over there
<gog> neat
<heat> gog: have *you* seen mjg?
<gog> yes
<heat> i lost him
<gog> he's right there
<mjg> *don't* watch tho
<heat> where
* gog points
* mjg hides
<heat> rude
<gog> where'd he go
* mjg laughs quitely
<gog> what's cheap hosting
<gog> i'm making a website that will serve as my portfolio
<bslsk05> ​www.businessinsider.com: James Comey Tried to Blend in With White House Curtains to Avoid Trump
<heat> "mjg tried to blend in with #osdev curtains to avoid heat"
<mjg> heat: do you know who Chuck Testa is?
<heat> gog, github
<gog> i need actual hosting
<heat> mjg, no
<heat> gog, cloudflare
<gog> hwo cheap is it
<gog> does it host docker images
<heat> oh nah not that
<bslsk05> ​www.youtube.com: Official Ojai Valley Taxidermy TV Commercial - YouTube
<gog> the portfolio itself is going to be a web application which is part of the portfolio
<gog> probably overkill
<heat> why is a fucking docker image in your portfolio mang
<gog> to prove i know how to do aspnetcore stuff
<heat> i thought you wanted just fucking html
<gog> nah it's gonna be stupidly complex
<gog> for no reason other than show off
<heat> can I detract you from this
<gog> idk maybe
<heat> ok good, please dont
<heat> find another way
<gog> you're no fun
<heat> gcp storage buckets and or aws s3 are ok-ish I think if you really need that
<heat> or cheeky git lfs
<heat> oh or github artifacts
<gog> ok
linear_cannon has joined #osdev
<Ermine> gog: may I pet you
<gog> yes
<lav> hi gog and heat :3
* gog patpatpatpat lav
* lav uwu
<lav> speaking of hosting i just got hosting uwu
<lav> gog: apparently oracle has free vps if you're willing to use oracle linu
<lav> x
<heat> HARD SKIP
<heat> hi lav
<lav> hii
<gog> lav
<gog> i looked into it but they wanted a credit card number "just in case"
<gog> and i don't trust like that
<lav> yeah :3
<gog> colon threeeeeeeeeeee
<lav> meow
<gog> :3
<nikolar> Ɛ:
<bslsk05> ​vampires.gay: vampires dot gay
<gog> owo
<heat> gog, they'll always ask for a cc
<heat> no way around it really
<gog> i refuse to pay for anything ever
<gog> my taxes should cover web hosting
<heat> when marx talked about labour he meant computational labour
<heat> communal compute
<gog> yes
<gog> social computing
<gog> computism
<gog> how many apple watches is a smart coat worth
<gog> etc
* Ermine pets gog
Left_Turn has quit [Remote host closed the connection]
Left_Turn has joined #osdev
<geist> hello fronds
<geist> welcoe to the weekend
<nikolar> Hello geist
flx-- has joined #osdev
Amorphia has quit [*.net *.split]
wootehfoot has quit [*.net *.split]
dormito has quit [*.net *.split]
craigo has quit [*.net *.split]
Bonstra_ has quit [*.net *.split]
rein-er has quit [*.net *.split]
dminuoso has quit [*.net *.split]
Beato has quit [*.net *.split]
k0valski18891 has quit [*.net *.split]
acidx has quit [*.net *.split]
dayimproper has quit [*.net *.split]
vismie has quit [*.net *.split]
Piraty has quit [*.net *.split]
duthils has quit [*.net *.split]
CompanionCube has quit [*.net *.split]
cln has quit [*.net *.split]
froggey has quit [*.net *.split]
dennisschagt has quit [*.net *.split]
flx- has quit [*.net *.split]
sm2n has quit [*.net *.split]
yyp has quit [*.net *.split]
milesrout has quit [*.net *.split]
staceee has quit [*.net *.split]
gpanders has quit [*.net *.split]
tommybomb has quit [*.net *.split]
ddevault has quit [*.net *.split]
alecjonathon has quit [*.net *.split]
exec64 has quit [*.net *.split]
alethkit has quit [*.net *.split]
tom5760 has quit [*.net *.split]
noeontheend has quit [*.net *.split]
utzig has quit [*.net *.split]
whereiseveryone has quit [*.net *.split]
dennisschagt has joined #osdev
dayimproper has joined #osdev
Bonstra has joined #osdev
CompanionCube has joined #osdev
Beato has joined #osdev
Piraty has joined #osdev
yyp has joined #osdev
froggey has joined #osdev
dormito has joined #osdev
rein-er has joined #osdev
yyp_ has joined #osdev
yuiyukihira has joined #osdev
noeontheend has joined #osdev
exec64 has joined #osdev
alethkit has joined #osdev
tom5760 has joined #osdev
gpanders has joined #osdev
ddevault has joined #osdev
whereiseveryone has joined #osdev
tommybomb has joined #osdev
vismie has joined #osdev
Amorphia has joined #osdev
<nur> hello geist
dminuoso has joined #osdev
<nur> it's been weekend for quite a while for me now
alecjonathon has joined #osdev
sm2n has joined #osdev
utzig has joined #osdev
milesrout_ has joined #osdev
acidx has joined #osdev
<geist> yes but i have nw declared it a weekend
<GeDaMo> US-ians, clocks go forward this weekend
ilovethinking has joined #osdev
<ilovethinking> does anyone here run arm
<ilovethinking> please
<ilovethinking> i can;t fucking take it anymore
<ilovethinking> as much as i love osdev i can't generate a grub image
<ilovethinking> there has to be someone with arm succeeding at it
<ilovethinking> i mean i would just use -kernel but it doesnt support mb2
<mrvn> for arm you wouldn't use multiboot
<mrvn> nor grub
wootehfoot has joined #osdev
<geist> ilovethinking: that's correct. lets go back to the start. what are you trying to do here?
<geist> most likely it's actually simpler than you think on ARM, there's just less stuff you generally need to do, doubleplus so on qemu
<geist> notably: are you doing arm32 or arm64? (not much difference, but it changes some out of answers)
<ilovethinking> nonono
<ilovethinking> i run an arm machine
<geist> okay
<ilovethinking> it's jsut that i can't use grub-mkrescue
<ilovethinking> to make my x86_64 os image
<geist> that is correct
<geist> grub-mkrescue is a 'cheat' in that it assumes the target is the same machine
<geist> so you have to do it the manual way, which should be findable
<geist> but basically forget that that exists, and then look for the directions to manually building a grub image
<ilovethinking> i tried making a vm but they just don;t wor on utm (or are too slow to use, took 5 minutes to open a terminal), i tried compiling it with a cc but that also didn't work
<geist> IIRC it's not that complicated, especilal since you're building one for one purpose. it shouldn't be more than a few commands
<geist> if you want to cross compile grub you can probably apt-get the x86_64 toolchain
<mrvn> why don't you just but grml on x86 and make the image there?
<geist> depends on what sort of arm machine you have
<mrvn> s/but/boot/
<ilovethinking> i tird but on an m1 mac it's bad
<geist> so you're on a m1 mac right now?
<ilovethinking> there are toolchains on homebrew but something just doesn't wokr
<ilovethinking> yes
<geist> okay, so you're running macos i assume
<geist> so what might make sense here is to skip dynamically building the grub image, take a pre-initialized one and just 'patch' it with yuor binary
<geist> that's what i generally do to avoid exactly this problem. i have a grub disk image, formatted FAT, etc, that i use mtools to stuff in new versions of the kernel
<geist> but then that depends on what you're going to do with the image
<ilovethinking> what filesystem is the default (aka what fs should i use)
<geist> for GRUB?
<jimbzy> Good day, OSDevers.
<ilovethinking> geist: yes
<ilovethinking> hey jimbzy
yyp_ has quit [Remote host closed the connection]
yyp_ has joined #osdev
<geist> ilovethinking: i'd use FAT, since it's easiest to manipulate from various OSes, like mac
<geist> 'mtools' is a great package you can use for that. should be able tog et it from homebrew or macports
<geist> jimbzy: howdy
<jimbzy> How's it going?
<ilovethinking> yeah i have mtools already
<ilovethinking> wait geist wdym "preinitialized"
<ilovethinking> oh you mean like someone elses iso?
<ilovethinking> and write to it?
<geist> right, or set it up on a linux machine once, and then just reuse the grub image
<geist> it's not ideal, but it works quite well. you can even check it into your repo as a mostly empty disk image
<geist> since at the end of the day all you really need is to put your kernel and/or initrd there and maybe tweak a .cfg file
<ilovethinking> wait so what's the mtools for in this case
<geist> the rest of the grub installation on the disk image is effectively pre-canned
<geist> mtools you can take a disk image and modify the contents of it, without mounting it
<geist> so it works great from whatever OS you're on
<ilovethinking> :think:
<geist> but again i'm assuming you're generating a disk image you're booting from an emulator, i dont really know what you're trying to do here
yyp is now known as Guest7071
Guest7071 has quit [Killed (calcium.libera.chat (Nickname regained by services))]
yyp_ is now known as yyp
wootehfoot has quit [Quit: Leaving]
<ilovethinking> well i am trying to make an iso and then boot it up in an x86_64 qemu vm
<geist> okay
<geist> and the qemu vm is using BIOS boot vs UEFI?
<geist> note you can just use -kernel if you want to skip all of this
<geist> at the expense of being somewhat not-what-real-computers-do
<ilovethinking> but i want to use mb2
<geist> multiboot 2?
<geist> (just making sure that's what you mean)
<jimbzy> "Real" computers.
<geist> jimbzy: i mostly say that to stave off the folks that think qemu -kernel is an abomination because it's not 'real'
<geist> like, acknowledge the fact that it is different and move on
<jimbzy> Gotcha.
<ilovethinking> geist: yes, multiboot2
<geist> this was a huge source of consternation over on the discord server, which is why i left
<geist> the MGMT there thought it was heresy to recommend -kernel and were unwilling to budge on the topic
<geist> based on the somewhat narrow view that the only true booting of your OS on anything is the HARD CORE WAY
* geist rolls eyes
<ilovethinking> is it possible to patch qemu somehow to support mb2
<ilovethinking> hmm
<ilovethinking> sounds very complicated tho
<geist> yeah probably not worth it. what are you specifically looking for in mb2?
<geist> have you verified that grub itself on qemu would get what you want?
<jimbzy> Yeah, well one of my CS professors swore up and down that systems that used microcontrollers weren't "real" computers, and that's why my ears perked up.
<ilovethinking> no, i just don't know what other bootloader to use
<ilovethinking> and idk i feel like mb2 is just better because i like the "2"
<geist> ilovethinking: ah. so here's where i say 'dont worry about it, just use MB1'
<geist> there's more bits in the multiboot 2 spec, but if you're just gettings tarted, they wont help you
<geist> if you have a working system and *need* the additional bits that 2 affords then sure
<ilovethinking> idk why but the mb1 spec was a bit confusing
<geist> but then i'd also say a) be careful about depending on it for the reasons you're finding and b) you most likely dont need them, because most of what MB2 gives you is stuff you can find on your own
<ilovethinking> sounds stupid but i don't understand the tags
<geist> okay. why dont we just solve that problem
<geist> instead of trying to invent more and more problems to solve the first one
<ilovethinking> hmm true
<geist> ie, get the tags figured out
<jimbzy> Yes. KISS.
<geist> also step 1 is boot anything at all. are you at that phase yet?
<geist> ie, is the problem that you have something booting and you're having trouble parsing the tags, or is the problem that you're confused about how to start using MB at all?
<ilovethinking> i'm having some problem with the specs, they mention "required tags" but i can;t figure out which ones are the required tags and how to write them
<geist> you didn't completely answer the question: do you have something booting and yuo're trying to parse the tags?
<geist> if not, i'd suggest doing that first. you dont *need* the tags yet. yuo n eed to get some code running
<geist> there's plenty of stuff to do there first
<ilovethinking> i can;t boot without the required tags
<ilovethinking> no they literally say it in the spec
<geist> can you give me an exmaple of what you're saying a tag is?
<geist> https://www.gnu.org/software/grub/manual/multiboot/multiboot.html#Header-layout is what you need. and you really only need like the first 3 fields
<bslsk05> ​www.gnu.org: Multiboot Specification version 0.6.96
<geist> but realistically you need down through offset 32
<ilovethinking> im stupid sorry
<ilovethinking> i meant flags
<geist> you need flag 16
<geist> that unlocks the next few fields
<geist> https://github.com/littlekernel/lk/blob/master/arch/x86/64/start.S#L31 i have a few more than you want, but basically you end up with something prettyu much like this
<bslsk05> ​github.com: lk/start.S at master · littlekernel/lk · GitHub
<geist> just a structure in memory near the start of yuor binary
zxrom has quit [Quit: Leaving]
<ilovethinking> so i set flags to 0b10000000000000?
<ilovethinking> don;t count the 0
<ilovethinking> but you get my point
<bslsk05> ​github.com: lk/multiboot.h at master · littlekernel/lk · GitHub
<geist> same thing, just in hex
zxrom has joined #osdev
<geist> feel free to steal that header file, it's MIT licensed. no reason typing all of that in again
<jimbzy> Good stuff.
<geist> basically what you end up with is a little 32 byte structure that says 'i'm a multiboot binary, bit 16 set in the flags indicuates the next 5 fields describe where to load me and how big i am'
<ilovethinking> thank you very much man
<jimbzy> ilovethinking, For me, one of the most challenging things about OS Dev is figuring out where to start. Obviously, we have to start at the beginning, but it took me quite some time to really understand where that was. :p
<geist> the next tricky part is filling out the structure, and making sure it's within the first 8K of the binary
<geist> the trick i do there in my start.S is to put it just after a jmp instruction around it
<ilovethinking> jimbzy: haha well i'm not exactly starting, i kinda have a lot done with limine but like
<ilovethinking> fuck limine
<geist> so the start of the binary is 'jmp over multiboot struct; <multiboot struct>; actual start of code...'
<geist> that guarantees that it's within the first bit of the binary
<geist> as an aside, when you were mentinoing tags i thought you were talking about the way multiboot passes lists of arguments to the kernel, which is kinda hard to grok first time
<geist> thsoe are tag based, i think
<ilovethinking> can't i just do it manually for now
<ilovethinking> just using dd in the header
<jimbzy> I"ve been starting for about 20 years now, ilovethinking.
<geist> ilovethinking: you absolutely can. in fact in my first OS i did exactly that. just left the space and patched it with an external utility
<geist> but if you do it externally you need to at least leave space for it so that you dont overwrite something else
<geist> so it's honestly just about as complicated as doing it inside the asm like i did there
<geist> and the linker can easily be made to know the values
<geist> jimbzy: yah this is why i tend to key in on what is blocking folks and try to unblock it
<geist> lots of times it's a complicated chain of XY problems that you can break down
<jimbzy> Yeah, chunking it up really does help.
ilovethinking_ has joined #osdev
<ilovethinking_> hey, sorry
<ilovethinking_> laptop died
<geist> odd that it came back with a new nick since you're using irccloud
<geist> shouldn't it have picked up the old one?
<ilovethinking_> no fucking clue lol
ilovethinking has quit [Ping timeout: 276 seconds]
ilovethinking_ is now known as ilovethinking
<geist> you must have logged into a different irccloud account
<ilovethinking> yeah prolly
<ilovethinking> oh what the fuck
<jimbzy> My bouncer does that sometimes and I have to manually rejoin a coupleo f channels because it doesn't identify.
<jimbzy> It's a configuration problem, but I am too lazy to fix it.
<ilovethinking> does anyone here know this dude from the osdev discord called bindage
<geist> i do not
<ilovethinking> oh that’s odd
<jimbzy> I've never used discord.
<geist> well i mean i do not hang out on the osdev discord
<ilovethinking> he was in the community since the start and he just left
<ilovethinking> because of some conflict
<geist> yeah like i said i ran into some conflict there too and left
<geist> it's a bit too... conflicty
<jimbzy> I wonder why that is. Several channels I frequent have discord and it seems to be common.
<ilovethinking> oh wait i remembered it
<ilovethinking> bindage said that you should code using the c spec
<ilovethinking> and someone started beef around it
<ilovethinking> it’s pretty funny
<geist> hmm, what did he mean about the c spec?
<ilovethinking> he said he worked in the nsa before and makes 560k a year
<jimbzy> K & R-style :)
<geist> okay. that already makes me not like the guy so much. not the C spec stuff, but trying to pull rank by saying where theywork and how much money they make
k0valski18891 has joined #osdev
<ilovethinking> no i mean he seems smart
<geist> as far as i’m concerned that’s completely irrelevant to how much credibility you have
<geist> sure. that’s my basic problemwiththe one month i tried to hang out on that discord
<ilovethinking> it’s just weird that he just quit the community that randomly, i thought he would go to irc or something
<geist> if you have a different opinion with someone, or with the folks in charge, it turns into a beef really fast
<ilovethinking> yeah
<jimbzy> Were they telling you which way the buckwheat blew, geist?
<geist> and really we should be able to hold different opinions about things, that’s valid and totally fine
<ilovethinking> they also shit on you if you don’t like limine which is pretty cringe
<geist> right. we have our preferences here, but i think we’re generally more laid back about folks doing what they want to do
<geist> can only offer suggfestions based on the traps we’ve seen people fall into over the years
<nortti> is the discord affiliated with this place / the wiki, or is it its own thing?
<geist> not at all
<geist> in the exact same way that this irc channel isn’t affliated with anything. it simply exists because we make it exist
<ilovethinking> a trap i fell for is starting with limine
<jimbzy> I found the channel before the website.
<ilovethinking> how
<geist> same, the channel has existed since 1999, long before the website
<geist> though i think the wiki came into existance sometime in the mid 2000s i think. back when wikis were a new and hot thing
<jimbzy> I have no idea. I've been hanging out here (and freenode) since like 2000, or 2001?
<geist> jimbzy:yeah that’s about when i popped in. mid 2001
<geist> and i think from talking to air and whatnot, it was around a couple years before that, on efnet or something
<jimbzy> Yeah, I remember air.
<ilovethinking> holy shit yall are real osdev hippies haha
<geist> air is still here
Brnocrist has joined #osdev
<jimbzy> I haven't seen them talk in quite some time, geist.
<geist> they might respond here in a minute since i tagged em
<jimbzy> I wasn't sure if they still popped in or if it was just a shell account.
<geist> jimbzy: i forgot, were you jimbzy back then too or did you switch names at some point?
<ilovethinking> oh wow you started chatting here the year i was born
<ilovethinking> crazy
<jimbzy> I was someone else, but I'd rather not say the nickname.
<geist> yah tis why i'm not so sold on discord becoming the next irc. since ultimately it's just a company, and companies come and go, products change, etc
<geist> but i dont *mind* discord. i use it a lot
* mjg notes freenode came and went :p
<FireFly> not incorrect, but at a longer timescale :p
<geist> indeed, however irc the protocol still works
<geist> plus you can connect to irc with your OS!
<geist> no chance of doing that with discord
<ilovethinking> i hate discord (the company)
<FireFly> (and with much easier migration than between completely different walled gardens :p)
<ilovethinking> 6 years ago, at its prime, it was awesome
<FireFly> the company or the service?
<ilovethinking> now it’s just… different
<ilovethinking> the company
<FireFly> hum, not sure I agree :p
<ilovethinking> they want to milk every dollar off of you
<ilovethinking> it’s cringe
<nortti> did they use to not to?
<ilovethinking> yeah
<geist> they were probably in the growth phase before, where making money doesn't matter
<geist> then eventually they decide they actually need it to pay for stuff
<ilovethinking> yeah that’s what im talking about
<ilovethinking> that’s what beautiful about irc
<bslsk05> ​pluralistic.net: Pluralistic: Tiktok’s enshittification (21 Jan 2023) – Pluralistic: Daily links from Cory Doctorow
<ilovethinking> it’s open sourced
<ilovethinking> it’s a protocol
<heat> no clue what you're on about
<ilovethinking> it’s not owned by anyone
<heat> discord doesn't milk shit
<ilovethinking> they do
<heat> they don't
<heat> what's milking here?
<geist> they certainly slam you with please get nitro on a daily basis
<ilovethinking> nitro basic or whatever the fuck it’s called is a scam
<ilovethinking> no nitro no discord
<heat> I don't have nitro and don't get harassed by nitro ads so... dunno what you're on about
<ilovethinking> want to stop using the stupid ass default emojis? get nitro
<geist> i do. and then you cant change names on individual servers without it (i think)
<geist> etc
<geist> this isn't a large concern, and honestly yes they need to make money
<heat> you can
<jimbzy> I'm just too old to change my ways. Damn kids with their memes and discords...
<geist> but i can also still choose to not engage with it (though i still do anyway)
<heat> i have 0 use for nitro
<geist> anyway *shrug* i get the dislike of it
<ilovethinking> i’d choose not to be harassed by discord
<heat> they basically give you better streaming and then you can use emotes from other svs, also larger file upload
<geist> different levels of annoyance, but the fundamentals are there
<ilovethinking> but i don’t jave a problem with discord, they voice chat is awesome
<heat> all of this is OK with the price they ask
<ilovethinking> heat: you just switched sides
<heat> have I?
<ilovethinking> i mean i appreciate them not giving me ads
<ilovethinking> so i guess that’s cool
<heat> how? it's a fucking service
<ilovethinking> oh and also discord is electron based
<geist> *that* is annoying
<heat> asking for everything to be free is stupid
<heat> and unrealistic
<geist> irc is
<heat> unless they agressively siphon off your data
<heat> yeah sure, IRC is, but it's also a stupid text protocol with very little features or compute capacity, and it's also agressively dying
<geist> but it's why it's free. because it doesn't need all the resources for basic work
<lav> IRC is perfect except for the lack of blobcats IMO
* jimbzy shrugs.
<heat> IRC is very flawed
<jimbzy> I listen to people communicating with morse code. XD
<geist> again i actually dont really care either way. i use irc and discord on a daily basis. i just assume that discord in the grand scheme of things is some bump in the road where in 5-10 years we'll be using something else
<heat> for instance, you need a workaround to always be in the server so you get pinged and get logs
Turn_Left has joined #osdev
<geist> is that bad? meh. maybe. probably not
<geist> i do like things that solve a problem well enough and then stay that way, like irc, or email, or whatnot. is there problems with that? you betcha
<geist> but it's still nice to assume that next year it'll work basically the same way
<mjg> irc is tolerable in tech circles
<geist> for at least basic communications, and it's not some imessage/hangouts/tiktok/snapchat compatibility hellscape
<mjg> but i would not dare use it to talk in a corp env
<ilovethinking> what do yall think about tiktok? i wanna hear what actually technologically advanced people think
<geist> i think exactly zero about it
<Ermine> ^
<geist> but then i'm an olds so clearly it's not my thing
<heat> what does "technologically advanced people" have to do with this
brunothedev has joined #osdev
<ilovethinking> heat how are you feeling
<geist> well, vs i guess someone that would have no idea of how it works, etc
<jimbzy> We're cyborgs, heat.
<geist> like say 98% of the people that use it
<heat> technological opinion: yeah great service, large scale, well ran, bytedance contributes a lot to FOSS
<geist> i fundamentally like using encrypted comms, and am well aware that this is wide open
<brunothedev> guys, i just ran "cat /usr/share/zoneinfo/America/Bahia", and now my tty is borked, pls help
<geist> and also things like discord, no fucking clue how logged that is, or trust it
<geist> but that's just my thing
sinvet has quit [Remote host closed the connection]
<heat> brunothedev, reset <enter>
<mjg> tiktok?
Left_Turn has quit [Ping timeout: 265 seconds]
<mjg> i only know hearsey about it
<ilovethinking> tiktok is fucking crazy man every time i walk somewhere i see a random 8 year old kid literally not paying attention where they are walking and just scrolling through shit
<heat> stop lying mjg
<ilovethinking> it’s so disgusting
<jimbzy> I just don't get the whole need to share every opinion/event/whatever in my life.
<geist> agreed.
<Ermine> In irc, there's no proof that you have written something unless there's a public log
<jimbzy> I use FB a bit because everyone I know uses messenger, but my profile is locked down and I have less than 20 friends.
<geist> frankly, this channel here is about as openly sharing/social as i get. i really dont use anything else as a publishing point
<GeDaMo> I'm glad there was no social media when I was a kid
<brunothedev> WAIT, i just entered the osdev chatroom, i should've entered the #gentoo one LOL XD
<jimbzy> I don't even use a profile pic.
<nortti> ilovethinking: s/tiktok/instagram/ and you're 5 years back, s/instagram/facebook/ and you're another 5
<geist> that and a few discord servers with actual RL friends
<geist> brunothedev: heh, same answer though!
<geist> except gentoo will probably tell you to recompile something
<geist> `make menuconfig; reset`
<jimbzy> And tell you it's for your own good.
<geist> GeDaMo: amen.
<jimbzy> I quit drinking alcohol when cellphone cameras hit the scene.
<ilovethinking> well i had counter strike 1.6
<ilovethinking> god damn that was a blast
<geist> though it's possible i'd actually have done better, social anxiety wise, with social media than i did back then
<geist> but dunno
<heat> ok so to fix your terminal you'll need to first grab the chromium tools, then use repo to pull chromium, then use gn gen out/, then you'll want to create an args file for optimization for your specific hardware (you'll figure it out), then ninja -C out/
<FireFly> I mean, I grew up wasting time on IRC instead.. :p
<heat> and then in 2 hours when that finishes, reset<enter>
<jimbzy> FireFly, right?
<geist> FireFly: i grew up wasting time dialing into BBSes
<FireFly> yeah, that was before my time
<FireFly> missed out on that era
<jimbzy> I loves me some MajorMUD.
<geist> but that also self limited, because had to compete with the phone lines with fam
<jimbzy> My parents did not love the phone bill, however.
<geist> pre cell phones
<jimbzy> geist, The 14hr busy signal. :)
<geist> heh yeah
<geist> i did a few of those two
<geist> i'll just dial up like 10 minutes to that bbs in austin... just to get that one game....
<geist> just this once
<geist> 2 hours later, fuuuuuck
linear_cannon has quit [Read error: Connection reset by peer]
<heat> i rate all these boomer memories 9 AOL free trial CDs out of 10
<geist> hey not a boomer!
<GeDaMo> Also not a boomer! (just barely) :P
brunothedev has quit [Ping timeout: 250 seconds]
<geist> (and yeah i know, the worst insult to gen X is to call them a boomer)
<jimbzy> Yeah, well it beat playing Chex Quest for the hundredth time... ^_^
<geist> heat: oh yeah, intereting riscv extention i ran into that's in iteration now
<geist> Zcmp
<heat> alright my attention span has ran out, can you make a tiktok with that info geist?
<geist> (and the related ones). basically there's a working group to help reduce code size even more, seems to be primarily targetting deep embedded (probably to compete with cortex-m0)
<geist> but guess what Zcmp brings to riscv?
<jimbzy> heat, While trying to flip a water bottle?
<GeDaMo> Comparisons! :P
<nortti> flags register?
<geist> multi-register push/pop!
<geist> ie, push {bitmap of up to 13 registers}
<ilovethinking> geist: holy fuck you are old, gen x? seriously? never wouldve guessed
<heat> jimbzy, these days the youtube shorts (I don't have tiktok so I use dollar store tiktok) have split screens with content and someone playing one of those shitty mobile game ads
<GeDaMo> Oh, I thought it was going to be multiprocessing :|
<heat> it's pretty dystopic
<geist> ilovethinking: didn't i mention i was hanging out here in like 2000?
<geist> heat: yeah that's my #1 beef with youtube right now. i want to just simply turn the fucking shorts off
<ilovethinking> yeah but i thought you were here since u were 10 years old or something
<heat> HOLY FUCK GEIST YOU ARE OLD
<heat> OUTDATED
<geist> OLDS!!!!!111
<ilovethinking> geist: yeah same, i wish it was possible to turn off the shorts
<ilovethinking> one day maybe
* geist coughs, a little cloud of dust coming out of their mouth
<Ermine> oh those boomers
* geist raises their skeleton like hand and points at you accusingly
<GeDaMo> I use mpv for Youtube
* Ermine screams in zoomerish
<heat> mjg, how millenial are you
<nortti> < heat> jimbzy, these days the youtube shorts (I don't have tiktok so I use dollar store tiktok) have split screens with content and someone playing one of those shitty mobile game ads ← one zoomer whose streams I sometimes follow talked of how on tiktok you get like split where above you have a person's stuff and below like, gameplay footage of some random mobile game or cartoons. so he did a combination
<ilovethinking> anyways i’m gonna go sleep so goodnight everyone
<nortti> of family guy below + beginning of his video essay on how fire punch deeply affected him personally
<geist> i get that shorts are great, but the point of youtube to me is to watch interesting, informational videos. i have a lot of subscriptions that i go through daily, etc
<heat> nortti, yep
<nortti> got a comment complaining that he was distracting from the family guy
<geist> by defintion shorts are never what i want to see in that context
<geist> so they're just a huge waste of space
<Ermine> Idk, I don't care about shorts. They don't get in my way
<mjg> geist: so from what i'm told tiktok is all about exploiting people here
<geist> OOTH i also pay for youtube prime, so i dont at least get the ads
<mjg> geist: you get a short video and the app tries to feed you more of the sort
<jimbzy> I hate the fact that everyone makes youtube videos when a few paragraphs of text are enough.
<mjg> geist: it is succesfull enough htat people spend literlaly hours just scrolling through them every day
<mjg> they are *addicted*
<mjg> which is the problem with tiktok
<heat> yes, it's addicting
<bslsk05> ​www.youtube.com: Invasion of the Body Snatchers (12/12) Movie CLIP - The Scream (1978) HD - YouTube
<heat> it's why I don't have one, but youtube still catches me sometimes
<geist> sure. though i try not to focus too much on what i consider other people's failings
<Ermine> Because it's short. Fast food for brain
<geist> that path leads to sadness
<mjg> but here the product is designed ot be this way
<nortti> I am subscribed to youtube stuff using rss, so I just get shorts in the default youtube viewer
<geist> i try to focus on myself, and bettering it, and then just dont worry about what other people are doing. it's the only way to stay sane
<geist> though i like to help other people, but only if they want it
<heat> like, you click one short you find interesting and then you realize it's 30 minutes later and you've gone through south park, koth, sopranos, breaking bad highlights over the last half hour
<heat> it's absolutely dystopically insane
<geist> heat: yep, which is why i wish i could actually literally turn them off
<geist> i'm even a paying member of the youtube thing, at least let *me* turn them off
<mjg> so tiktok is supopsedly worse
<geist> 100% not interested as a result
<heat> yeah cuz tiktok is literally only that
<mjg> i suspect you could hide shorts with a browser extension
<geist> possible. may be worth looking at
<mjg> anywyay, tiktok does look all around harmful
<geist> that being said my brain is getting better at filtering out little boxes of preview videos with what looks like space on either side
<Ermine> geist: btw do you mean shorts are popping out automatically or youtube suggests them?
<heat> i legitimately think the US should ban tiktok, etc
<geist> i do feel bad for legit video producers though. i have seen at least one of them talk about how you kinda have to do them now
<air> I think the original #osdev members all met in #tunes on freenode and one of their members later created #osdev and evicted us to it
<jimbzy> Hey!
<geist> since it is unfortunately a larger part of the market
<jimbzy> Long time no see, air.
<geist> Ermine: suggests them
<heat> geist, yeah I think it's pretty good for youtube engagement at least
<geist> more and more of my subscription feed is shorts
<nortti> < geist> i do feel bad for legit video producers though. i have seen at least one of them talk about how you kinda have to do them now ← not really a "legit video producer" in any way, but one of my old videos (about a bug I found in the calculator app of an old nokia phone) got converted to a short and it has ridiculously more views than anything I've ever uploaded
<geist> and it's not really fair to unsubscribe from producers i like because they put in some shorts here and there. it's kinda not their fault, they're just trying to make some scratch
<nortti> including a jerma clip
<geist> yah
<Ermine> I almost stopped caring of suggestions. They are either some kind of bullshit or video on non-euclidean game engine I've already watched
<geist> air: howdy
<geist> well, its not so much suggestions as i hvae a fairly curated feed of subscriptions
<geist> and so the daily 'heres what your subscriptions did' is basically my homepage on youtube
<heat> geist, Zcmp looks cool but it's super not-RISC isn't it lol
<geist> heat: right?
<heat> reminds me of the ARM push-multiple stuff?
<geist> does make sense though, i think a ton of space is wasted on function entry/exit, with all of the register spillage
<heat> but even fancier
<Ermine> heat: US shouldn't ban tiktok despite it's a piece of shit. Banning stuff is a slippery slope which leads to nowhere.
<heat> Ermine, so what's your idea? it's legitimately harmful stuff
<heat> I for one don't believe in capitalist self-regulation BS
<nortti> I don't think banning tiktok specifically would be a long-term good plan tho
<heat> i would be willing to say its way more harmful than any social network has ever been
<Ermine> Nothing. Stay and be sad
<nortti> since it's a known-working business model, another service can just copy it
<nortti> what'd be required is some prohibition on a central part of how tiktok is built
<nortti> e.g. high-level data harvesting and specialization of recommendations based on it
<Ermine> Today you ban tiktok, and after some years you ban anybody who criticises your govt.
linear_cannon has joined #osdev
<heat> stay and be sad is a great option for a dystopic future
<Ermine> Banning stuff is a great option for a dystopic present
<heat> ok, then age restrict it and effectively enforce it
* geist bans real mode
<heat> not "are you 18? yes or no"
<heat> geist, thank you
<heat> that one has needed banning for a long time
<nortti> heat: how'd you do that, without all of the problems the UK implementation of that would have had?
<zid> I think we should ban real mode from #osdev
<heat> yes :) hard questionz
<linear_cannon> what about 16-bit protected mode
<geist> to be fair real mode has become honestly less and less of a thing here over the last 20 years
<heat> also banned
<heat> anything 16
<linear_cannon> :(
<geist> seemed to be say 15 years ago like 80% of the topic here was 'writing a real mode floppy bootloader'
<geist> maybe we dont attract those folks as much, or maybe the world really has sorta moved on, baby steps
<linear_cannon> there's a lot less need for that than there used to be. i probably would've been one of those folks at the time
<geist> yeah i think that's the case
<geist> also more non x86 stuff, etc
<nortti> probably a lot due to virtual machines being easier than "I'll just use that rando old computer"
<geist> ight
<linear_cannon> nowadays it's basically like. why would i need to do that when there's multiboot
<linear_cannon> (or uefi or whatever)
<nortti> and even the rando old computer has USB now
<geist> and even if it was there's no floppy disk on that rando computer
<nortti> yeah
<heat> PC booting is still hard
<linear_cannon> except for the fact that i'm sitting here itching to write a microkernel for my 286
<geist> and nobody wants to write a real mode hard drive bootsector anymore
<heat> like holy cow so many bad options
<geist> linear_cannon: yeah i had that itch a few years ago. thought it'd be kinda fun
<heat> and saying "why 32? just do 64" is equally bad advice
<geist> i ended up settling on writing a 386 only thing
<heat> writing 32 -> 64 bit code in ASM is not easy for a newbie
<nortti> I actually did my first OS thingy (real mode, lol) by shutting down my computer and booting from floppy, testing, rebooting back into linux
<linear_cannon> i do actually have a physical hardware 286 handy, but there's a lot of yaks to shave before i can actually get to the fun part
<geist> no it isn't. i'm still fairly sad the level of nonsense you have to do to get a stable 64bit flat memory environment
<linear_cannon> including, yes, writing a real mode floppy bootloader :P
<geist> nortti: yah same. though i pretty quickly got ahold of another computer back in the day so i could at least shuttle the disk
eddof13 has joined #osdev
<nortti> yeah, same. though moving the vga cable over was still a bit of a pain
<geist> i still kinda have that setup: usb floppy drive + a 386 that i can drag out and plug into a spare monitor/keyboard
<nortti> < linear_cannon> except for the fact that i'm sitting here itching to write a microkernel for my 286 ← honestly an OS that uses 286 as designed would be an interesting project. the whole segment = object thing
<geist> every once in a while i get bored and fiddle with it
eddof13 has quit [Client Quit]
<heat> what OS do you have on it?
<linear_cannon> nortti, yeah, that's part of it. though i want to support a "huge" memory model too
<linear_cannon> part of my plan, if i get that far, is to write a wasm32-wasi interpreter that runs in the huge memory model
<nortti> :D
<heat> having a real networked installation of FreeBSD/386BSD on a 386 sounds pretty fun
<heat> old OSes for old hardware
<linear_cannon> you'd have to go old, all the BSDs (and linux) have dropped 386 support these days
<linear_cannon> NetBSD runs great on a 486 though.
<heat> yeah, that's the point
<linear_cannon> like, modern NetBSD
<heat> FreeBSD 1.0 or the OG 386BSD
<geist> heat: i have a few. but aside from DOS + win 3.1 i have a loadlin that starts an early slackware install on the 386
<mjg> freebsd technically supports i386
<geist> it barely fits, since the machine has 4MB memory. max
<nortti> heat: did you see there was a new release of 386bsd a couple years back
<geist> it's pretty slow
<mjg> of you mean literal 386?
<heat> nortti, yep
<heat> mjg, literal
<heat> geist even has a small OS that uses hardware task switching for his 386
<geist> yah i got this old 386sx a few years back off ebay becaus eit was precisely the model i had when i was a kid
<mjg> i don't know what's the oldest it can boot on, perf aside
<mjg> i suspect p3 minimum
<linear_cannon> no, it's a 486
<geist> heat: that's why i hacked https://github.com/travisg/3x86 one weekend for lulz
<geist> but then i eventually got bored weith it and went back to add proper 386 support to LK
<geist> which now runs fine on it
<linear_cannon> all of the bsds have the same minimum, they require cmpxchg to deal with stuff that needs atomics
<heat> cmpxchg? more like cmpxcringe
<mjg> what if you don't use smp
<linear_cannon> yes, it'even without smp, as far as i know
<mjg> hm
<heat> also fwiw clang can't codegen for a 386
<mjg> that may be
<linear_cannon> ^
<mjg> heat: shit compiler!
<heat> yep, shit indeed
<nortti> no, a C compiler. though I could see why you'd confuse the two
<heat> does freebsd still compile with gcc?
<mjg> yes
<heat> or will it severely warning/error out
<heat> oh cool cool
<mjg> gcc12 is actively tested
<geist> my experience with running halfway modern bsds on old hardware is it's really really bad
<mjg> :)
<geist> you generaly want a netbsd/etc of approximately the same era
<mjg> geist: there was a dude around 2010 who was protesting smpification of the kernel
<heat> my experience with running modern BSDs is it's really really bad
<geist> or say up to about +5 of when the machine would have been contemporary
<mjg> geist: because his vax can't handle it
<nortti> lol
<linear_cannon> i literally run netbsd on a vax :P
<mjg> what version?
<mjg> pas 5.x?
<mjg> past
<linear_cannon> 9.3, i'm about to update to 10 stable
<mjg> whoa
<heat> wtf
<heat> how much swap do you have
<heat> and why is half your hard drive
<linear_cannon> i'm using a bluescsi as the boot drive, and iirc only as much swap as i have ram (20mb)
<heat> oh wow
<linear_cannon> i got the machine with 12mb, but upgraded
<linear_cannon> 12mb was a bit too cramped
<heat> how does anything work?
<nortti> 40mb honestly sounds reasonable for a barebones modern *nix
<mjg> so how much is left after you boot multiuser?
<heat> nortti, in theory yes, in practice no
<geist> linear_cannon: really? on a real one?
<geist> my experience is recent netbsds are very unstable
<geist> i think i have netbsd 3.x or so on this vax
<heat> certain tradeoffs on real modern systems make little sense on old cramped machines
<geist> though it is a 32MB vax, so memory size wasn't the problem
<geist> mostly it just being so achingly slow doing anything
<linear_cannon> yes, a real one. VaxStation 3100/m38. i'd need to go boot it up to check how much is free on login - i'm currently rearranging and doing spring cleaning, so it's unplugged - but i definitely had a few megs
<heat> for instance my SLAB allocator is really wasteful with memory so it's definitely not as compact as a traditional, bad, slow, K&R heap
<geist> linear_cannon: hah same. 3100/m40 i think here
<geist> kazinsal picked one up too
<nortti> heat: oh sure, but 40MiB is also several times what k&r heap was designed for
bgs has quit [Remote host closed the connection]
<geist> linear_cannon: i did manage to port my OS to it though, kinda fun
<geist> i should piddle with that again
<mjg> hmmm
<nortti> heat: I have admitedly only run as far down as 192MiB recently, but that runs a gentoo install on pentium 2 nicely swapless
<heat> nortti, on a real boot? not really
<mjg> linear_cannon: would be funny if you could use *zsh* on it
<mjg> and still have any ram
<linear_cannon> lol yeah
<linear_cannon> i don't use zsh on anything
<linear_cannon> usually use mksh, or just the system ksh on netbsd
<sham1> A real VAX. I'm so jelly
<mjg> :]
<geist> yah for lulz i tried to compile a modern bash on the vax on netbsd. took hours
<linear_cannon> i'm actually rewriting dash right now also
<mjg> curious tho, perhaps the kernel itself could be trimmed
<heat> nortti, everything will get page cache'd, then you dynamically allocate structures for inodes, dentries, processes, threads and you're fucked
<mjg> as in not only how much ram is left but where is it spent
<heat> particularly since all the kernel structures can't get swapped
<linear_cannon> mjg, yeah, i trim the kernel and disable some services that are on by default
<sham1> Modern bash on a VAX. Not exactly surprising that it took hours. It's absolutely massive while also being a meh shell I'll be honest
<heat> bash is gr8
<heat> fite me
<heat> bash >>>>> zsh
<geist> sham1: yeah. was mostly just looking for something fairly meaty to compile and wait for the compiler to take forever
<mjg> linear_cannon: you mean default netbsd install does not do it after all?
<linear_cannon> bash is a warped mockery of ksh
<heat> geist, honestly it's surprising you can even get a compiler to run
<mjg> oh right
<mjg> what compiler even is it
<mjg> are they on some gcc 3x?
<geist> oh it's just a plain netbsd 3.x
<geist> so it's whateverc ompiler it was
<geist> runs fine, it's just slow because the cpu is slow
<heat> ah yes, not a modern one ok
<mjg> specifically for old yellers like htis one
<linear_cannon> mjg, it runs, but stripping the kernel of support for other systems and disabling postfix and some other stuff frees up a few megs
<mjg> heh postfix
<mjg> that's a bsd right there
<mjg> that or sendmail
<linear_cannon> netbsd 10.x runs gcc7 for vax. gcc10 was supposed to make it in but didn't, next release should have gcc11 with a *lot* of fixes
<sham1> bash is ksh if it fell into a vat full of GNU
<mjg> full fucking mta on a dekstop
<mjg> gcc11 supports vax?
<mjg> wat
<linear_cannon> yes.
<linear_cannon> specifically because of netbsd folks maintaining the support and sending in fixes
<heat> gcc11 supports ia64 still
<nortti> I think a lot of smaller arches have recently gotten more work too
<nortti> stuff like m68k
<geist> yah i have a gcc for vax and everything
<bslsk05> ​gcc.gnu.org: VAX Options (Using the GNU Compiler Collection (GCC))
<mjg> so it does
<sham1> As long as someone keeps maintaining it, I don't see why they'd get rid of the support
<heat> because usually there's no one maintaining it
<mjg> now i'm curious how is codegen
<linear_cannon> vax was going to be dropped if some problems weren't fixed, and netbsd funded someone to fix them
<heat> despite "passionate hobbyists"
<heat> it's the same shit with ia64
<linear_cannon> ia64 got a lot closer to being dropped iirc than vax did
<heat> "oh yeah ia64 is gr8. bug fixing? can't bother"
<sham1> So NetBSD was just "nope" and fixed stuff
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
<sham1> "We want to run our VAXes"
<mjg> that is both impressive and quite frankly peculiar
<linear_cannon> all the ia64 enthusiasts i know of are perfectly aware that it's a garbage arch
<geist> linear_cannon: but like i said the last few times i've tried to run a modern netbsd build it was pretty unstable
<mjg> i'm all for good old computer necrophilia
<geist> would crash after a few minutes. i guess i should do my duty and debug it
<mjg> but running current stuff to do it is dicked up
<linear_cannon> yeah, file a problem report
<geist> now that i grok enough vax
<linear_cannon> people pay attention, i assure you
<mjg> mm
<sham1> Heresy. Itaniumn is great. Compile-time instruction scheduling is great
<mjg> linear_cannon: how long to build the kernel
<heat> ITAAAAAAAAAAAAAAAAAAAAAANIUUUUUUUUUUUUUM
<heat> geist, when are u getting one
<geist> well, netbsd is almost certainly cross compiled
<geist> heat: i had one, years ago
<geist> so i already did, and moved on
<heat> oh jeez
<heat> you moved on?
<heat> i guess ia64 really is dead
<linear_cannon> mjg, that's a great question. i know i compiled it on-machine, and with only 12mb of ram. the only thing i'm sure of is it took less than two days
<linear_cannon> it may have taken less than one
<mjg> hmm
<heat> hmm
<mjg> do you know if netbsd builds releases on actual vax?
<heat> 🤔🤔
<geist> well, mostly i moved on because it was a massive machine
<nortti> kinda sad they never made any low power / small formfactor itaniums. I like random-ass modern-enough obsolete machines, but itanium has always felt a tad too clunky for a student apartment setup
<mjg> despite their massive cross build support
<geist> was one of the early prototype HP i2000 workstations i believe
<nortti> currently my desk is almost entirely taken up by my main laptop and an imac g4
<linear_cannon> i don't think they build on vax, i think it's usually cross-compiled. it's thoroughly tested by devs, but in simh, not real hardware.
<mjg> oo
<geist> https://www.openpa.net/systems/hp_i2000.html no pics though but it was built like a tank
<bslsk05> ​www.openpa.net: HP i2000 Itanium Workstation – OpenPA.net
<mjg> well thre may be your catch the
<mjg> n
<geist> you could use it to prop up your car to get to the engine
<linear_cannon> that said, a number of real hardware users exist, and the *pkgsrc packages* are compiled on real hardware
<mjg> linear_cannon: you should ship dmesg to https://dmesgd.nycbug.org/
<bslsk05> ​dmesgd.nycbug.org: NYC*BUG dmesgd
<geist> yah also keep in mind these particular microvaxes are not fast
<linear_cannon> mmm yeah, lemme go plug it in and find my serial adapter
<geist> they're the later, single microprocessor variants
<geist> cost reduced, etc
<bslsk05> ​twitter: <vincentzimmer> I realize it’s time for a laundry day when my selection algorithm for shirts produces https://pbs.twimg.com/media/FiBXNInaAAAgLyp.jpg
<heat> i want a merced shirt so bad
<mjg> so i'm curious how is codegen era-appropriate gcc vs today
<mjg> clearly they could not improve it for vax
<mjg> but maybe it regressed?
<heat> why do you think its worse?
<geist> yeah good question. it *could* make worse decisions about inlining than the arch desires
<geist> and if someone didn't keep re-tweaking it it might get worse
<mjg> heat: i expect there was 0 benching
<geist> but in general the problem is modern code is so much bigger, blows the cache on these old machines much harder
<mjg> and it must have changed over time inadvertedly
<mjg> gold rule: if something was not benched, it sucks perf-wise
<geist> yep. also vax has a ton of options with instruction selection. it could be over time as more intermediate steps come and go in gcc, someone hasn't gone back to really realign the back end of the vax bits with them
<heat> is it PESSIMAL
<geist> so it may be choosing less and less interesting instruction forms, because that's what most other arches have
<mjg> that was a 100% serious comment
<geist> OTOH on real vaxen it's unclear which forms are ideal too. i think there's a whole pile of the same thing like there is on x86: choose simpler forms, etc
<mjg> it is even worse: if a codebase was not sanitized from a certain angle, you have to expect it sucks from said angle
craigo has joined #osdev
<mjg> is there proifling support for vax?
<heat> is this mjg's law
<linear_cannon> as much as for any arch on netbsd
<geist> i kinda doubt it. but then there are a bazillion vax microarchtectures
<linear_cannon> there should be working dtrace
<mjg> linear_cannon: so a resounding "no"? :p
<geist> the ones we have here are the fairly low end, simple versions
<mjg> working dtrace on vax?
<mjg> wut
<heat> working dtrace what
<linear_cannon> netbsd has dtrace
<mjg> i know
<mjg> but on vax?
<heat> would be funny if it even JITs
<linear_cannon> it almost certainly doesn't
<geist> it would be a fun arch to jit for though. loooots of instruction form choices
<linear_cannon> ah, nvm
<mjg> i may just download simh + netbs to check
<linear_cannon> only x86 and arm
<linear_cannon> sorry
<heat> geist, ""fun""
<mjg> no bigs
<geist> well, sure.
<mjg> point is though, vax mostl ikely never profiled on netbsd
<mjg> even back in the day
<heat> x86 jitting is torture
<mjg> was*
<geist> right, that was an earlier time
<heat> i definitely unenjoyed it
<mjg> so i would expect MD code having lullers
<geist> heat: yeah but precisely why? was it x86 was a terrible layout of the opcode?
<geist> or because it was highly irregular?
<heat> irregular opcodes yeah
<geist> think of VAX as a much more logically laid out, highly regular x86
<linear_cannon> maybe i'll set up kernel profiling on my vax just to see if it shows me anything interesting
<mjg> how does that work
<mjg> is it kgmon?
<mjg> there was an ancient method which had so mucho verhead it was not even funny
<linear_cannon> yes
<mjg> you can do poor man's flamegraphs instead
<mjg> see ONYX for a sample imlementation
<heat> geist, that said, I want to retry JITting for eBPF, since eBPF registers map a whole lot more clearly to registers. might be more fun to codegen for
<geist> the IRQL stuff in vax would actually lend itself nicely to having a high priority timer based sampler
<heat> mjg, broke-ass flamegraphs
<mjg> heat: working class flamegraphs
<mjg> all that aside, i know for a fact there is tons of fs ops done during the build which don't need to be there
<mjg> whacking them may just be a great kick for vax
<heat> Signed-off-by: Karl Marx <kmarx@cpsu.ru>
<geist> but like i said the main thing that probably hurts old arches like this is simply size of text segment
<nortti> heat: isn't .su still in-use?
<geist> you can rearrange deck chairs all you want, but what you really want is much less code
<mjg> agreed
<mjg> geist: it would helped if you ran that code less too
<mjg> hence ^^
<geist> if you have say 8K of cache *total* you just blow it
<heat> nortti, ooh great idea
<heat> is a two letter domain name valid?
<mjg> onyx@no?
<mjg> no
<heat> like on.yx
<sham1> .su is indeed a top-level domain that still exists, and it's administered by the Russian Federation
<heat> surely not?
<geist> but really it's one of these cases wher eyou simply need less features, less complicated operating systems, etc for these old machinse to run
<nortti> I think they're valid, but cost a shit-ton
<geist> running modern stuff that does more, especially in crypto, just hurts and isn't useful
<mjg> geist: check this out ^^
<geist> except for machochism purposes
<geist> even something like ssh is terrible. or wget/curl with SSL
<mjg> i agree
<geist> you end up taking like 2 minutes to just ssh into it
<mjg> i would telnet out of it to my gateway
<mjg> and ssh from there :)
<heat> BSD dmesgs are boring
<geist> 100%. i usually immediately enable telnetd so i can get into it
<heat> linux dmesgs are exhilarating
<mjg> or RLOGIN for full geezer
<mjg> heat: loldriver (c) Pedro Pessimaldo
<mjg> 's what i see in linux dmesg
<geist> my dual sparcstation box is a bit more fun: dual 80Mhz supersparcs + 192MB ram. that actually kinda almost crosses into the modern world a little bit
<heat> Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
<heat> 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
<heat> 2018, 2019, 2020, 2021, 2022
<heat> and E T E R N I T Y
<mjg> that used to be a problem, should be fixed onw
<geist> heh updating dates. i used to d othat until someone that knew a thing or two about law pointed out you dont have to keep updating the copyright date
<mjg> geist: that was a recent discussion at $workplace
<mjg> geist: turns out peolpe keep doing it because it was always done
<nortti> I mean, I don't think you need to put in any dates, or even a copyright header, for legal reasons
<mjg> geist: and a prikaz came to do it again
<mjg> so there ya go
<geist> yah $workplace also pointed out you dont have to do it so dont
<heat> lol
<mjg> must be a $workplace on the other side of the road
<mjg> :p
<heat> American Megatrends has copyright 1985 - 2023 fucking everywhere
<geist> the header i do because folks copy stuff out of repos and plonk them elsewhere
<heat> on EFI code
<heat> EFI in 1985
<geist> yah i was following something like QEMU or whatnot
<geist> and someone has a bot that goes through and bumps all the dates just after jan 1st
<geist> not sure if it was qmeu or gcc or something, but it was like okay...
<mjg> at least it is a bot
<heat> yeah, GNU has that as well I think
<heat> I update mine when I touch the files
<mjg> poor sap at work wrote a sed
<mjg> with mistakes in it
<mjg> one pointless endeavor
<heat> should've written an awk
<linear_cannon> geist, re: dual supersparc: i like to torture myself by running something juuuuuuuuust barely underneath what the modern world likes
<heat> you could've done it, as you know dtrace
<linear_cannon> sitting on my desk right now is a dual Pentium III machine running gentoo
<mjg> heat: that would have worked before he tried
<geist> yah. or a dual p3 500 machine i have floating around
<geist> kidna fun to actually do something with it
<heat> although you could accidentally hist()'d your copyright lines
<geist> or the P4 2.4HT. just enough that it's actually kidna usable
<mjg> heat: can you gnuplot copyright years
<mjg> linear_cannon: wut
<nortti> oh, was dual pentium 3 actually common? I thought multiprocessor was kinda rare on x86
<mjg> do you have X on it?
<linear_cannon> i have wayland on it
<mjg> a webbrowser?
<linear_cannon> nope
<mjg> lynx? :p
<mjg> right
<geist> nortti: not common, but actually at the time it was before both intel and AMD specialized their lines and created server vs non server stuff
<mjg> i take 'wut; back
<geist> so all yo uneeded was a dual mobo
<nortti> ah
<linear_cannon> i actually might be able to make a browser happen
<geist> actually at the time (about 1999) it was a pretty good idea. you could get a dual cpu motherboard for not that much more, if you were building a box
<linear_cannon> just, not yet
<geist> and then just later on decide to add another cpu
<linear_cannon> right now, the biggest barrier is rust
<mjg> geist: huh
<mjg> geist: but was &anything* able to make any use of it
<geist> the main thing holding back was you needed an OS that actually used more than one cpu
<nortti> linear_cannon: does rust require sse2?
<bslsk05> ​github.com: Promote `i586-unknown-linux-gnu` to Tier 2 with Host Tools · Issue #543 · rust-lang/compiler-team · GitHub
<mjg> like for real
<linear_cannon> nortti, yep!
<bslsk05> ​github.com: promote i586-unknown-linux-gnu to Tier2+hosttools by goshhhy · Pull Request #108716 · rust-lang/rust · GitHub
brunothedev has joined #osdev
<geist> mjg: what do you mean?
brunothedev has left #osdev [#osdev]
<mjg> 00:13 < geist> the main thing holding back was you needed an OS that actually used more than one cpu
<mjg> you kind of answered as i was asking
<geist> oh sure that just meant: dont run DOS/win95
<geist> NT, linux, bsd all had SMP support
<geist> i was running NT 4.0 and later win2k on it
<nortti> linear_cannon: I was running pentium 3 @ 650MHz a decade ago as my main system, and remember lack of SSE2 hurting with a lot of stuff already
<geist> actually i was running BeOS on it, which did SMP too
<geist> 98-2000 was my BeOS years
<geist> but i already had an SMP box from about 1996 (dual ppro) which I ran NT 4.0 on in college
<heat> 4.4BSD had "SMP Support" in the sense that they "oh well, we tried"
<geist> basically anything that wasn't DOS based was SMP capabile
<linear_cannon> i actually work with an ex-Be developer. he's a nice guy
<heat> but it very much didn't run on SMP systems, they explicitly stated it
<heat> BeOS developers are CRINGE
<geist> linear_cannon: oh yeah, who is it?
<linear_cannon> Mikol Ryon
<geist> oh yeah, mikol's a good guy
<geist> haven't seen him in some number of years, but i do follow him on facebook
<mjg> hmmm now one could boot an early 2000s era system ina vm with say 8 cores
<mjg> maybe it is not going to fall over
<mjg> technically they all support 256, don't they :p
<geist> sure. i mean again, you can say 'OMG THAT MUST HAVE BEEN CRINGE' given modern standards
<mjg> what?
<geist> but at the time, a dual cpu box running NT or whatnot was strictly better than a single one
<linear_cannon> there were quad-processor pentium 3 systems. i want one
<geist> and really past dual cpu you were getting into high end enterprise stuff
<geist> yah that'd be like a Compaq Proliant 7000 or so
<mjg> so i remember discussions from 2002 or so and people had very mixed takes
<mjg> i could not judge myself
<geist> big square box with quad cpus in it
<linear_cannon> or an SGI Visual Workstation
<mjg> so again, would be curious to see how they work out in an emulated setting
<geist> (i used to intern at compaq running install tests on the whole fleet)
<mjg> someone claimed they get a perf win when building stuff from a 2 cpu system in 2001 or 2002
<geist> yah i mean. by modern standards i'm sure the SMPness of these old machines was pretty bad, but then you had somewhat greater than no scaling at the time
<CompanionCube> linear_cannon: those have a weird firmware, don't they?
<linear_cannon> yeah. the SGI VW540 could do quad 900mhz, but your only option was windows since they use a very custom firmware based on their MIPS machines
<mjg> dude i'm not out to bash any of it
<geist> and since like 4 cpus was all you were goin to get (in x86 at least) it was strictly better than not
<mjg> i'm just trying to check realities of the era
<linear_cannon> even in the mid-late 2000s the jury was out on whether multiprocessor was worth it for most workloads, tbh
<geist> probaly got something like 250% of a single core machine weith a quad core for <arbitrary benchmark>
<mjg> for example they all had a globally loked scheduler
<linear_cannon> i remember discusssions circa 2009 about this
<mjg> geist: ye that would make sense for compute-bound
<linear_cannon> and there were readily available multicore chips and broad os support by then
<geist> but also remember the caches and TLBs were a lot smaller on those machines
<geist> so the cost of bouncing a thread around, etc was much less
<mjg> it would expect it was costlier to talk to other cpus
<mjg> so who knows
<geist> also posslbe the memory bandwidtch was so much less that you just saturated it almost immediately no matter what you did
<geist> basically a lot fo the modern day scaling factors were probably off
<geist> so some of the modern strategies of dealing with things may or may not apply back then, if you could time jump
<mjg> so again, what's the oldest 2 core-capable bsd which still gets a speed up when building itself
<mjg> for example
<geist> and/or the overhead of more modern algorithms may be net worse because of code size/etc vs cache
<linear_cannon> for my P3 system, with modern gentoo, SMP is clearly better than non-SMP for the stuff i do
<mjg> dawg do you mind not assuming i'm about to SHIT ON IT
<geist> yah, same
<mjg> modern is moden
<geist> modren
<geist> kk
<mjg> wait, gentoo?
<linear_cannon> yes
<mjg> linear_cannon: did you compile all of it yourself?
<geist> i just think about these things too, mostly saying it for my own benefit
<mjg> it both makes sense and does nt :p
<geist> kinda building up a mental model, becaus ei like to think about old vs new
<linear_cannon> mjg, just last week i rebuilt every package on the system
<linear_cannon> no distcc, all on this machine
<geist> yah i have a gentoo on dual p3 box here too
<mjg> do you have 'time' from it?
<mjg> and how many pkgs is it
<linear_cannon> from the rebuild? no, but it took most of a week
<geist> it takes days dont get me wrong
<mjg> heh
<mjg> aight
<geist> but lots of time is spent in a few packages that use beefy language stuff
<mjg> ye i remember building kde update on my p3 700 running freebsd 4
<mjg> single core
<mjg> took the entire night
<geist> was thinking about that actually. like say a 500MB gcc instance chewing on some C++ file
<geist> say every second it touches like 50% of its memory that it has built up
<mjg> c++ is the worst
<geist> well, the machine itself can only push about 100MB/sec to DRAM at best case
<geist> so it's already going to be almost by definition spending most of its time just sitting there waiting on ram
<geist> and hell that's 5 seconds just to touch all of that memory once
* mjg says good grief
<linear_cannon> on my system i get about 70MB/s to pci storage controllers, i'd hope i get more than 100MB/s to DRAM
<linear_cannon> but i haven't benched it
<geist> linear_cannon: yeah dont. you'll be dissapoint
<geist> i think this one has fairly standard SDRAM 133Mhz at the time? maybe 100
<geist> because it's a dual p3 500, Katmai. i think the bus ran at 100Mhz
<mjg> hm
<linear_cannon> yeah i've got PC133
<linear_cannon> there's a few boards that did RDRAM or DDR, but they're uncommon
<linear_cannon> (but i want one)
<mjg> so what's the overhead of ping ponging a line over there?
<geist> so that sets it at like 200MB/sec max? i think it's 64bit wide, so that's 200MB/sec max bus bandwidth
<geist> dunno
<linear_cannon> ok, after a quick depclean: my p3 box has 531 packages installed
<linear_cannon> 32 in world, 48 in system, the rest are dependencies
<geist> but that was a fairly fast machine at the time, the idea of running a single process that eats 500MB of RSS was insane
<mjg> linear_cannon: would you be willing to comple this real quick: https://github.com/antonblanchard/will-it-scale.git
<linear_cannon> absolutely
<geist> and of course the only reason i can do that is i maxed out ram with 1GB, which would have been crazy expensive at the time
<mjg> you will need hwloc
<mjg> no idea gentoo package
<linear_cannon> no problem
<linear_cannon> i use hwloc on other systems
<linear_cannon> i can grab it
<mjg> aight
<geist> at the time i bought it i think i had 128MB which was IIRC a fairly large amount
<linear_cannon> "other systems" here mainly == xeon phi
<linear_cannon> i should run this there too
<geist> would be like 64GB for a desktop nowadays. more than you need but not ridiculous
<mjg> linear_cannon: would be funny if the lbi did not support i386 :p
<mjg> linear_cannon: if so i have a patched file to skip the dep
<geist> mjg: re bouncing a line. would also need to look into whether or not P3 had direct line transferral. wouldn't be surprised if it had to pushi t through ram
<geist> and there's no L3 of course
<linear_cannon> hmm, if i try to run this on the xeon phi i'll have to figure out how to suspend my wife's compute project on there
<linear_cannon> would just ask but wife is in bed sick
<mjg> dude
<geist> oh no, dont anger the wife
<mjg> the point is to run it on pentrium 3
<mjg> the dual cpu one
<linear_cannon> yeah i know
<linear_cannon> i'm doing that too
<linear_cannon> i'm just curious
<mjg> xeon phi reslts are gonna suck
<geist> i'd run it on mine but last time i fired it up the drive died. but i'm not sure it's the drive. i'm starting to think it's a failing power supply
<mjg> i can give you any cascade lake result you want right now
<geist> since it seems like any drive i stick in it eventually dies. and that's suspicious
<mjg> 96 threads
<mjg> geist: you plug in actual hdds?
<mjg> not some sdcard?
<heat> mjg, do you have the no hwloc patch anywhere?
<heat> for willitscale
<mjg> may need an extra fix up on linux
<mjg> anyhow here is the magic command list to bench: https://dpaste.com/GTDKJWH8F
<bslsk05> ​dpaste.com <no title>
<mjg> actually lemme tweak it:
<geist> mjg: honestly no because a) i have a bunch of old drives, though tghey're failing over time and b) it's much more fun to hear drives clicking in old machines
<bslsk05> ​dpaste.com <no title>
<geist> in modern machines, obviously SSD is better, but for old ones. you want the full experience
<mjg> geist: not disagreeing, but the sd card is the common solution
<mjg> people notoroiusly skip the hdd and floppies
<linear_cannon> or compactflash
<mjg> perhaps lack of actual hw
<geist> yup eventually i'll need to get more of those. i only have a sd to scsi adaptor
<geist> never got around to getting a sd to ata one, etc
<linear_cannon> ide->compactflash is basically passive
<geist> but yeah i think it's mostly because dealing with old drives is a PITA
<geist> but i kinda like it, but it's all part of the same necrophilia
<mjg> so what's your opinion on people who mod their amigas with fpga cards
<mjg> you basically are running new hw in the old box
<mjg> and larping otherwise
<geist> no opinion, but i wouldn't do it because of that reason
<mjg> right
<mjg> anyway https://dpaste.com/2Z3HDPWQW 's the thing to run on the 2 cpu sucker
<geist> it' starts to get into the same territory as a C64 clone with a raspberry pi in it
<mjg> key points are 1. scalability of things which shoudl be linear 2. ... and the other one
<geist> not that i dont have a few of those kinda things, but those are for things that i wont realistically get real hardware
<linear_cannon> i'm fine with the fpga thing if you're treating it like it's a new thing, and not like it's the old thing
<mjg> geist: ye it would ruin the experience for me
<geist> ie, a PDP8 clone, a PDP11 clone, and an altair clone, which are all using some emulaiton of one type or another
<mjg> linear_cannon: there are people who try to use it as a daily driver
<linear_cannon> yeah, that's fine imo, if you can make it work
<mjg> i also know there are demos and games which *require* the new hw
<mjg> kidn of interesting they went that route, but it is their kink to have :)
sinvet has joined #osdev
<geist> yah, like 'had amiga kept developing we could have done this' i guess
<geist> the apple 2gs folks hae this transwarp thing that is increasingly hard to get ahold of
<geist> but was a huge speed increase *at the time* (like 2Mhz -> 13Mhz)
<geist> and kinda similar, some of the later 2gs games more or less required it
<linear_cannon> that was kind of a weird scenario since there was no technical reason the IIgs couldn't have shipped with a faster processor in the first place
<geist> so that falls into a weird territory where it's not technically out of the era to have one of these accellerators
<mjg> so i learned atari 65 xe has space on the board for liek 4 x the ram
<mjg> and it supports it
<geist> linear_cannon: yeah
<linear_cannon> they just didn't want the IIgs to overshadow the macintosh
<heat> geist, i've just noticed Zcmp actually only supports s0-s12 + ra
<heat> this is very very CISC
Turn_Left has quit [Quit: Leaving]
<heat> in any case this is embedded only, which sucks
<geist> heat: yeah they only have a 16 bit opcode, so the fact that they were able to squeeze it in
<geist> actually worse, because s10 for some reason is not in the list
<geist> i think it's probably ra is the s10 bit
<heat> ah yeah maybe
<geist> i noticed it because there was a chat about the layoutof a stack frame, and ra + s0 are inverted relative to what Zcmp will toss down
<geist> because the order, is i guess (bottom to top) ra, s0+
<geist> and currently when using a frame pointer, which is s0, it's [s0, ra] incrementing
<mjg> linear_cannon: so when do you think you can get around to that p3 vs will-it-scale
<heat> yep
<linear_cannon> mjg, it's running right now
<mjg> linear_cannon: kewl
<heat> I don't think it matters much but it's actually annoying
<heat> one day i'll need to grok riscv and JIT for it
<geist> heat: side note, in case you use frame pointers to backtrace, i debugged and discovered that riscv usea slightly nonstandard frame pointer layout
<heat> riscv opcodes that is
<heat> oh yeah? how so
<geist> notably the riscv frame pointer (s0) points to the CLA of the stack, not the old frame pointer
<geist> which effectively just means it points to +16 (on riscv64) from where the old frame pointer is
<geist> unlike at least x86 and arm
<geist> arguably what RV does here makes more sense, but it is technically different
<geist> i had to tweak the zircon backtracing code for this
<heat> oh yes, I take that into account
<heat> *(fp - 1) = ip, *(fp - 2) = nextfp
<geist> correct. instead of fp[1], fp[0]
<heat> yall have generic backtracing code?
<geist> yeah, i mean it's not that complicated, but we always build the kernel with frame pointers, and then just follow them backwards
<heat> or was it a part of the good ol' ctrl-c+ctrl-v arch/
<geist> no it's generic. down in the Thread class
<heat> odd
<heat> do most architectures follow the x86 way?
<geist> it's partially because you can also ask for a backtrace of a context switched thread, so the logic is basically Thread->GetBacktrace(&bt_struct)
<geist> and it figures out if it's the current thread or some thread that's blocked somewhere and starts accordingly
<geist> i think most arches follow the x86 way
<geist> i dont have it handy but there's a whole bug i think on github somewhere about it
<geist> and why RV did it one way vs the other
<geist> and most of the answer is: beause someone chose it that way and now we have it forver
<heat> yeah
<heat> some decisions in riscv really backfired
<heat> AFAIK there's some regrets about having gp at all
<bslsk05> ​github.com: Consider standardising which stack slot fp points to · Issue #18 · riscv-non-isa/riscv-elf-psabi-doc · GitHub
<geist> yah we just went ahead and recycled gp in the kernel for current cpu. works great for that
<heat> huh
<heat> thats weird
<heat> how does codegen work?
<heat> surely you disable all relaxations?
<geist> you just dont get the gp relaxation
<geist> if you just omit the __global_pointer$ symbol from your linker script, the linker can't relax anything into small sections
<heat> oh, TIL
<geist> so it doesn't get it, and since GP is otherweise completely untouched by the compiler, it's just a free register
<heat> yeah
<geist> though i think there may be a more correct switch to disable it
brunothedev has joined #osdev
<geist> something like --small-data-size=0 or something
<heat> does it (gp relaxation) make little sense in the kernel? or in general
<geist> where the compiler doesn't even assume the sdata and whantot exists
brunothedev has left #osdev [part part part part art HELP]
<heat> I haven't really tested it, just read some maskray rants
<geist> i dont think it does really. unless you can strictly control it. maybe f you set the automatic data size to 0, and thene xplicitly put critical stuff in the sdata or whatnot
<geist> then you can carefully control what gets the relaxation
<geist> my experience with futzing around wit it in LK is onc eyou have >2K of small data it becomes some crap shoot what goes in it
<geist> or you can reuse the register for something else
<mjg> linear_cannon: well? :)
* heat nods
<linear_cannon> it's still running. currently on malloc1
<heat> I guess cpunr is useful-ish
<geist> you only get 4K of small data, so it seems like a waste of a whole register
<mjg> linear_cannon: i'm trying to go to sleep mate, don't leave me hanging
<mjg> linear_cannon: duuude
<heat> although I personally have cpu_nr as a pcpu var
<mjg> linear_cannon: feel free to run all of them later, right now the set i linked would be the-besterested: https://dpaste.com/2Z3HDPWQW
<heat> so ld offset(tp), reg
<mjg> linear_cannon: it will take literally one minute and be short enough to paste into dpate
<geist> same. that's used all over the place, especially inside say a spinlock routine
<linear_cannon> ok, doing that
<geist> being able to load the current cpu nr from it would be nice
<geist> but honestly worst cas eyou could literally put the cpu nr in gp
<geist> only gotcha there (and i've been bit by that) is dont save/restore it in IRQ context
<heat> oh
<heat> I thought you were literally just stashing the cpunr in gp
<geist> oh gosh no. i meant put a pointer to the current cpu struct
<heat> and then using tp for the regular pcpu stuff
<heat> ah, so are you not using tp?