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
<netbsduser> hwpplayer1: to answer your question from a few days ago i care about mach
<netbsduser> extraordinary influential kernel, they invented a lot of SMP fundamentals (the TLB shootdown and its optimisation, for instance) and the modern approach to implementing virtual memory
<netbsduser> and as well as their origins in unix land, specifically bsd, and the influence they had on bsd (mach was the first unix to have mmap, and the 4.4bsd vm was copy pasted from it) they also influenced the nt kernel's design
<heat> >the modern approach to implementing virtual memory
<heat> no.
<heat> >(mach was the first unix to have mmap
<heat> that's also not true
<heat> mmap was designed by berkeley people
<netbsduser> mmap was designed and *not* implemented
<netbsduser> sunos might have got there first possibly
<netbsduser> (but the sunos vm paper extensively cites the mach paper)
<netbsduser> until mach the idea of a highly portable virtual memory system is absent from the literature or the kernels
<heat> yes but it turns out the modern idea of a virtual memory system is quite different from mach's
<heat> at least on OSes that actually matter
<nikolar> heat: by modern, do you mean linux?
<heat> and windows
<netbsduser> windows copy pasted (mentally) from vms instead
<netbsduser> they still had to do tlb shootdowns (but i grant that would have been invented soon anyway)
<heat> granted, xnu does have a pmap interface (is it mach vm?) so it inherits that part
<heat> freebsd up to this date still suffers from having fucking mach vm
<netbsduser> xnu inherits the whole of it, it's just that it's had 30 years of development on it
<netbsduser> freebsd the same but to a lesser extent
<netbsduser> they both retain the unfortunate things like the shadow object chaining for fork (sunos did better, but getting away from fork would save a lot of bother)
<kof673> i saw this the other day https://en.wikipedia.org/wiki/Berkeley_Timesharing_System It was the first commercial time-sharing which allowed general-purpose user programming # Some concepts of the operating system also influenced the design of Unix, whose designer Ken Thompson worked on the SDS 940 while at Berkeley.
<kof673> i don't recall the details but someone had asked what was the significance...whatever is, basically "won" so...it is not noticed, since it is the norm
<kof673> *whatever it was
<kof673> > The 940, designed by UC Berkeley's Project Genie, added paged virtual memory to an SDS 930 to create a timesharing computer
<kof673> i don't know how that manifested, just 24-bit :D
<kof673> or i don't know if any of that particular influence is what is meant
mavhq has quit [Ping timeout: 244 seconds]
Gooberpatrol66 has quit [Quit: Konversation terminated!]
Gooberpatrol66 has joined #osdev
<kof673> (elsewhere) > some aspects of UNIX (e.g. the split between fork() and exec()) copy how the Berkeley system operated.
<kof673> bbl, that is perhaps where fork() got in :D
mavhq has joined #osdev
X-Scale has quit [Ping timeout: 256 seconds]
Arthuria has joined #osdev
mavhq has quit [Ping timeout: 246 seconds]
levitating has quit [Remote host closed the connection]
levitating has joined #osdev
levitating_ has joined #osdev
hwpplayer1 has quit [Remote host closed the connection]
levitating has quit [Ping timeout: 252 seconds]
netbsduser has quit [Ping timeout: 248 seconds]
raphaelsc has quit [Remote host closed the connection]
edr has quit [Quit: Leaving]
heat has quit [Ping timeout: 252 seconds]
gog has quit [Ping timeout: 265 seconds]
levitating_ has quit [Ping timeout: 265 seconds]
the_oz__ has quit [Ping timeout: 260 seconds]
karenw has joined #osdev
DrPatater has quit [Quit: Explodes into a thousand pieces]
Patater has joined #osdev
leon has quit [Ping timeout: 260 seconds]
leon has joined #osdev
Griwes has quit [Ping timeout: 260 seconds]
Griwes has joined #osdev
Fingel has joined #osdev
the_oz has joined #osdev
Gooberpatrol_66 has joined #osdev
Gooberpatrol66 has quit [Ping timeout: 246 seconds]
craigo has joined #osdev
karenw has quit [Ping timeout: 265 seconds]
youcai has joined #osdev
eluks has quit [Remote host closed the connection]
eluks has joined #osdev
Fingel has quit [Quit: Fingel]
mavhq has joined #osdev
mavhq has quit [Read error: Connection reset by peer]
mavhq has joined #osdev
Arthuria has quit [Ping timeout: 252 seconds]
m5zs7k has quit [Ping timeout: 246 seconds]
Dead_Bush_Sanpai has quit [Quit: Dead_Bush_Sanpai]
Dead_Bush_Sanpai has joined #osdev
m5zs7k has joined #osdev
spareproject has joined #osdev
emntn has quit [Ping timeout: 260 seconds]
emntn has joined #osdev
emntn has quit [Ping timeout: 272 seconds]
emntn has joined #osdev
steelswords94 has quit [Read error: Connection reset by peer]
steelswords94 has joined #osdev
levitating_ has joined #osdev
k0valski18891621 has quit [Quit: Peace out !]
levitating_ has quit [Ping timeout: 248 seconds]
levitating_ has joined #osdev
lucus has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
larsjel has joined #osdev
levitating_ is now known as levitating
Left_Turn has joined #osdev
jedesa has joined #osdev
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 252 seconds]
youcai has quit [Read error: Connection reset by peer]
kfv has joined #osdev
youcai has joined #osdev
GeDaMo has joined #osdev
X-Scale has joined #osdev
goliath has joined #osdev
heat has joined #osdev
<sortie> I don't really understand why my debian Linux takes that long to boot. My Sortix OS can get to a login screen in subsecond even a third of a second if I golf it
<sortie> systemd must be blocking on a lot more stuff
<sortie> Whereas my init is intentionally configured to just spawn login while all the background daemons are still being started
<sortie> You really can't beat straight to /sbin/login
<heat> correct
<heat> linux does a lot more than you do on a boot
<GeDaMo> There's a thing on systemd where you can tell it to show how long each item takes to start
<GeDaMo> systemd-analyze apparently
<GeDaMo> systemd-analyze blame
<Ermine> maybe one should compare different distros
<Ermine> Even on systemd distros boot time can vary a lot
<sortie> 23.225s vboxdrv.service
<sortie> damn virtualbox why you gotta be like that
craigo has quit [Quit: Leaving]
<sortie> I don't even use it
<Ermine> fuck virtualbox
<sortie> Looks like the driver is failing to compile on every boot lol
<Ermine> omegalul
<Ermine> but seems like usual thing on debian
<sortie> vbox doesn't really work on debian testing anyway
<nikolar> Lol why is it compiling on boot
<sortie> Because it's failing to compile
<Ermine> dkms
<sortie> The service just starts to compile when it starts up and notices the modules are missing
<nikolar> On arch, it never build on boot
<nikolar> Well on artix at least
<heat> nikolar uses artix, btw
<Ermine> ideally it should build when module gets installed
youcai has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
<nikolar> Well I wasn't going to say it but then I realized systemd might have something to do with it
<sortie> I'm not even sure how to uninstall virtualbox lol
<nikolar> Exactly Ermine
<heat> this has nothing to do with systemd
<Ermine> apt-get purge virtualbox or something
<sortie> heat: Yeah this is def an issue on my end
<sortie> I installed it without apt it seems
<heat> ew
<Ermine> how
<Ermine> why
<Ermine> wtf
<GeDaMo> Probably make install :P
<sortie> Because it didn't work via debian's repos
<heat> DEBIAN IS REALLY GOOD
<sortie> No I downloaded it via virtualbox official
<heat> I SWEAR IT'S SO STABLE
<sortie> heat: In debian's defense virtualbox is insane
<heat> in virtualbox's defense it works fine on most distros
<Ermine> it's still insane
<sortie> Well they don't package it for debian testing
<nikolar> Insane how sortie
<heat> why do you have fucking debian testing
<heat> dude???
<Ermine> I'm apparently having a case of broken networking in alpine guest
mavhq has quit [Ping timeout: 252 seconds]
<sortie> heat: Hey relax what's wrong -- debian testing is great.
<Ermine> heat: to catch the next xz-level thing probably
<heat> ah yes, dogfooding yourself xz
<sortie> heat: Seriously, I've been having a great time, it's stable, I get modern up to date software
<sortie> xz was regrettable tho
<heat> it's stable except where it isn't
<heat> if you want modern up to date software, use something else
<heat> fedora
<sortie> heat: No you're thinking debian unstable.
<sortie> debian testing is not debian unstable
<nikolar> sortie: maybe you should investigate why it takes so long to boot, maybe we have another xz on our hands :P
<sortie> It's where they merge stuff to make the next stable release, essentially the master branch, after things have proven stable
<Ermine> otoh installing software from random internet places is not going to work great on linux
<heat> i mean you literally just said virtualbox (large virtualization software that's widely used) doesn't work on debian testing
<sortie> Which is super weird, heat, and I bet it reflects poorly on oracle
<nikolar> sortie: said it's not packaged
<sortie> But I think it's a kernel interface thing
<the_oz> *smirk* isn't that the linux bazaar way?
<Ermine> just in case, virtualbox is not a production-grade virtualization software
<sortie> I use all qemu these days anyway
<Ermine> it's ok for home usage, because it's relatively easy to use
<heat> not sure what you mean with "production grade"
<nikolar> You wouldn't find virtualbox in a data center handling VPSs
<Ermine> For Serious Business I'd go with qemu/kvm. Or VMWare stuff. Or Hyper-V
<zid`> hyper-v is not serious dw
<heat> not every serious piece of software needs to be in a data center handling gigascale shit
<heat> @mjg
netbsduser has joined #osdev
<Ermine> that's what i'm saying
<Ermine> it's for home
<Ermine> where's mjg btw
<heat> good q
<heat> qemu is pretty badass though, and i do prefer it
<heat> but vbox tends to just be easier for noobs to use
<sortie> I only have vbox installed so I can test if Sortix works on it
<sortie> And it didn't work sooo
<sortie> vbox that is, no idea about sortix
<Ermine> UI is it's only advantage
<Ermine> 10 yo old me managed to grok it
<GeDaMo> You can probably disable the vbox service with systemctl
<sortie> man this 'systemd-analyze plot' data is instane
<sortie> GeDaMo: Yeah that's what I did. I can't figure out how to uninstall virtualbox
<Ermine> well, it does graphics better than qemu, ngl
<heat> ugh no
<sortie> Wait no this stuff symlinks into /opt/VirtualBox
<Ermine> but that's because virgl (currently) sucks
<heat> does it even have virtio-gpu?
<Ermine> it has its own thing
<Ermine> vboxvideo
<heat> ah, that's the spirit. virtio-gpu, but worse
<Ermine> anyway, DEs run smoothly on vbox with 3d accel on
<Ermine> and they lag on qemu with virtio-vga-gl
<nikolar> heat I am pretty sure vboxvideo is just a framebuffer lol
<Ermine> btw, vbox vendors mesa for some reason
<heat> based and googlepileld
<heat> googlepilled
<nikolar> Lol googlepiled
<Ermine> did I mention it earlier?
<heat> probably
<Ermine> fun fact, they don't tag releases in their public tree
<nikolar> Lel
<heat> buddy they use svn
<heat> we know they're insane
<nikolar> Kek
<sortie> sudo find / -mount -path /opt/VirtualBox -prune -o -type l -exec sh -c 'realpath "$0" | grep -q /opt/VirtualBox' '{}' ';' -print ← My neat way of finding all the ways it has integrated itself into my root filesystem, finding all the symlinks into /opt/VirtualBox in the root filesystem
<Ermine> oracle engineering ethos
<sortie> Hey I do appreciate that it's all contained in /opt
Left_Turn has joined #osdev
X-Scale has quit [Quit: Client closed]
Turn_Left has quit [Ping timeout: 244 seconds]
X-Scale has joined #osdev
sortie has quit [Quit: Leaving]
<nikolar> except for the symlinks
Left_Turn has quit [Ping timeout: 245 seconds]
raphaelsc has joined #osdev
Left_Turn has joined #osdev
sortie has joined #osdev
<heat> sortie, welcome.
<sortie> heat: I can show you my systemd-analyze plot svg but you're going to be mean and yell at me instead of helping nicely I fear
<heat> show me tha money
<heat> (fwiw i usually look at it without the svg)
<heat> systemd-analyze blame is far more interesting
<sortie> The svg was the only command that I saw that made sense of it, with all of the concurrency going on
<sortie> So I could see what blocked what
<sortie> heat: https://sortie.sortix.org/for/osdev/bootup.svg ← You promised to be nice plz. I want to stress that I don't actually know what most of this stuff is (I have surprising gaps in my Linux knowledge, as you know) and I only have very basic systemd command and format skills and I'm not that interested in actually golfing this besides solving maybe a bottleneck or two
<sortie> But systemd-tmpfiles-setup.service blocking the boot for 23 seconds seems insane to me
<sortie> Not to mention the 3 second gap between systemd starting and the first init.scope unit starting?
<heat> oh eww systemd-journal-flush.service
<heat> 10 whole seconds
<sortie> Why does systemd-journal-flush take 10 seconds?? What is that and why is it that expensive, logs should be cheap imo
<nikolar> systemd-tmpfiles-setup.service is setting up various directories that are configured in /etc/tmpfiles.d/
<nikolar> so maybe take a look there
<nikolar> there was one more place where the configs live
<nikolar> i fogrog
<heat> run journalctl --disk-usage
<heat> ok, to be clear, this is a mechanical hard drive, right?
<sortie> Yeah
<sortie> Still inexcusable
<nikolar> right /usr/lib/tmpfiles.d/ according to arch wiki
<sortie> heat: Archived and active journals take up 149.1M in the file system.
<heat> 50s for a full mechanical boot is completely normal
karenw has joined #osdev
<sortie> heat: no fucking way
<nikolar> i am pretty i booted faster without systemd while i was still on hdd
<sortie> heat: It waits 50 seconds before starting lightdm. Why the hell does it depend on all this stuff? Whatever it is
<heat> SATA can do 500MB/s max (you're not reaching that with a mechanical drive) and you already have to seek all over the place
<sortie> It even seems to wait for the network to come op
<heat> yeah graphical.target probably depends on network.target
<nikolar> why would it, that's silly
<sortie> multi-user definitely does cus I added a manual daemon of mine that depends on network
<heat> i don't think it's silly, it's common to need networking
<heat> or want
<sortie> My point is that the login screen does not need networking (for local use) or cups or avahi or whatever
<nikolar> that can be set up after i've logged in
<nikolar> yeah what sortie said
<sortie> My sortix init config is like this systemd config literally flipped
<heat> hah wait is /tmp ext4 in your end?
<nikolar> flipped?
<sortie> Oh yeah I disabled the /tmp tmpfs because I only have 8 GB memory
<sortie> I'd rather have it go to disk so I have more space there
<heat> bruh
<nikolar> what
<heat> enable /tmp tmpfs
<heat> tmpfs swaps to disk, you don't need to worry about it
<nikolar> why
<sortie> You're not listening to me
<sortie> Also I don't have swap
<sortie> Because that is terrible
<heat> get swap
<nikolar> swap is good actually
<nikolar> trust me, i am also on 8gb ram
<sortie> Like, heat, you promised to be nice
<heat> also fwiw 2.6M /tmp/
<sortie> I often put gigabytes of stuff in there
<nikolar> my /tmp is a tiny bit bigger
<sortie> I do need a big /tmp and that's my need
Dead_Bush_Sanpai has quit [Read error: Connection reset by peer]
<sortie> And swap makes Linux absolutely terrible for me, it makes the performance super unstable when it swaps stuff out and then has huge random latencies
Dead_Bush_Sanpai has joined #osdev
<nikolar> really
<nikolar> i mean without swap, my system would just lock up
<sortie> Like coming back after not using my computer for a couple of hours, and the login screen takes like 2 minutes to swap in. I have no idea what's going on and it's terrible
<nikolar> so i'll take the unstable latency
<sortie> Oh I definitely get the lock ups too and it's terrible. But at least there I can alt sysreq f to OOM kill and that restores service and is a lot quicker
<heat> sounds like a swappiness problem
<sortie> Like it's absolutely terrible and Torvalds et al needs to be brought before the Hague but I've carefully chosen the load bearing broken solutions here that give me some level of usability
<nikolar> i mean swap made my system usable
<nikolar> like there's no way i could have uptime of over a week or whatever without it
<sortie> I'm happy to hear that. With a mechanical drive it doesn't work well for me
<nikolar> ah i guess that's a factor too
<Ermine> sortie: use --vacuum-size to reduce
<Ermine> logs max size
<Ermine> or something like this
<sortie> Ermine: I do that all the time. I even have a cron job. Because systemd logs grows insanely
<Ermine> .... or you need to set max size in /etc/systemd/journald.conf
<heat> your fun boot screen takes 1s to show up
<sortie> heat: But like, you see these graphs like this, and imagine me that can make Sortix boot subsecond without all of this bullshit, and you like get where I'm coming from? Like all of this Linux complexity is just a _lot_ to understand and I really just wanna use my Linux machine without thinking too much. This machine is definitely low end, but it is powerful enough to actually do stuff, if only the OS used resources well
<Ermine> I remember having the same issue on hdd, and I've overcame it with log size limits
<heat> sortie, well you need to understand linux does a lot more things than sortix
<heat> like, i got a nice 5-10s boot slowdown from using openrc vs my shitty init
<sortie> heat: I get that but even accounting for this extra stuff Linux needs this seems really excessive compared to the numbers I get on Sortix
<nikolar> does your shitty init just do `service1 & service2 & service4 & exec login`
<sortie> heat: Although my question here is like, what is all of that extra stuff?
<sortie> Like I am mildly curious
<bslsk05> ​gist.github.com: systemd.svg · GitHub
<Ermine> the kernel itself boots relatively fast
<Ermine> the rest is userspace
<nikolar> kernel takes over 4s?
<sortie> heat: Yeah that's a lot faster
<nikolar> that sounds like a lot
sortie has left #osdev [Leaving]
<Ermine> heat: do you use strongswan?
sortie has joined #osdev
<sortie> ^W
<sortie> nickster: idk I have /usr/lib/tmpfiles.d full of distro stuff but unclear why it's that slow
<nikolar> you mean nikolar?
<sortie> Oh sorry bad complete
<heat> sortie, sets up sockets and socket activation, waits for devices to come up, mounts devices, sets up sysctl, loads modules, does chorework, brings up daemons
<heat> all of this needs to read small little files all over your drive (which particularly sucks in the mechanical drive's case)
<heat> in tmpfiles's case, it needs to write them too!
<sortie> heat: I kinda do that too, you know?
<zid`> ur mum is a tmpfile
<sortie> I have per daemon config files and daemon readiness with dependencies too
<heat> not in the same scale
<Ermine> and those bruhs dropped readahead...
<heat> Ermine, yeah
<Ermine> bruh
<heat> last time i tried to add a VPN to networkmanager i created a routing loop and flooded my dmesg
<sortie> heat: But like I said in the original message, my secret sauce is that login does not need anything else, it just spawns it in the background. So I can speedrun to the login screen.
<nikolar> heat: lol how
<sortie> So what's interesting here is what complex things my Linux distro thinks the login screen needs
<netbsduser> systemd does a lot of things that are frankly there to make legacy software work under its supervision
<heat> nikolar, wouldn't know
<netbsduser> like the heuristics to guess a Type=forking service's main PID
<sortie> I solve that by not allowing it in Sortix :)
<nikolar> i don't think that's blowing up teh boot time netbsduser
<netbsduser> one great thing about osdev: since you are porting everything anyway you can make sure your daemons don't try to escape supervision
<sortie> Well said
<netbsduser> nikolar: it's not, but a good remark to add i think
<Ermine> that's where daemontools school of thought said "fix your daemons"
<nikolar> sure
<heat> sortie, your vm isn't real hardware, you don't do things at the same scale as a linux distro
<nikolar> that's we need --dont-daemonize lol
<netbsduser> and the complexity and subtlety of the kinds of edges you can have in the systemd service graph are doing the same
<sortie> heat: I do use Sortix on actual real hardware on my laptop where I get these numbers. But I suppose that if my /tmp is full of junk, yes, it will take some time to unlink that on the next boot
<sortie> Even on Sortix
<Ermine> heat: just in case, sortix boots on my thinkpad, linux does, nothing else does
<heat> for instance some people think it's desirable to run SMART tests on drives. so they do that (systemd does not by default, i believe)
<netbsduser> here systemd-tmpfiles-setup has caused an enormous delay, for whatever reason, and dev-sda5.device also took a little while
<heat> it also turns out that if you mindlessly parallelize shit, you slow up the whole boot for ancient drives
<heat> windows is UNBEARABLE because of it
<sortie> There also seems to be a e2scrub_reap thing taking a long time to do some sort of sda5 fsck?
Turn_Left has joined #osdev
<sortie> sda5 is root (ext4)
<Ermine> heat: opensuse has smartd enabled (by default apparently), and arch doesn't
<sortie> heat: I still have a feeling that even if Sortix got to the same scale as Linux distros, it wouldn't be this bad
<netbsduser> Ermine: concerning this (don't daemonise) the Bernsteinites were right
<nikolar> why is it doing an fsck on a normal boot
<nikolar> who are those netbsduser
<netbsduser> it's important for any sane service supervisor that the service don't daemonise itself
<nikolar> yeah i agree
<netbsduser> nikolar: followers of the american cryptologist and controversialist d.j. bernstein
<nikolar> no clue lol
<netbsduser> he invented a suite called the daemontools
<netbsduser> and his distinctive philosophy and style are ancestral to numerous daemontools derivatives: runit, monit, s6, etc
<heat> sortie, you severely underestimate the problem of starting services
<heat> this is not a solved problem
Left_Turn has quit [Ping timeout: 260 seconds]
<heat> nikolar, it's a quick fsck, no -f
<nikolar> yeah but still
<heat> and it's quite normal
<heat> on normal linux systems linux does not do journal replaying, fsck.ext4 (or .xfs or whatever) does it
<nikolar> ah really
<nikolar> didn't know
<heat> it *can* do it, but fsck normally gives mount(2) a clean fs
<Ermine> fsck(1)*
<heat> found the bsd user
<nikolar> oh bernstein designed the salsa20 and chacha20
<nikolar> ok cool
<netbsduser> he is responsible for a great deal of things
karenw has quit [Ping timeout: 265 seconds]
<nikolar> yeah didn't realise how some random things are made by the same guy lol
<netbsduser> very well-known character and not always someone that many forums allow to discuss, for fear of the controversy
<heat> wait, he's controversial?
<heat> don't tell me he's the ESR of crypto
Left_Turn has joined #osdev
<Ermine> doesn't seem like so
Turn_Left has quit [Ping timeout: 260 seconds]
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 265 seconds]
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 265 seconds]
edr has joined #osdev
<sortie> <heat> sortie, you severely underestimate the problem of starting services
<sortie> <heat> this is not a solved problem
<sortie> Really? That feels slightly surprising to me. What parts are not solved yet?
<sortie> I feel like my solution gets a lot of the way although my config format needs to be more powerful to express all the things I want to
<heat> the fact systemd exists and is controversial and gets updates regularly and new features?
<nikolar> i mean i don't think systemd-boot is critical to service management but ok
<heat> i can't tell you what parts aren't solved, i can tell you there are plenty of parts that aren't solved, and plenty of "fun" discourse around it
<heat> nikolar, if you could only run systemd's pid1 and nothing else, would you?
<nikolar> no?
<heat> there you go
<nikolar> what i meant is, the fact that systemd is getting regular updates means almost nothing
<heat> fwiw i meant and mean systemd as in pid1 here
<nikolar> wrt how solved service supervision is
<sortie> heat: I admit I'm having a lot of fun in this problem space with Sortix init. I definitely copy the best concepts of systemd but I'm free to innovate with my own concepts and features and kernel abilities. I like to think of it as healthy competition to show what could be done if things were done very differently
<sortie> Like, you know, best case: Nobody actually uses Sortix, but people see it's subsecond boot time, and people go "I want Linux to be that good too" and they put in the work
<nikolar> lol, i like your optimism
<sortie> I mean does anyone here think they're actually coming up with the new best thing?
<sortie> At best we're like art, we inspire the world to think it could be different
<nikolar> what i meant is that you think people will actually try to get sub 1s boot on linux
<nikolar> that's not happening any time sson
X-Scale has quit [Quit: Client closed]
<sortie> I'll be running around the Linux people in circles with my boot time :D
<heat> you can get sub 1s boot on linux
<nikolar> heat: i meant with systemd
<sortie> Granted I'm not there atm out of the box, I have some refactoring to do, and some driver parallel initialization stabilization to do
<heat> not with systemd, nor openrc
<sortie> But I have done boots in like 330 ms
<heat> like driver parallel init is completely broken in _many_ cases
<nikolar> exactly heat
<heat> which is why linux has it opt-in per-driver
<nikolar> unless you're in embedded, i don't think you can get sub 1s boots
<heat> true
<sortie> But yeah honestly 1 s boot is unreasonable
<sortie> Nobody should wait more than 333 ms
<zid`> at 330ms my kernel is freeing initmem
<heat> like, if nobody can pull this off, i'd wager it's practically impossible
<nikolar> and even then, your init is `somekindofnetworkmanager & sshd & payload & exec login`
<heat> modern windows on a hard drive takes an hour to boot.
<sortie> heat: I mean I managed to get to a Sortix graphical terminal in 330 ms after the kernel started the timer interrupt (basically immediately)
<sortie> On a harddisk installations
* Ermine scratches out systemd on his osdev bingo card
<nikolar> Ermine: you only end up scratching out systemd recently
<Ermine> #osdev innit
<heat> ermine's a little late yeah
<heat> anyway how about we rewrite openbsd in rust
<heat> the only bit in C will be musl's malloc
<sortie> heat: I'm in.
<sortie> openrustbsd
<Ermine> openbsd is rusty enough
<sortie> heat: btw I'm not sure that you've noticed, but I have used openbsd, and did you know it's kinda weird?
<heat> i have also unfortunately used openbsd
<sortie> Like all of the BSD legacy cruft sure is a flavor
<Ermine> you ask me like I care about openbsd
<heat> one of the experiences of ever
<sortie> Also what the fuck is going on with bsd partitioning
<sortie> Partition c like covers the whole disk? Like what. Is this C:\
<nikolar> lol you mean disklabel?
<sortie> Yep
<nikolar> i am pretty sure that's carried over from like vaxen
<heat> that's why i'm antivax
<nikolar> wait no, probably even from pdp-11
<nikolar> i think
<nikolar> i forgor
<Ermine> 💀
hwpplayer1 has joined #osdev
X-Scale has joined #osdev
X-Scale has quit [Client Quit]
<vai> just got coronavirus and influenza vac
<sortie> I lost track of what coronavirus version I'm on after it switched to the chrome versioning scheme
<ramenu> lmao
<zid`> I thought they were using car licence plate schemes, but with greek instead of latin
<sortie> coronavirus basically switched to a github model where everyone forked the repo and most of them are discontinued and who knows what random covid19 repo you pulled
<zid`> KP 3.1.1 for workgroups
<zid`> seems the most common
Dead_Bush_Sanpai has quit [Quit: Dead_Bush_Sanpai]
spareproject has quit [Remote host closed the connection]
levitating has quit [Ping timeout: 252 seconds]
levitating has joined #osdev
<Ermine> in US you run away from the vaccine (if you're antivaxxer)
<Ermine> in Soviet Russia, vaccine runs away from you!
<nikolapdp> oi
<Ermine> (real story, sadly)
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 265 seconds]
<Ermine> time to learn global offset table
steelswords94 has quit [Read error: Connection reset by peer]
<nikolar> what are you working on
steelswords94 has joined #osdev
mavhq has joined #osdev
<zid`> nikolapdp: chair
<nikolapdp> how's that going zid
<zid`> what
<zid`> I am not working, I was talking about ermine
<zid`> working is for people who oh a squirrel
<nikolapdp> lol
mavhq has quit [Read error: Connection reset by peer]
<Ermine> nikolapdp: apparently on how to write position independent assembly
mavhq has joined #osdev
<nikolapdp> lol and why
<Ermine> vbox, textrels
<zid`> wrt ..plt
<zid`> nasm has the best syntax
<zid`> why does it need two dots? nobody knows
<Ermine> they use yasm
<zid`> yasm is just an old fork from nasm that is now dead, because nasm is back alive
<Ermine> go tell 'em
<Ermine> also yasm doesn't seem dead
<nikolar> it's not from what i can tel
<zid`> last commit 4 months ago, something minor, and probably a few projects are 'locked in' to it
<nikolar> *tell
<zid`> so it'll get updates
<zid`> but it's lost its spot as the defacto, which proper active dev happens on
<Ermine> okay pace for an assembler
<zid`> omg nasm previous previous update: Add support for Flexible Return and Exception Delivery (FRED): the LKGS, ERETS and ERETU instructions.
<zid`> woo
<zid`> peter anvin > whoever runs yasm
<zid`> the commit message is funny
<zid`> Kind of embarrassing... I had not implemented the FRED instruction,
<zid`> despite personally being one of the architects of FRED ;)
Matt|home has quit [Quit: Matt|home]
<nikolapdp> lel
spareproject has joined #osdev
X-Scale has joined #osdev
hwpplayer1 has quit [Remote host closed the connection]
hwpplayer1 has joined #osdev
kfv has quit [Ping timeout: 252 seconds]
hwpplayer1 has quit [Remote host closed the connection]
<sortie> heat: Compiling node.js natively ... configured succeeded out of the box (it's actually python) and make is compiling a lot of objects too (fails because I don't have the -pthread option, forgot to add it into my spec, so removed it from the Makefile), with a bunch of failures
<sortie> Some sort of python gypness has converted it to Makefile
<sortie> Oh and it also failed because I never bothered to do /bin/printf since dash does it
netbsduser has quit [Ping timeout: 265 seconds]
hwpplayer1 has joined #osdev
<nikolar> Lol
xenos1984 has quit [Ping timeout: 248 seconds]
hwpplayer1 has quit [Read error: Connection reset by peer]
xenos1984 has joined #osdev
frkazoid333 has joined #osdev
netbsduser has joined #osdev
<heat> sortie, oh cool, how about v8? i assume it's part of the node build?
voidah has joined #osdev
<sortie> heat: It seems to be building all sorts of stuff. it just began on openssl too. Oh god what are they bundling here
<sortie> It appears to have done a G-style combined build graph of everything
<heat> lol
<sortie> Right now doing -k to see how much I get through. This thing is massive I gotta say. It _is_ building a lot of object files. A lot of issues too. e.g. that openssl hasn't been ported
steelswords94 has quit [Read error: Connection reset by peer]
<sortie> libicu also had a bunch of c++ issues too. std::mutex somehow isn't there.
steelswords94 has joined #osdev
<heat> OH
<heat> sortie do gcc -v | grep Thread model
<sortie> Thread model: posix
<heat> oh weird
<sortie> I think it
<sortie> 's libstdc++ misdetecting features
<sortie> libstdc++ has been a real asshole about threading all along
<heat> i mean you probably have it
<heat> try a test program?
<sortie> I'm pretty sure I lack some libstdc++ features like that
<sortie> oh hey it got to v8_libbase
<sortie> heat: might libstdc++ react to the presence of -pthread?
<sortie> A option that I don't have
<heat> hmm i don't think so
<heat> i remember that libstdc++ when thread model: single (not the case) has fallbacks on locks that just abort
<heat> but this is a posix thread model so i assume it's all good
<sortie> heat: Building node.js is a warning to y'all rather than a joke. I mean, I don't plan on this port actually going through, at least I don't care enough to actually fix all of these issues and port it cleanly. I just wanted to know if there was any impossible obstacles and how difficult it would be. But I really do have a plan to have a _lot_ of programming languages on Sortix so it's a really good development platform
<sortie> It looks like node.js can totally be cleanly bootstrapped. go can be done too, by going through go 1.4. rust seems like bootstrap hell though, so probably not.
<sortie> Looks like 2190 object files got made before the node.js build failed -k
<nikolar> Yeah go can probably be a two step bootstrap
<heat> gccgo
<nikolar> What go version does it support
<sortie> heat: Official go is actually built to support bootstrapping from go 1.4. gccgo is deprecated IIRC
<heat> :U
<heat> :((
marcopolo2 has joined #osdev
Dead_Bush_Sanpai has joined #osdev
youcai has joined #osdev
<sortie> heat: I'll stop here because node.js is not a rabbit hole that I want to go down, but I actually managed to hackily get it to a number of compile errors in dependencies that I think I can solve. The actual v8 parts actually went through it seems.
<nikolar> Is gccgo deprecated?
<heat> huh v8 Just Compiled?
<sortie> The issues were basically Sortix libc / libstdc++ / missing sortix syscall features / dependencies related. It looks like I can implement, fix, or work around the stuff I see.
<sortie> heat: Well it didn't link but I sure got the .o files
<nikolar> No where can I find anyone mentioning that gccgo is deprecated
<sortie> That may just be me being wrong then
<nikolar> Go proper even has some guides on contributing to gccgo
<sortie> I did say IIRC
<sortie> I just had the bit set on gccgo for some reason not to bother with it
<nikolar> Lol
<nikolar> Make up your own reasons to not care, nice
<heat> wonder if it just defaults to linux
<sortie> nikolar: I mean I did research this months back so I only remember conclusions not all of the data. It was probably something like a fear that gccgo wouldn't stay up to date with language features, or that it didn't come from the K&R region of France
<nikolar> Yeah "wouldn't stay up to date with language features" is a valid reason
<nikolar> No clue how true it is but still
<sortie> heat: I actually expect you might get further than me with gccgo out of the box. Your libc/libstdc++/toolchain stuff probably has its stuff way more together out of the box than me
<heat> yeah maybe but i haven't found much needing go
<heat> the only thing i found was... syzkaller?
<sortie> Yeah I also didn't need node.js
<sortie> But you know, nerd points
<nikolar> node.js is negative nerd points
<sortie> Plus if you can say that your OS has all the cool languages, people will be like "huh. I guess this OS is more advanced than I thought"
<sortie> nikolar: No no you're seeing it wrong. The *ability to have* node.js is positive nerd points.
<heat> nodejs is definitely cool
<sortie> I don't recall any osdever with nodejs
<sortie> heat: Race you to it?
<GeDaMo> "Let's not use this JS implementation, let's use the other one" :P
<sortie> You even have a openssl so you have a headstart over me
<nikolar> I mean I wouldn't bother porting node personally, no matter how complete the system is
<nikolar> sortie: isn't it vendored in node
<sortie> nikolar: Yep and it does not compile because I don't bother with it and I upstreamed my portability fixes to libressl
<sortie> But heat has openssl compiling
<nikolar> Heh nice
<Ermine> nodejs is defo cool --- me before doing webdev
<sortie> heat believes in things like <sys/param.h>
<heat> amen
<nikolar> Just wait until they vendor the newer version then
<nikolar> Problem solved
<sortie> nikolar: I mean my solution is just to disable the bundling and see if it accepts libressl
<sortie> That was also decided to not be fun so I decided to stop here
<Ermine> nodejs is defo shit --- me after leftpad
<nikolar> Lol
<heat> talking about libressl while shitting on node? i feel like yall are baiting me
<sortie> It's 19:30 and it's dark outside and I feel like it's midnight can y'all wake me in april
<heat> northern european moment
<heat> we still have sunlight here
xenos1984 has quit [Ping timeout: 248 seconds]
Gooberpatrol_66 has quit [Quit: Konversation terminated!]
Gooberpatrol_66 has joined #osdev
<sortie> WEST much
<nikolar> Lol
<sortie> heat: You say you're WEST but you're UTC+1 how do you explain that sir this is a hearing
<nikolar> No sunlight here either
<Ermine> how to get residency in portugal
<nikolar> Does Portugal do summer time
gog has joined #osdev
<Ermine> (j/k)
<sortie> nikolar: The EU does (at this time)
<nikolar> Does it
<nortti> aiui time zones are left up to states to decide (hence why the absolute chaos following the suggestion of abolishing it), but EU does seem somehow involved DST specifically since the call to abolish that was EU-level
<sortie> I still need to read up on that mess
<heat> wait they're abolishing DST?
<heat> that'd be so fucking cool
<sortie> Everything agrees that abolishing it would be fucking cool but nobody agrees whether it should then be permanent or return to normal time
<Ermine> we have winter time always
<heat> wait, no, i like DST
<heat> permanent DST
<heat> SUNLIGHT
<sortie> PERMANENT DST SUNLIGHT FOR WORKERS
<sortie> heat: You see? If we lose to normal time we might be fucked
<sortie> For once heat and sortie set their differences aside
voidah has quit [Ping timeout: 255 seconds]
xenos1984 has joined #osdev
steelswords94 has quit [Read error: Connection reset by peer]
steelswords94 has joined #osdev
<sortie> +#define LIB_SPEC "--start-group %{pthread:} -lm -lc --end-group"
<sortie> ^ Odd. I do have this in my LIB_SPEC but the -pthread option still isn't there in my gcc.
<GeDaMo> Could there be a missing dependency?
<heat> no
<heat> sortie, there's a pthread gcc driver you need
<heat> see my gcc patch
<sortie> heat: Wait it's that onyx.opt file?
<sortie> I ignored it, it looked like documentation
<heat> yes
<zid`> .opt = owerpoint
<heat> sortie, actually you can even get away with adding gnu-user.opt to your config.gcc extra_options
<heat> i should move to that
<sortie> Oh I also need extra_options I see
voidah has joined #osdev
hwpplayer1 has joined #osdev
X-Scale has quit [Quit: Client closed]
levitating_ has joined #osdev
levitating has quit [Ping timeout: 248 seconds]
hwpplayer1 has quit [Read error: Connection reset by peer]
voidah has quit [Quit: Leaving]
spareproject has quit [Remote host closed the connection]
lte678 has joined #osdev
hwpplayer1 has joined #osdev
_ngn has joined #osdev
<_ngn> is it possible to write to an ATAPI device using AHCI, or is it not supported? every single implementation I see, only implements the read functionality, write is either not implemented or its completely ignored, i tried implementing it myself but i get a transfer error after issuing the command (PxTFD STS ERR)
<heat> yes, it's supported
Gooberpatrol66 has joined #osdev
Gooberpatrol_66 has quit [Ping timeout: 276 seconds]
elderK has joined #osdev
<_ngn> ok thank you, i also have another question, it seems like qemu attachs an empty cdrom to the controller, i can't run any commands on this device, so is there a way to differentiate this device from the other devices?
<zid`> throw a status command at it?
levitating_ has quit [Ping timeout: 272 seconds]
<_ngn> what are you referring to?
<_ngn> there is no status command in PxCMD
<zid`> scsi has several, ahci must be shit
<_ngn> well in other to send scsi commands i need to setup the port
<_ngn> and if i setup the port i might as well send any command and see if it fails or not
<_ngn> in order*
<zid`> set up* :P
<_ngn> whats the difference
<_ngn> "setup" vs "set up"?
<zid`> setup is the noun
<zid`> "My setup is really cool"
<zid`> vs "My friends set me up"
<Ermine> heat: you larp linux vma's, don't you?
<_ngn> zid`: oh ok i see thank you
marcopolo2 has quit [Quit: Connection closed for inactivity]
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
levitating_ has joined #osdev
_ngn has quit [Remote host closed the connection]
_ngn has joined #osdev
<heat> Ermine, a little, why?
<Ermine> well, nvmd then
<heat> why
<heat> if you have any particular question about linux vmas i can probably answer it
gog is now known as pog
<heat> pog
<pog> pog
levitating__ has joined #osdev
levitating_ has quit [Ping timeout: 265 seconds]
hwpplayer1 has quit [Remote host closed the connection]
levitating__ is now known as levitating
levitating_ has joined #osdev
levitating has quit [Ping timeout: 252 seconds]
<sortie> sup
tdbio is now known as deglebe
<nikolar> oi
lte678 has quit [Quit: WeeChat 4.4.2]
<heat> yo nikolar
<nikolapdp> oi heat
<heat> i have a dilemma for you: openrc written in rust or systemd written in C + shell scripts
<nikolapdp> no
<heat> would you switch to windows?
<nikolapdp> lol why would i
<pog> wadnows
<heat> oh shit better dilemma
<heat> systemd or openrc but the only script interpreter you have is /bin/fish
<nikolapdp> heat just tell us that you're bored
<heat> i am bored, why would i be shitposting on irc otherwise?
<nikolapdp> yeah that's what i saif
<nikolapdp> *said
<heat> in any case if i had to use fish as a script interpreter i would give up on computing instead
<nikolapdp> lol
levitating_ has quit [Ping timeout: 272 seconds]
levitating has joined #osdev
<sortie> LINK(target)
<sortie> /src/node-v20.17.0/out/Release/node_js2c
<sortie> heat: I did it.
<sortie> I friggin linked one of those node.js programs
mavhq has quit [Ping timeout: 255 seconds]
<netbsduser> openrc without shell scripts is quite unimaginable
<sortie> heat: wait isn't systemd already in C?
<zid`> I'm still reeling
<heat> sortie, yes
<zid`> openrc in ruby vs systemd in C is just such a creepy question heat
<zid`> I hate you
<heat> i hate you too budy
<heat> buddy
<sortie> Is it hate week already?
<zid`> My hatred is not weak
<zid`> take that back
levitating has quit [Remote host closed the connection]
levitating has joined #osdev
levitating has quit [Remote host closed the connection]
<Ermine> oh wow, vmas have ops
<Ermine> GEM uses those actually
<heat> yes
<heat> the only vmas without ops are anonymous vmas
<kof673> nikolapdp, djb had some critical bit tree example code too, but i ended up using a modified version and then modifying it more
<kof673> there used to be a distro or two that used daemontools and /service and whatever other filesystem layout but i never went that far :D
<kof673> imagine daemontools, musl or something static linking, suckless ..........someone could make the ultimate minimalist distro......... this is not a troll, just saying :D
<Ermine> so theoretically those vmas can correspond to stuff outside of system memory?
<heat> sorry i only use BLOATED software
<heat> Ermine, not theoretically, definitely
<nikolapdp> like onyx?
<nikolapdp> gottem
<heat> like
<heat> normal vmas map pages (struct page, struct folio, whatever you want to call them)
<heat> those are real pages, in DRAM
<heat> what GEM probably uses is PFNMAP or MIXED PFN map (i dont quite recall the difference)
<heat> this maps "stuff", no struct folio or struct page are associated with any of the PTEs
<heat> this also means shit like get_user_pages on GEM regions will not work
hwpplayer1 has joined #osdev
hwpplayer1 has quit [Remote host closed the connection]
<kof673> djb has some cdb constant database library too, i might look at...should be easy to run nearly anywhere, just not sure i need it for anything. his site has lots of little programs and libraries
<kof673> or lots of things that only need c + maybe posix
netbsduser has quit [Ping timeout: 252 seconds]
<kof673> +scc or nwcc or tcc or pcc or even tendra for the compiler lol not advocating this, but if you wanted slim and c99 or so only
mavhq has joined #osdev
rlittl01 has joined #osdev
elderK has quit [Quit: WeeChat 4.4.2]
Yoofie646 has quit [Read error: Connection reset by peer]
<sortie> node.js got to the point where the build overflowed the stack so I had to recompile a make with a larger stack lol cus mine doesn't grow dynamically
<heat> how large are your stacks?
<sortie> 512 KiB I think
Turn_Left has quit [Read error: Connection reset by peer]
netbsduser has joined #osdev
<sortie> Good news is that node.js seems to like static linking
X-Scale has joined #osdev
gildasio has quit [Ping timeout: 260 seconds]
gildasio has joined #osdev
_ngn has quit [Quit: WeeChat 4.4.2]
<Ermine> yeah, there's vm_flags_set(VM_PFNMAP | ...) all over the place
<Ermine> what does PFN mean?
<netbsduser> page frame number
<Ermine> thank you
<bslsk05> ​docs.kernel.org: Shared Memory Filesystem — The Linux Kernel documentation
rlittl01 has quit [Ping timeout: 246 seconds]
rlitt01 has joined #osdev
heat has quit [Read error: Connection reset by peer]
heat has joined #osdev