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
<mxshift> It's such a strange piece of Intel history I had to have one
<geist> wikipedia shows a -1 and -2 version. the -2 has a lot ess transistors, but i'm guessing it's because it was intended to replace a i386sx vs dx
<geist> and thus less pins, etc
Vercas6 has quit [Quit: Ping timeout (120 seconds)]
SpikeHeron has quit [Ping timeout: 272 seconds]
SpikeHeron has joined #osdev
Vercas6 has joined #osdev
gxt has quit [Remote host closed the connection]
gxt has joined #osdev
gog has quit [Ping timeout: 260 seconds]
Vercas6 has quit [Quit: Ping timeout (120 seconds)]
Vercas6 has joined #osdev
moberg has quit [Ping timeout: 246 seconds]
moberg1 has joined #osdev
<mxshift> They are a set. -1 goes in the 386 socket. -2 replaces the 387
<geist> aaaah
<mxshift> Supposedly -2 only exists to give the fpu in -1 access to FERR#
<clever> somehow about how the 386 socket was the int core, and the 387 was the optional fpu core, and somehow the 2 cores co-operated
<clever> and i think that rapidcad just put both into one core
zaquest has joined #osdev
epony has quit [Ping timeout: 252 seconds]
dude12312414 has joined #osdev
epony has joined #osdev
Vercas6 has quit [Quit: Ping timeout (120 seconds)]
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
<mxshift> rapidcad is a 486 core in the 386 package but with the 486-specific instructions disabled
terrorjack has joined #osdev
<geist> yeah was gonna say, the thing that you stick in the 387 slot is probably mostly a dud
dude12312414 has quit [Ping timeout: 258 seconds]
dude12312414 has joined #osdev
[itchyjunk] has quit [Read error: Connection reset by peer]
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
dude12312414 has joined #osdev
Vercas6 has joined #osdev
<klys> kazinsal, https://github.com/pasis/ipx didn't work for me, linux-6.0.0
<bslsk05> ​pasis/ipx - IPX kernel module for Linux 4.18+ (1 forks/9 stargazers)
<klys> it appears to work except there does not seem to be connectivity
Lumia has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
bgs has joined #osdev
<geist> huh i thought there was already support for it in linux
<geist> maybe there was an it as removed?
<geist> oh yeah that repo mentions that it was removed and this adds it back
<geist> makes sense
bauen1 has quit [Ping timeout: 260 seconds]
SGautam has joined #osdev
bgs has quit [Remote host closed the connection]
Lumia has quit [Quit: ,-]
bauen1 has joined #osdev
Vercas6 has quit [Remote host closed the connection]
Vercas6 has joined #osdev
knusbaum has quit [Ping timeout: 255 seconds]
Burgundy has joined #osdev
knusbaum has joined #osdev
eroux has quit [Ping timeout: 260 seconds]
eroux has joined #osdev
SGautam has quit [Quit: Connection closed for inactivity]
xenos1984 has quit [Read error: Connection reset by peer]
xenos1984 has joined #osdev
GeDaMo has joined #osdev
bauen1 has quit [Ping timeout: 250 seconds]
bauen1 has joined #osdev
bauen1 has quit [Ping timeout: 260 seconds]
bauen1 has joined #osdev
bauen1 has quit [Ping timeout: 272 seconds]
carbonfiber has joined #osdev
wand has quit [Remote host closed the connection]
wand has joined #osdev
bauen1 has joined #osdev
bauen1 has quit [Ping timeout: 250 seconds]
bauen1 has joined #osdev
fatal1ty has joined #osdev
<fatal1ty> Operating System Development
<fatal1ty> #osdev is "Operating System Development || Don't ask to ask---just ask!
<fatal1ty> i wish that would have worked
dude12312414 has joined #osdev
carbonfiber has quit [Quit: Connection closed for inactivity]
<vdamewood> fatal1ty: What what would have worked?
Starfoxxes has quit [Ping timeout: 252 seconds]
Starfoxxes has joined #osdev
wereii has quit [Quit: ZNC - https://znc.in]
wereii has joined #osdev
<vdamewood> oops. s/What what/That what/
Burgundy has quit [Ping timeout: 272 seconds]
Matt|home has quit [Quit: Leaving]
darkstardevx has quit [Ping timeout: 250 seconds]
eroux has quit [Ping timeout: 250 seconds]
bgs has joined #osdev
eroux has joined #osdev
xenos1984 has quit [Ping timeout: 276 seconds]
xenos1984 has joined #osdev
eroux has quit [Ping timeout: 276 seconds]
identitas has quit [Quit: Bridge terminating on SIGTERM]
Irvise_ has quit [Quit: Bridge terminating on SIGTERM]
chibill has quit [Quit: Bridge terminating on SIGTERM]
Maja[m] has quit [Quit: Bridge terminating on SIGTERM]
Maja[m] has joined #osdev
eroux has joined #osdev
sortie has quit [Quit: Leaving]
identitas has joined #osdev
chibill has joined #osdev
Irvise_ has joined #osdev
sortie has joined #osdev
heat has joined #osdev
Burgundy has joined #osdev
darkstardevx has joined #osdev
xenos1984 has quit [Ping timeout: 276 seconds]
xenos1984 has joined #osdev
y0m0n has joined #osdev
Burgundy has quit [Ping timeout: 260 seconds]
Matt|home has joined #osdev
elastic_dog is now known as Guest3315
Guest3315 has quit [Killed (silver.libera.chat (Nickname regained by services))]
elastic_dog has joined #osdev
Burgundy has joined #osdev
y0m0n has quit [Ping timeout: 250 seconds]
* geist shrugs
gog has joined #osdev
elderK has joined #osdev
nyah has joined #osdev
zxrom has joined #osdev
zxrom has quit [Max SendQ exceeded]
tomaw has quit [Quit: Quitting]
tomaw has joined #osdev
zxrom has joined #osdev
<dminuoso> Okay Ill bite.
zxrom has quit [Max SendQ exceeded]
<dminuoso> Who will write a kernel for me?
* mjg_ is busy
<ZipCPU> What are your requirements?
* ZipCPU is curious, but needs to build his own
<dminuoso> Written in Haskell, executable on a PDP11.
* ZipCPU is out
<dminuoso> Okay, that second part is optional.
<moon-child> dminuoso: only you
<ZipCPU> Why the PDP11?
<dminuoso> For some inexplicable reason its one of my favourite computers.
<dminuoso> I keep wanting to get one
xenos1984 has quit [Read error: Connection reset by peer]
<ZipCPU> Why not just get a copy of one of the kernel's that's already been written for the PDP11?
<Reinhilde> you'll need that at first, to write the Haskell compiler, etc
<dminuoso> Because of the other requirement. I've made a promise the next kernel Ill write will run on Haskell.
<dminuoso> On a custom RTS.
<dminuoso> Reinhilde: Well, the compiler we already have!
<dminuoso> Just need to switch out the RTS of GHC.
<remexre> does the PDP11 use core or RAM?
<dminuoso> remexre: Depends on the exact model
<Reinhilde> I think one can build SRAM that emulates core
<dminuoso> The early versions had core memory, later versions used ram
<remexre> This might be more convenient on core (or other persistent memory), but a thing I have done is to run a Forth bare-metal
<remexre> then compile my functional language to the CAM
<remexre> then implement the CAM primitives in Forth
<remexre> dunno how many "weird" primitives are in Core, but it was a weekend project to do this (sans GC) for STLC
<dminuoso> To nitpick, even core memory is (usually) RAM.
<remexre> DRAM* then :)
<remexre> i dunno, i'm a twenty-something, i only know of core from reading BOFH :P
<dminuoso> Out of curiosity, what exact difference between core memory and modern memory are you trying to get at?
<dminuoso> Volatility?
<remexre> ya
zxrom has joined #osdev
zxrom has quit [Max SendQ exceeded]
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
<mrvn> core memory you have to constantly refresh, SRAM holds the charge and DRAM you have to refresh again, right?
<dminuoso> mrvn: Not quite
<dminuoso> The nasty thing about core memory is that reading erases the stored information.
<mrvn> and by core I assume you mean those rings with 3 wires through them
<remexre> perfect for linear haskell /s
<dminuoso> remexre: well, with linear haskell you could model memory access safely, yes.
<mrvn> dminuoso: I think that's true for dram too with some builtin logic to rewrite what you read.
GeDaMo has quit [Quit: Physics -> Chemistry -> Biology -> Intelligence -> ???]
<dminuoso> mrvn: Ohh TIL. It seems so yes, the logic circuitry is called sense amplifiers.
<dminuoso> I guess volatility is the only real difference. But it may be that you want to refresh core memory every now and then due to magnetic fields
<dminuoso> Possibly depending on the environment and exact implementation
<mrvn> I think most cpus did write back core memory on read but it might be cool to do that through the compiler. Maybe a bit in the opcode and destructive reads are faster.
<dminuoso> I would rather suspect the memory controller having done that back then
<dminuoso> Such that you cannot normally issue destructive reads
<mrvn> dminuoso: totally
xenos1984 has joined #osdev
<dminuoso> So moving this into the memory chip itself is probably just a latency optimization
<mrvn> but you could have a cmpxchg that writes back the new value
<dminuoso> because otherwise the rows and columns would be blocked until the rewrite is done
gildasio has quit [Ping timeout: 258 seconds]
<dminuoso> Oh, speaking of memory core.. actually sense amplifiers were *from* magnetic memory!
<Reinhilde> ultimate use-after-free
<dminuoso> This is cool
<dminuoso> I suppose the level of ingenuity has not really changed over the decades. Hardware designers were not less smart back then.
<dminuoso> I think Ill take this manual and read it in bed.
<mrvn> Feature #1 for when I write my own browser: when updating the page the element below the mouse always remains in place and everything else may move.
<clever> mrvn: that reminds me of a combination of bugs ive run into before
<mrvn> Feature #2: transparent elements are also transparent to mouse clicks
<clever> the css on-hover tag, changing the size of an element, causing it to not be hovered, causing it to be hovered
<clever> flicker city!
<clever> but, that flicker, causes 1000's of mouse pointer change operations per second
<clever> and that operation involves iterating the list of open tabs
<clever> 0.2 seconds of hover over the wrong spot, and the central chrome process is 100% cpu pegged for 10+ hours
<mrvn> clever: my old WM had that "feature" in a 1 pixel heigh region over the task bar where the mouse would enter the tooltip for status icons, which makes the tooltip close
<mrvn> My optical mouse also sometimes flickers, the mouse pointer jumping between 2 pixels constantly. Must have the mouse pointer just between two pixels and the optical sensor between 2 pixels too so it can't decide where it is
heat has quit [Remote host closed the connection]
heat has joined #osdev
<clever> mine only tends to do that when i get a hair in the sensor
<Reinhilde> ye
<mrvn> clever: all events should a) have a timestamp (from the kernel), b) repeated events should get merged if you can't deal with them in time (in the app)
m5zs7k has quit [*.net *.split]
janemba has quit [*.net *.split]
jimbzy has quit [*.net *.split]
Ram-Z has quit [*.net *.split]
hl has quit [*.net *.split]
ecs has quit [*.net *.split]
sbalmos has quit [*.net *.split]
jstoker has quit [*.net *.split]
relipse has quit [*.net *.split]
dza has quit [*.net *.split]
mimmy has quit [*.net *.split]
ecs has joined #osdev
relipse has joined #osdev
jstoker has joined #osdev
Ram-Z has joined #osdev
hl has joined #osdev
mimmy has joined #osdev
m5zs7k has joined #osdev
sbalmos has joined #osdev
genpaku has quit [Remote host closed the connection]
genpaku has joined #osdev
Rubikoid has quit [Ping timeout: 260 seconds]
Rubikoid has joined #osdev
<heat> gog
<gog> heat
<gog> 'sup
<gog> how's life
<heat> it's goin
<heat> very tired today
<heat> got my drivers license wooho
<heat> o
<gog> boooo
<gog> sorry anti-car reflex'
<heat> cars bad nordic people riding bikes good
<gog> we should ride bikes and generally pollute less as a socety yes
<gog> because we pollute a fuckload
<mjg_> notjustosdev
<gog> yes
<heat> thankfully here you can kinda use public transportation effectively
<gog> it's not great here
<heat> no 7 lane highways
<heat> cough cough us
<gog> 21
<gog> 7 is like an average midsize city
<heat> what
<gog> 7 total
<heat> holy fuck
<gog> the widest one is 21 lanes total or something
<heat> you have some fucked up cities in the US lol
bgs has quit [Remote host closed the connection]
<heat> here if you wanna go to/around the big cities (Lisbon, Porto) you can totally just fully use public transportation EZ
<heat> if you wanna go by car you're just giving yourself rope to hang yourself, voluntarily
<bslsk05> ​s.hdnux.com <no title>
<gog> katy freeway, houston, txc
<heat> nasty
<gog> it's basically the worst thing you can do to a city lmao
<mjg_> wow
<mjg_> in my early 20s i would be impressed by it
<mjg_> now i'm repulsed
<gog> big same
<mjg_> anyway word of advice, heat
<heat> 82% of our highways have 2 lanes, 17% have 3, 1% has 4
<mjg_> keep the speed limit
<heat> noshitsherlock.jpeg
<mjg_> dude
<mjg_> young dudez are notorious for driving way over the limit
<mjg_> i know, i was one of them
<gog> the US basically is going to go bankrupt from all the highways
<heat> i barely have the confidence to get to 100km/h lol
<mjg_> maybe you need your test checked then :-P
<gog> it can't even maintain the ones that exist
<mjg_> testosterson
<heat> testotstsetrson
<mjg_> gog: ye ye it's a ponzi scheme
<gog> yes
<gog> the growth ponzi scheme
* gog does the secret numtot handshake
<gog> i got banned from numtot
<heat> "Transit-Oriented Teens"
<heat> you mean trans teens
<gog> trams teens
<mjg_> burpens
<mjg_> i presume you watch the stroad stuff
<gog> i've watched all the stuff
<gog> i'm drinking the urbanist koolaid and coming back for seconds
<heat> i sometimes binge adam something
<heat> mildly amusing
<gog> he's alright
<mjg_> based and red pilled
<gog> the good kind of redpilled
<gog> based and transitpilled
<mjg_> youtube recommended a body building-related video with "red pill" in the title
<mjg_> i thought that's actual red pill crappery
<mrvn> gog: WTF? Have they never heard of a straight line?
<heat> stay hard
<gog> mrvn: it just looks more wavy and hilly than it really is because of its scale
<mrvn> no, it's because they had to bould around the houses on the sides.
<mjg_> heat: CAPS BITCH
<mjg_> heat: 40% rule
k0valski1889 has quit [Quit: Peace out !]
<gog> well, for some of it yeah
<heat> you know, while i think david goggins is a bit of a weirdo i mildly respect the man
<gog> but when the corridor was orignally built they rammed it through residential neighborhoods
<heat> he's no gary vee
<mjg_> heat: defo respect to goggins, he just should not be listened to
<mjg_> heat: he lives what he preaches, which is very demanding so props for living up to it
<mjg_> it just happens to be a bad idea, so....
<mjg_> there is Real Science(tm) concerning muscle building, rest periods and whatnot
<mjg_> he claims it's all an excuse to not exercise
<mjg_> kthxbro
<geist> what is everyone blabbing on about?
<mjg_> solaris
<heat> driving, urbanism and david goggins
<geist> oh carry on!
<heat> and now solaris
<mjg_> heat: cars have DOORS
<geist> reminds me: 512 byte CD-rom sectors
<gog> sorry helped drag the channel off topic again
<geist> iirc the solaris 2.7 install media is 512 byte, so required a cdrom that could deal with it
<geist> discuss.
<gog> heat started it
<heat> yeah my fault
<heat> deal with it
<mjg_> geist: ha. do you happen to know what "are you on a network" question from the installer means?
<geist> heat: i fixed a bunch of the x86 mmu code this weekend. not perfect, but at least made it a little better type wise
<mjg_> i don't and was mildly pondering finding out one day
<geist> mjg_: for solaris? no idea. i haven't run an install in forever
<mjg_> geist: it is a great mystery, even cantrill does not
<geist> i kinda lost interest when it went x86, because then it wasn't unique to me anymore
<geist> but i used to use it somewhat back in the solaris 7 and 8 days on a sparc
<geist> used to run one of those cheapo netra boxes they sold in the early 2000s. knew a lot of folks that had em
<gog> CD-RAM would have been cool
<geist> was a reasonably nice cheap 1U rack
<gog> akin to DVD-RAM
<geist> Netra X1 i think
<mjg_> my college had an x86 solaris box in 2005
<mjg_> student shell accounts were given out there
<geist> yeah that was probably about when they started doing solaris x86
<heat> we have a sparcstation as an antique
<heat> feel old yet? :P
<geist> in 1995 my college was doing the same thing. studen shell accounts on a sparc solaris box
<mjg_> today it's all linux :[
<geist> something like a sparcserver 2000. it was really adept at running hundreds of instances of mutt simultaneously
<mjg_> and news readers!
<geist> first time i really experienced a 'big' unix box. i was really impressed
<heat> known solaris lover mjg_ yearns for solaris
<mjg_> heat: you really want a bench against solaris, don't you
<mjg_> heat: how bout pipe write speed
<geist> there's some sort of feeling of logging into a box thats handling hundreds of logins simultaneously well.
<heat> sir, this is a wendy's
<geist> hard to describe, but it's really neat
<mjg_> ye i like the big boxen
<mrvn> geist: in 95 my Amiga could do that
<mjg_> tons of load and it just works
* geist eyes roll
<mrvn> can't do much though. With just 128MB that goes below 1MB per login.
<heat> you don't need 1MB for a login
<heat> CoW go brrrrrr
<mrvn> but maybe for a shell and mutt
<geist> yah iirc this particular sparcserver was something like 8 cores and 512MB ram
<geist> which at the time was SRS BSNS
<geist> but even at the time i remember being fairly impressed at how well it could handle it
<mrvn> Back then programs would actually sleep when waiting for input
<heat> see, scalable
<geist> was one of those pivotal moments where i got a lot more interested in osdev
<heat> late 90s kernel tech could probably scale on 8 cores
<geist> like 'how the hell can you do that with a computer?' 'lets go find out'
<mrvn> Try running 10 instances of firefox for webmail on todays systems
<heat> firefox... also sleeps
<mrvn> heat: no, it takes micro-naps
<geist> sure i mean now i know how that worked, and it's not *that* itneresting from a modern kernel design point of view
<mrvn> heat: even does fsync() every second
<geist> but at the time it was by far the most exotic computing situation i'd ever been able to use
<heat> ew
<heat> geist, yeah totally
<geist> same with the engineering department having a true vax cluster you could get an account on
<heat> i mean, it's totally interesting how everything Just Works
<geist> which is also one of these 'how the hell does that work'
<mjg_> dude i was impressed you can install a system without a graphics card
<mjg_> over just serial
<mjg_> being 15 is something
<mrvn> heat: hey, the user hasn't done anything because the window doesn't even have focus. Lets write and fsync all the bookmarks.
<geist> heh i had a monochrome card that i put in one of my linux boxes at the time so i could keep on the floor, near my feet, a top session running all the time
<geist> which i was like omg this is so 31337
<heat> lol
<geist> at the time it was the easiest and one of the only ways to get a multiheaded PC
<mjg_> i felt great writing a program using fork() man
<mjg_> how have times changed :s
<heat> fork is still magic to me
<geist> of all the things i tossed over the years i do regret throwing away that mono card and monitor
<heat> and i've written it
<mrvn> geist: I think having a multiuser preemptive multitasking system with desktop at home and experience with modem accounts on the university made me not be so impressed when I actually started uni.
<heat> watching fork go brr is magic
<heat> in fact, i'm always super impressed how my system doesn't just blow up
<mjg_> 's you because don't stress test it mate
<heat> and everything works with the code i wrote, which seems so simple but it all fits together
<heat> stfu
<mjg_> OK
<mjg_> it works great man
<gog> mine does not currently work
<heat> will-it-scale is actually a decent stresser
<gog> i am not currently attempting to make it work
<mrvn> geist: BBSes and uucp. Sending an email from home to a friend in ireland in minutes. Wow. that impressed me.
<heat> not syzkaller or anything
<heat> but
<geist> but yeah so many years later i still have a bit of that magic when i see a system actually doing a bunch of things at the same time
<mjg_> heat: it mostly is not
<heat> why
<geist> i dunno why, even though i see it constantly, running a build in the background while typing here and listening to music is still a bit magical to me
<mjg_> it only runs narrow paths and in the same way every time
<geist> i think that's why i keep doing this crap instead of something else
<heat> geist, i meant that to mjg_ lmao
<heat> i totally feel you
<mjg_> lemme give you an example from my own fuck up in the area
<geist> you folks are a selected audience so you probably understand a bit more than the average bear
<geist> most folks i otherwise talk to just really dont get it
<geist> like 'yeah that's what computers do'
<mjg_> i wrote code which i benchmarked on 80 threads, it's like bro, indestructible
<mjg_> real workloads 'n shit
<heat> yeah no one really gets what i do in my spare time
<heat> so i just say "my own projects"
<geist> haha
<mjg_> then i handed it out to local "break it" guy
<geist> yup
<mjg_> you wont believe it man, several bugs, including a design error
<mrvn> geist: Rendering mandelbrot fractals while playing SimCity (or is that the other way around?), now that impressed me.
<mjg_> heat: see "stress2" on freebsd for an example
<mrvn> mjg_: hehe, try 1024*768 = 786432 threads.
<mrvn> processes even
<mjg_> i mean cpu threads
<mrvn> me too
<heat> geist, that reminds me, have you ran syzkaller on fuchsia (personally)?
<geist> not personally
<geist> i think it requires a fair amount of upkeep which is why i goes through periods of disuse
<geist> main reason being the syscall layer in zircon is quite alien to syzkaller i think
<heat> does it "just" pick up FIDL stuff and learns how to drive it?
<geist> ie, it's somewhat linux centric
<geist> right, exactly
<geist> side note ian did a little talk on fuchsia recently that might be interesting
<mrvn> mjg_: On ARM you can put the process struct, L1 page table, L2 page table, stack and a bit of heap all in a single 4K page.
<heat> for that to be effective you'd need the coverage for every process that's involved in the "operation"
<heat> which is probably hard
<heat> geist, what ian?
<bslsk05> ​'"An IPC Language For The Whole Operating System" by Ian McKellar (Strange Loop 2022)' by Strange Loop Conference (00:45:08)
<geist> kidna interesting, though may not be news
<heat> never seen this
<geist> oh he's one of the guys on the project. have worked with him for like 20 years
<heat> cool!
<geist> not a lot about the kernel or whatnot, but maybe find something interesting it
<heat> nice moustache
<heat> mckusick-esque IMO
<heat> :D
<geist> oh for a while he had the honor of being the stock photo for a hipster wearing google glasses
<heat> being able to effectively fuzz fuchsia seems like an interesting problem
<heat> you need to have some concept of a "request chain" of sorts
<heat> and collect coverage for each request
<heat> the corpuses syzkaller can generate are crazy
<bslsk05> ​groups.google.com: fs: GPF in bd_mount
<heat> it crafted a filesystem and mounted it
<heat> computers are sentient man
<heat> >Mateusz Guzik
<heat> WOAH
<heat> this was a happy little accident eh
<heat> i so want this now
SpikeHeron has quit [Quit: WeeChat 3.7.1]
<moon-child> yeah syzkaller is cool
<heat> very
<heat> but it also has limitations
<heat> i asked about syzkaller when we were fuzzing cloudflare workerd, apparently it doesn't fit well at all with dynamically typed APIs
dza has joined #osdev
<heat> geist, did you get to emulate i386 atomics in lk?
alexander has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
alexander has joined #osdev
darkstardevx has quit [Read error: Connection reset by peer]
<geist> i think 386 has atomics for most things, just not cmpxhgb8 (which is also a pentium thing as linus pointed out)
<geist> i think i'm just leaning on the compiler for x86, and it seems to have generated proper stuff for 386 (or at least gcc does)
Burgundy has quit [Ping timeout: 260 seconds]
<heat> hm
<heat> was the lock prefix already a thing?
SpikeHeron has joined #osdev
elderK has quit [Quit: Connection closed for inactivity]
<geist> i think so, and/or atomics without actual SMP is a simpler thing
<geist> because you're only needing to be atomic with respect to an interrupt basically
darkstardevx has joined #osdev
<heat> yeah
<moon-child> could movsq :P
<heat> but i don't think gcc will cli; mov ...; sti
<klange> everything's atomic if no other code can run :headtap:
darkstardevx has quit [Remote host closed the connection]
darkstardevx has joined #osdev
<moon-child> what do you need LOCK for if there's only one core?
<geist> hmm, maybe not
<moon-child> or was multisocket already a thing then?
<geist> calls out to a helper routine
<geist> oh i see, i just implemented those routines
<moon-child> probably takes a lock on the low bits of the address
<bslsk05> ​github.com: lk/ops.S at master · littlekernel/lk · GitHub
<heat> i wonder what libatomic does for i386
<moon-child> oh
<geist> a trick i saw on netbsd i think for VAX was to write the address that you're doing the atomic into a global somewhere and then do the operation
<geist> oh that was for smp i guess: do an atomic swap with the global with the address. if it was 0 then you got it, otherwise repeat
<geist> then do the operation (with ints disabled presumably)
<geist> basically a spinlock for all atomics
<geist> and if you want to make it better you could hash the lock based on some bits in the address, etc
<heat> yeah but how do you implement a spinlock on non-atomic-capable hw?
<geist> i think the idea is you need at least an atomic swap
<heat> or a cmpxchg really
<moon-child> xchg is sufficient for locks
<heat> did xchg have guaranteed atomicity back then?
<geist> but i think you can't really build an SMP on anything that doesn't have at least a swap, or i think worse case a single bit swap
<moon-child> but yeah I don't think you can do it without at least a primitive like that
gorgonical has joined #osdev
<mjg_> peterson lock can do it
<geist> but again there's a diff between atomic for local cpu and atomic for SMP
<mjg_> not that i recommend it
<heat> yeah i guess atomicity is just instruction based, you don't worry about the bus
<heat> anything that executes in 1 instruction Just Works(tm)
<moon-child> heat: I dunno, but the fact that it's atomic without the prefix leads me to believe that it probably predates the other atomic instructions at least
<heat> yeah
<heat> i mean, i'm relatively sure modern xchg is atomic
<geist> but i think SMP on 386 was at the best extraordinarily hard. really the question is if it had a #LOCK line or not
<geist> 486 almost certainly did, but it has to be able to have a multi cycle transaction on the bus
<heat> but i guess the atomicity thing was just a matter of "how many instructions do you execute a piece of code in" back then on non-SMP
<heat> since it will work correctly with ints
<geist> yah and outside of SMP x86 had all sorts of atomic by default things, like inc on memory, etc
<geist> but atomic with reading the old state is harder
<moon-child> kinda funny. We've gotten increasingly higher core counts, more numa, memory has gotten slower. So 'work on your own data' has gotten more and more important
<moon-child> and yet we also get increasingly more tools for fine-grained synchronisation at the same time
<zid> memory is why raytracing sucks
<zid> need to get some 3D memory cubes that can hold pretend photons and let me write to them from 1024 cores at 10TB/s
<heat> something i found out about 30 minutes ago: SMM and SMIs were added in pentium
<zid> sounds about right, timeline wise
<geist> yeah pentium was really a fairly large jump forward
<zid> that's when cpus were getting complicated enough to need support, and transistors cheap enough to include them
<geist> started getting SRS
<moon-child> zid: memory is why everything sucks
<zid> moon-child: some things
<moon-child> I mean
<moon-child> raytracing is kinda marginal :P
nyah has quit [Ping timeout: 272 seconds]
<zid> some thigns start as cycle bound, then you can add memory to make them faster, then you struggle to add anything more because of memory contention
<zid> if you could solve the latter, a class of things would get much faster
<zid> but most things are fine with just the first two, adding more cycles, or adding more memory
<heat> what if we added memory that's faster to access on some CPU cores
<zid> see point 3
<zid> adding more/better memory only gets you to the 2nd layer of scaling, the third layer of scaling is where you need to be to get a lot of already fast things faster
<bslsk05> ​'Numa Numa Dance' by Gary Brolsma (00:01:40)
<heat> aw shit
<heat> greatest song ever
<zid> so like total perf = cpu perf * memory perf * contention perf; and we're at 8.0 * 4.2 * 1.1;
<heat> change my mind
<zid> the 'best' win there would be to increase the third term
<zid> Everything's an incremental clicker game.
<heat> what's contention here
<geist> no, silly. the best win is to buy an amiga
<geist> since they solved every one of these problems in the 80s
<zid> but I can't buy *two* amigas to make it twice as fast :(
<zid> I can only get 1.1x as fast
<geist> two amigas no human is prepared to handle
<heat> the best win is to
<zid> I have feet damnit!
<heat> USE PLAN9!!!!
<geist> do not fly too close to that sun
<heat> PLANNEIN BEST OPERATING SysTEM
<zid> I know it's a risk, but I have to try
<mjg_> SUN
<mjg_> and i'm told i'm shitting on solaris
<geist> eeyooo
<zid> If we don't, the bomb will explo- oh I slipped into a B-movie there for a second
<mjg_> heat: the real win is to use gnu/hurd
<zid> Can we use musl/hurd yet
<heat> no mang
<geist> oh wow i finally hooked up an old cheap ballpoint pen i had never unboxed
<heat> plan9 was the best operating system ever
<geist> and it writes like a mofo
<zid> pens have to be.. hooked up?
<heat> galaxy brained ideas and shit
<zid> 240V pen sounds fun
<geist> like you want ink on the page? yeah lemme point some ink the page
<zid> Lemme click this writing link so that the page loads with ink
<zid> *240V arcing noises*
<geist> no it came with a separate ink cartridge which i had to hook up to it
<zid> oh, assembled? :P
<geist> yeah
<zid> Oh it's my birthday.
<zid> Presents time guys
<heat> happy bday
<zid> I gave you 13 mins of leeway too
<heat> can i gift you my friendship
<heat> or is that kinda lame
<geist> it really writes well. i'm impressed. it was a $5 amazon basics fountain pen (not ballpoint)
<zid> heat: I wanted a gift not a white elephant
<zid> You'll just bug me about how bad you are at rationalising locking algs
<heat> :((
<mjg_> so here is a funny q
<mjg_> anyone really proud of any piece of code?
<zid> no funny q, only funny birthday presents
<heat> yea
<mjg_> no intent to shit on it, genuine quesiton
<zid> mjg_: occasionally, for about 20 mins
<mjg_> zid: ye
<zid> until I have to delete it to make it do what it was supposed to do instead
<zid> and not the mock version
sonny has joined #osdev
<mjg_> i should clarify, something which lasts sleeping on it
<mjg_> ;)
<heat> i'm decently proud of my slab allocator even though you'll immediately shut it down
<mjg_> outlasts
<zid> and then I find out I forgot a factor
<zid> and have to incorporate something that makes it less clean
<mjg_> heat: good for you man
<zid> Can I be like, ironically proud?
<heat> its not perfect but it gets the job done
<heat> just like my p
<zid> Like when I make a dumb X-maro solution work
<zid> macro*
<mjg_> no it is real proud
<zid> No then, but also I am kinda stoic in general
<zid> and depressed millenial memey
<mjg_> there was some stuff i was proud for few months, then i got better clue
<mjg_> and things changed :S
<zid> so I might not be fair to ask
<zid> see, you have to come back to it and incorporate the factor you fucked up not realizing you should have cared about
<zid> and ruin it all
<zid> It's only clean because you forgot a disgusting edge case because you're dum
<heat> mjg_, well, that's normal i think
<geist> yeah i'm reasonably proud of some of my code here and there
<mjg_> people claim i'm an eternal pesimist
<heat> most code i give some thought into is code i'm reasonably proud of
<heat> !halfassed basically
<heat> ofc in 2 years i stop being proud usually
<geist> yeah in general i'm happy with anything that actually does something, does it reliably, and continues to do it years later
<geist> doesn't have to be pretty, or perfect, or whatnot
<geist> but i like to think of code that functions and continues to do things is something to be happy about
heat has quit [Remote host closed the connection]
<CompanionCube> http://www.novasareforever.org/dgsw/ if anyone's interested in the very old data general stuff apparently there's now a non-commerical license and provided downloads
<bslsk05> ​www.novasareforever.org: Novas Are Forever
<moon-child> zid: wait why do you have contention
<moon-child> isn't raytracing just, bunch of reads and computation, and then write out one pixel?
heat has joined #osdev
<moon-child> and you already know where the pixel is, so you shouldn
<zid> You wish
<moon-child> 't have to fight over it
<zid> even that approach is just much much too slow
<gorgonical> I am losing my mind over an i2c bus
<gorgonical> nothing makes sense
<heat> geist, yeah, reliability is a big part, sometimes even *working*
<heat> ofc fast is also great but plays second fiddle to those two
<zid> they end up having to do things like storing intermediates between frames and smudging it with camera moves, big caches and luts and stuff for everything to maximize reuse etc
<zid> nearby pixels stealing results from nearby pixels
<heat> i'm super proud of my OS because it somehow *works*
<klange> what, pride? that's illegal
<heat> even if some parts are not optimal, not entirely correct, and good bits are probably not 100% reliable
<zid> what you'd *want* is like.. 3D volumetric ram, and you start at the light, and update all the brightnesses of the surfaces, then do reflections from them, write out all the reflections to the surfaces, etc
<zid> spread over 10k cores
<heat> we need a osdev pride flag
<zid> isn't that just a picture of gog
<mjg_> voice would do it
<heat> quite possibly
<moon-child> zid: I see
<moon-child> and doing all this works out better than just getting more cores?
<zid> the problem isn't the more cores
<zid> the problem is that ram doesn't exist
<heat> mjg_, anyway, why do you ask
<gog> osdev is just sadism and masochism
<zid> more cores is easy
<geist> PCID. that's my task for the day
<geist> time to grok PCID
<froggey> gog: I wish lol
<gog> froggey: :P
<zid> PCID is my daemon for PCI devices, which we use to implement address space isolation.
<heat> geist, gl. for work or lk?
<geist> yes
<geist> but actually the former
<heat> :D
<geist> if nothing else i want to benchmark it
<heat> something i haven't figured out yet is how ASID/PCID reuse is meant to work
<geist> right, that's the hard part. and doing PCID based global shootdown is a lot more complicated than ARM
<geist> since if you naievely do it you might actually have to send out *more* IPIs on x86
<heat> tlb gen counter baby!
<geist> on ARM it's no big deal since you just do a TLBI instruction with the VA + ASID and then let it globally sort it out
<geist> (and on AMD Zen 4)
<mjg_> heat: baiting for people to mention what it is and shit on it
<mjg_> heat: whad did you think
<heat> if you want to shit on something i have a big file full of shit-worthy code: https://github.com/heatd/Onyx/blob/master/kernel/kernel/mm/vm.cpp
<bslsk05> ​github.com: Onyx/vm.cpp at master · heatd/Onyx · GitHub
sonny has left #osdev [#osdev]
<heat> i feel kinda mixed on it tbh
<heat> i'm reasonably proud and reasonably ashamed
<heat> mach vm has nothing on mighty onyx vm tbh
<kof123> "what if we added memory that's faster to access on some CPU cores" .oO( pages in registers )
<kof123> you can run, but you cant hide....from pages in registers
* geist whispers "TMS9900"
<heat> pre-CAR itanium firmware used their shitload of registers as a ram
<heat> they even made a heap out of it
<mjg_> heat: wut you got kasan?
<mjg_> does it work
<heat> yes i do, it used to, i was going to fix it today but im 2tired
<heat> why
<mjg_> you getting ready to use syzkaller?
<heat> dude i have an in-progress port of syzkaller lol
<mjg_> solid
<heat> with syscall descriptions and everything
<mjg_> i can point at certain systems which don't
<heat> i think fuzzers are fucking cool and i want to break my OS
<mjg_> 's the spirit
<mjg_> i think you can start immediately with trinity though :)
<heat> i just want to finish that shit up and get coverage data (probably through sancov i guess, i've looked a bit into it but haven't done it yet)
<mjg_> give me a minute
<heat> a quirk in syzkaller is that I have to run it in a reduced "fuchsia mode" because i don't have go
<mjg_> good grief, i just can't find anyting todya
<mjg_> there was a ready to use dumbest possible syzcall fuzzer
<mjg_> literally just set random args and do syscall
<mjg_> even that managed to find bugs in... certain systems
<heat> hmmm what systems may those be
<mjg_> i don't break and tell
<mjg_> oh there are also fuzzers for elf parsers
<mjg_> bailin for the day
<heat> yeah i've seen loader fuzzers
<heat> those always seem to be fun
<mjg_> illumos has linux binary compat
<mjg_> i ran trinity on it for lulz and it crashed quite fast
sortie has quit [Remote host closed the connection]
<mjg_> enterprise bro
<bslsk05> ​'North Korea's Lavish Subway System - Inside North Korea (Part 2/3)' by VICE (00:17:46)
sortie has joined #osdev
heat has quit [Ping timeout: 240 seconds]