Turn_Left has quit [Read error: Connection reset by peer]
gcoakes has joined #osdev
<heat>
wow stat is spammed a whole lot in a ./configure
<heat>
maybe that mjg guy knows what he's on about
<heat>
lots of stat, access and, strangely, readlink?
<gog>
linkma
<heat>
linkmaballz
<gog>
sksksksksks
navi has quit [Ping timeout: 245 seconds]
<Mutabah>
heat: configure scripts tend to do a lot of "does this file exist", so that makes some sense
<Mutabah>
and I guess there's also checks of "is this a symlink somewhere, and if so where" - probably to get the real filename (version) of shared libraries?
<heat>
yeah and gcc/ld do their fair share of spamming
<heat>
readlink was most surprising though, don't really get why
<Mutabah>
gcc might use it for `#pragma once`
<nikolar>
For a start, a bunch of dynamic libraries are symlinks to the actual file
<nikolar>
For whatever reason
<heat>
in any case i have a couple thousand of refup/refdown trace events to go through :)
<Mutabah>
and maybe `realpath` uses it
<heat>
hmm yes, realpath might
gog has quit [Quit: byee]
<vin>
heat: I saw your message now. Had soo many meetings today.. I didn't understand how /proc/pid/clear_refs is used. I know this clears the access bit of all the pages in PTE and basically measure RSS from smaps/pagemaps before and after clearing the bits and see if there is a difference?
<heat>
yes
<vin>
But linux does not proactively swap out memory if there is no memory pressure afaik
<heat>
but you don't need to swap
<heat>
basically if you clear_refs, wait 10s, then inspect pagemap you can know what pages were used in those 10s
<vin>
I mean [kswapd] only [kstaled] (google's kernel) swaps out pages every 120 seconds based on PTE scans
<heat>
or smaps for pure numbers
<vin>
ahah
<heat>
fwiw I think DAMON can also do proactive reclaim, but i've never messed with it
<heat>
and you can also do proactive reclaim with a simple write to a magic cgroup file
<heat>
memory.reclaim I think?
<vin>
interestng, it does not get swapped out but this is a relaible way to track page activity in last N seconds. So a read or /proc/pid/pagemap does a pagetable scan?
<heat>
yes
obrien has quit [Remote host closed the connection]
<kof673>
well autoconf is trying to be ...ad hoc/dynamic/on-the-fly figure things out. if you know the target, then other than options user might set "why are you always configuring? just make!" -- spaceballs quote repurposed by klange
<kof673>
autoconf can cache stuff, but not sure i've seen anyone ever use that feature
<vin>
I was trying to reclaim memory for a particular process (workload of 5 GB but only ~1 GiB is active). So I put it in a cgroup with limit_in_bytes set to 1 GiB (surprised that this is not a hard limit). set my vm.swapiness to 100 and created a simple program to induce memory pressure (mmap populate a large file). I see kswapd kicking in and filling my swap area (of 6GiB) but process of interest still
<vin>
has the same RSS (of 5 GIB)
<vin>
Wouldn't "Referenced" always be equal to "RSS" in /proc/pid/smaps because proc/pid/clear_refs will never be called on its own. So All resident pages will be accessed atleast once since the start of the application
<heat>
the A bit/referenced is cleared on its own as reclaim is done
<vin>
Correct, so on reclaim the page also is not resident in memory, thus leaving us with RSS == Referenced?
<heat>
no.
<vin>
O.o
<heat>
reclaim is a complex process that involves scanning pages and seeing if they're fit for reclaim
<heat>
e.g if a page is seen with pte.A = 1, the page is promoted in the LRU and *not* reclaimed on
<vin>
When it is *not* reclaimed the pte.A remains 1 right?
<heat>
if a page is seen with PG_referenced but PTE.A = 0, it's cleared and given another trip on the LRU *but not reclaimed*
<heat>
no.
<heat>
A bits are cleared
<vin>
Ahah on every PTE scan the A bits are cleared?? Then all of this makes sense
<heat>
note: MGLRU is a little different, doesn't work *quite* like this, but the A bit clearing is ofc done
<vin>
So is reading /proc/pid/pagemap considered PTE scanning? Thereby clearing all the A bits? Is reading /proc/pid/smaps also considered PTE scanning?
<heat>
no
<heat>
not sure if there's an efficient way to do PTE scanning from userspace, but clear_refs + pagemap /works/
<vin>
I thoguht so. But I still can't understand why rss will be different from referenced. I will read the above slides more carefully
<heat>
not every mapped page is referenced
<vin>
mapped pages that are not touched aren't accounted in RSS anyway
<heat>
omg i think it just became painfully clear how im leaking dentries
<heat>
i forgot to delete negative entries on a rmdir...
<geist>
what an idiot
* geist
shakes head and looks away in disgust
<geist>
does remind me i need to rewrite my vfs around dentries, linux style
<geist>
that just turns out to be too darn good of a solution
qxz2 has joined #osdev
<heat>
if you can help it, dont walk UNIX paths
<heat>
srsly terrible
<geist>
and yeah the ability to quickly walk and stat a file is i think if anything that’s unix’s strength is that
<heat>
i'm glad autoconf scripts test for really weird shit like "is // = /" because that found me a boog
<geist>
and lots of times is the biggest ‘why is windows so slow’ sort of complaint
<geist>
running unix style workloads (shitton of file stats) on a system that’s not tuned for it
<geist>
since windows takes the exact opposite approach: hand the FS a path and tell it to do what it needs to
<geist>
and at the moment my very simple ‘get r dun’ FS layer in LK does too
<guideX>
does it make sense for a program to be split up into pieces sitting on the file system already for you, or is it better for it to be in a singular file
<guideX>
like some kind of archive containing all the code, images, and front end descriptions
<geist>
i think different systems take different approaches, but the current approach most use is to have some sort of directory structure with that broken out
<geist>
makes sense, let the FS do what it already is good at
<geist>
and if you want, you can do what macos x does and treat those directory structures as a single entity in the shell (finder) so that it appears hidden
<heat>
1) are you supposed to easily edit those pieces? 2) are these files (as in file types) or stuff? 3) can/should you share them with other programs?
<guideX>
yeah true, also macos has a sort of thing where you click a, I think a stuff it file? (maybe they changed that), and it like unzips into macos
<guideX>
heat, these files are only for the application, there is no sharing it with other programs
<geist>
i know some of the earlier windows 3.1/95 era stuff was all about stuffing resources inside the .exe itself, so you had all these resource editors and whatnot to set icons and whatnot
<geist>
samewith macos classic, it had the whole resource fork, which you can think of as an extended attribute
<geist>
but in general i think that’s worth more trouble than its’ worth
<heat>
ALTERNATE STREAMS!
<geist>
the upside though is it’s impossible for them to get out of sync
<guideX>
heat, these are the script file (code), an xml file (front end), graphics, and sounds so far
<guideX>
and whatever else I will want for them in the future
<kof673>
nextstep had similar to mac...i have no idea how much they differ, just another instance
<geist>
flip side is it’s generally standard for large games to build their own archive file format and stuff in thousands or millions of pieces of data in giant files
<kof673>
and theoretically with triple or quad "fat"...could stick on nfs and point multiple machines at it
<geist>
and then have a way to update them over time with patches. makes sense considering a large game may otherwise have millions of files
<heat>
yeah but games usually have good raisins
<geist>
and that just gets ridiculous
<guideX>
I really like how mac does it, I think I will do that, it makes a lot of sense
<guideX>
you just see an icon in the right places, like magic
<geist>
kof673: i’m guessing it came from that,m since macos x is basically just nextstep
<kof673>
yeah, i just wasn't meaning to slight os x "simpsons did it!"
<geist>
nah just mean that’s probably where the lineage is from
<geist>
and macos classic had the resource fork
<heat>
oh resource forks really are kinda like xattrs
<geist>
now adays i think the overhead of having a ton of separate files is fairly negligable to trying to pack it all into a single file
<heat>
i was assuming it was something like NTFS alternate streams
<heat>
which is a fun idea but has no defined structure
<guideX>
if I pack it into a zip or something, I have to break it out into individual files again (it's slower)
<geist>
heat: exactly. well, i think it was more like an alternate stream, notsure you could have more than one
<geist>
though macos modern also leans on xattrs a lot
<geist>
some of that is the beOS inheritance since a few beos folks went over there and made major directional input since macos 10.0
<geist>
guideX: yeah that tends to net fairly bad ability to cache, since the data that sits in ram doesn’t match up to a file
<geist>
so it doesn’t really let the OS cache the data properly
<geist>
there are things like that on linux with snaps and whatnot, and they get around the problem by loopback mounting an archive
<heat>
linux containers are absolutely insane and do crazy mounts to get around crazy problems
<geist>
so then the kernel is doing the caching, and some user space process is probably unpacking (via fuse, etc)
<geist>
but macos also has that with .dmg files, but they’re usually RO and used for installation
<geist>
but functionally they’re just a RO loopback mounted fs
<geist>
their utility comes in the shell integration so they appear like magic
<heat>
kind of related but the windows explorer zip decompressor is absolutely terrible
<geist>
right, imagine that but actually nicely functional
<heat>
the dave guy really shit the bed there
<geist>
ahaha
<geist>
he really should have picked less things in windows to write
<geist>
and just stuck with what works
* geist
shakes head
<kof673>
circa 95/98/me days there was "arj folder" IIRC think it was free...and similar programs....which gave "zip files as folders" in explorer
<kof673>
it was always a wonder what the purpose of the bundled thing was
<kof673>
"magic folders" another one IIRC
<kof673>
i'm not certain, but i guess "openstep enterprise" even did the app/folder thing on windows, for the < 10 or so apps it shipped with :D
<kof673>
i would be surprised if not anyways...and the solaris hosted version too...
<kof673>
and gnustep perhaps too
<kof673>
winzip was shareware so maybe that is an ok reason to include *something*
memset has quit [Remote host closed the connection]
memset has quit [Remote host closed the connection]
memset has joined #osdev
<heat>
yep, that was it, fuckin negative dentries
<heat>
i feel like it's all a little racey but i'll deal with it Eventually
<heat>
maybe with lockrefs
memset has quit [Remote host closed the connection]
memset has joined #osdev
heat has quit [Ping timeout: 252 seconds]
Arthuria has quit [Ping timeout: 260 seconds]
rustyy has quit [Quit: leaving]
rustyy has joined #osdev
goliath has joined #osdev
GeDaMo has joined #osdev
<kof673>
ucpp code: #define ARITH_TYPENAME zoinx
Left_Turn has joined #osdev
<Ermine>
did windows failures end?
<zid>
no, windows is still a failure
ThinkT510 has quit [Read error: Connection reset by peer]
netbsduser has joined #osdev
ThinkT510 has joined #osdev
navi has joined #osdev
memset has quit [Remote host closed the connection]
memset has joined #osdev
X-Scale has joined #osdev
m3a has quit [Ping timeout: 244 seconds]
m3a has joined #osdev
X-Scale has quit [Ping timeout: 256 seconds]
<sortie>
There seems to be a problem with the latest version of counterstrike. Sortix is unaffected due to the lack of a steam port.
<zid>
see, this is why you should never update anything
<zid>
Updates come in three types, instantly bricks the device, makes it use more ram/disk/cpu but does nothing useful, or removes a feature you used
<Ermine>
That's not the case for Onyx
<Ermine>
sortie: no games on Sortix?
<sortie>
Ermine: Sortix has always been a gaming platform first :)
<sortie>
Sortix was for a long time known as kernel pong
vdamewood has quit [Quit: Life beckons]
osdev199 has joined #osdev
<osdev199>
Hi, in keyboard driver initialization code, call to `outportb` function in line no. 12 is causing a bug. Either the `printk` in line #17 hangs while printing the `y` char or I just get the first printk msg (line #1).
osdev199 has quit [Remote host closed the connection]
osdev199 has joined #osdev
<osdev199>
I found the bug. I was sending commands to the wrong port. It should be the data port (0x60) instead of command port (0x64). The commands were intended for the PS/2 device.
osdev199 has quit [Remote host closed the connection]
astroanax has joined #osdev
heat has joined #osdev
raphaelsc has joined #osdev
<heat>
haha crowdstrike fucked it
<heat>
classic antivirus
joe9 has joined #osdev
<zid>
amg, amd releasing a cpu without 32kb of l1
<zid>
it's 48kB, first cpu in a billion years to not use 32kB
<Matt|home>
heyo~
<nikolar>
zid lel
<nikolar>
Matt|home: oi
<kof673>
you are correct, sir <takes swig off-camera> </1970 jokes>
vdamewood has joined #osdev
<Matt|home>
yesterday, i smoked half of a full gram cartridge of .3% by weight. and im pretty sure i wrote about a hundred lines of code or so. i just need to figure out what i actually wrote.. but i can tell it's good code :D
<Matt|home>
i mean obv luls i wrote it, duh
frkazoid333 has quit [Ping timeout: 252 seconds]
<Matt|home>
although im running into a bit of a weird issue
<Matt|home>
hm
<Matt|home>
in general, i know it's acceptable for a program that needs to keep track of data after it's closed to write it to file. i get that, i understand
<Matt|home>
but is there some kind of long-term memory RAM access that's provided for circumstances like this, where your program can ask for it to be reserved soley for it's use even after termination or not really
<Matt|home>
e.g. i open up firefox, it stores my login info at memory address 0xwhatevs, i close firefox, the memory is still there and no other program can access it til firefox lets it go
<Matt|home>
bad practice?
<nikolar>
That's called a file :P
<nikolar>
Jk
<Matt|home>
i know
<kof673>
memcached in webland maybe
<kof673>
nvram in firmware maybe
<kof673>
all ram is arguably non-volatile...so long as there is power...
<Matt|home>
mkay. so file is pretty much the defacto standard for keeping track of stuff after termination
<kof673>
didn't open office/firefox/etc. used to load partially at boot, so it would startup faster :D
Terlisimo has quit [Quit: Connection reset by beer]
<Matt|home>
i can't shake this nasty feeling that im doing something incredibly wrong.. but whatevs
<Matt|home>
if it works it works
Terlisimo has joined #osdev
PublicWiFi is now known as McDonaldsWiFi
asarandi has quit [Quit: WeeChat 4.2.2]
asarandi has joined #osdev
gcoakes has quit [Ping timeout: 248 seconds]
frkazoid333 has joined #osdev
goliath has joined #osdev
Matt|home has quit [Read error: Connection reset by peer]
Matt|home has joined #osdev
Arthuria has joined #osdev
<zid>
nikolar: files are what you use for shaping metal, silly
<nikolar>
Ah of course
<nikolar>
How could I forget
<nikolar>
zid is your computer working
<nikolar>
Apparently windows installs died worldwide
<zid>
it's a 3rd party SECURITY SOLUTION
<zid>
their kernel driver fucked up
<nikolar>
Lel
<nikolar>
Linux master race
memset has quit [Remote host closed the connection]
memset has joined #osdev
karenthedorf has joined #osdev
<zid>
nikolapdp I'm going to need you to spritz me with water then waft me with a large palm frond
navi has quit [Ping timeout: 248 seconds]
vdamewood has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<nikolar>
Well too bad, I'm in Greece now
<zid>
too bad, you're in greece
<nikolar>
Got to waft yourself
raphaelsc has quit [Ping timeout: 252 seconds]
<nikolar>
KERNAL
X-Scale has joined #osdev
<heat>
nikolar, KERNAL
<heat>
no pdp in greece?
<nikolar>
Are we kernaling today
<heat>
probably
<heat>
at least a lil
xenos1984 has quit [Ping timeout: 252 seconds]
xenos1984 has joined #osdev
joe9 has quit [Quit: leaving]
<nikolar>
no pdp :(
<zid>
nikolar why are you in greece, did you decide to upgrade your balkan microstate
<nikolar>
No, vacation
<zid>
makes sense to go somewhere nicer than when you live, as a holiday
<nikolar>
Well Greece has a sea
<zid>
same
<nikolar>
Same what
<zid>
has a sea
<zid>
also have all their marbles
<zid>
so greece is pretty much superfluous
<nikolar>
Well it's closer than UK ain't it
josuedhg has joined #osdev
<zid>
so is croatia
<nikolar>
Screw Croatia
<nikolar>
All my homies hate Croatia
<heat>
average serbian
<zid>
all my homies hate poor people, my homies suck
<zid>
internet friends are better
<nikolar>
Unironically, Croatians hate us way more than we hate them
<nikolar>
zid indeed
<nikolar>
We're mostly indifferent, plenty of Serbs go to Croatia
<nikolar>
And end up regretting it lol
<zid>
one should always regret going outside
<zid>
whether that be to go to croatia, or to go to the local shop
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
<heat>
i keep seeing the helenos guy on linkedin saying microkernels are the best shit ever
<heat>
it's great bait but i'm not biting
<heat>
this time cuz of crowdstrike
X-Scale has quit [Ping timeout: 256 seconds]
<heat>
i'm sorry but i have better things to do than getting into flamewars on linkedin
<nikolapdp>
i mean a shitty driver can bring down a microkernel too presumably
<heat>
yeah i mean if the storage driver or fs driver are toast, you're also toast
<heat>
right
TkTech has joined #osdev
<mjg>
i thouhg the entire premise is that you don't get toast
<heat>
yeah but without a filesystem what are you going to do?
<heat>
*maybe* wget of a solution on a tmpfs? like *maybe*
<mjg>
restart the fs part
<heat>
this is a deterministic crash at boot time
<mjg>
lol
<mjg>
aight
<mjg>
if it straight up does not work even planckkernel would not do
X-Scale has joined #osdev
<nikolapdp>
mjg, the assumption of microkernels is that the drivers work reliably enough that they can be restarted
<nikolapdp>
which doesn't help here
<mjg>
i did not know this outright does not work
<mjg>
as stated above
<Ermine>
MICROKERNALS
<mjg>
MECROKERNELS
<nikolapdp>
isn't nt a sort of a microkernel
<nikolapdp>
or a hybrid rather
<Ermine>
Tbh I have the same though about this shitstorm, microkernels
<heat>
not really
<nikolapdp>
not really what
<heat>
not really a microkernel, hybrid is a marketing term too
<heat>
also, fwiw: i seriously doubt an antivirus would take any place in the driver stack not in ring0
<Ermine>
I don't remember microsoft highlighting the fact that windows has hybrid kernel architecture
<Ermine>
maybe at the beginning of nt storyline when nt was for enterprises and there are people that can understand nerd speak
<heat>
mjg, it's srsly a LOL crash, they pushed bad virus definition db data, so it does (what looks like) a NULL deref and blows up
<heat>
it's hilarious, they never fucking tested this
<nikolapdp>
lel
<Ermine>
releng level: setuptools
<heat>
this isn't a kernel difference thing, this isn't a hardware problem, it's a "we didn't even boot this" problem
<nikolapdp>
exactly, microkernel wouldn't have haD
<nikolapdp>
helped
<Ermine>
you have a point
<zid>
microkernel = your system acts like windows 95
<nikolapdp>
lol how
<Ermine>
phunny
<zid>
it bsods every hour and the computer is slow :P
<Ermine>
minix doesn't have bsods
<nikolapdp>
slow, maybe, bsods definitely not
<zid>
fake hybrid kernel then
<zid>
sorry
<Ermine>
even in linux it's new thingie
<nikolapdp>
that's better zid
<zid>
it's better that minix is a fake hybrid kernel?
<Ermine>
wha
<nikolapdp>
no, minix is a microkernel
<nikolapdp>
windows nt is a fake hybrid
<Ermine>
okay, bailing out
<zid>
no it's a pencil sharpener, you can tell because of the way that it is
<Ermine>
let's talk onyx
<heat>
sorry i don't drive a hybrid
<nikolapdp>
when was the last time you sharpened a pencil
<zid>
If it was a microkernel, people would have unrealistic amounts of adoration for it
<zid>
and bring it up constantly despite being useless
<heat>
ONYXEN
<zid>
wait nvm maybe it is a microkernel
<nikolapdp>
zid that sounds like onyx
<heat>
i can get through a ./configure && make now
<heat>
i'm very happy
<nikolapdp>
what are you configuring
<heat>
with *no* fs corruption
<zid>
no, onyx is shit and everybody hates it, because it's encrypted
<heat>
just gnu hello for the test
<nikolapdp>
how's it encrypted
<zid>
have you ever used it
<nikolapdp>
no
<Ermine>
I remarked today in one chat that reliability of linux leaves a lot to be desired
<zid>
use it and you'll find out what I mean
<Ermine>
and I've got "LOL ur hw is bad"
<nikolapdp>
Ermine what hardware reliability
<zid>
linux is more stable than my hw is for sure
<Ermine>
nikolapdp: huh?
<nikolapdp>
zid that's because your hardware is shit :P
<zid>
this is the LEAST haunted pc I've ever owned
<nikolapdp>
Ermine, let me rephrase that, what reliablity issues do you have
<zid>
you can take a heavy step while in the room with it and it doesn't triplefault
<heat>
they have a point, linux tends to be pretty darn reliable, even when it crashes it doesn't take down the machine
<nikolapdp>
zid you didn't say it isn't haunted, just that it's the least haunted
<zid>
100x more reliable than any of my other PCs
<heat>
now, GPU drivers on the other hand.... yeah
<nikolapdp>
lel
<Ermine>
recently my wi-fi got broken by faulty firmware or kernel
<heat>
but e.g if the crowdstrike thing happened on linux it'd OOPS, SIGKILL modprobe and keep going
<nikolapdp>
to be fair, my work laptop running ubuntu just freezes without writing anything to syslog or dmesg
<zid>
good news, windows eats its own wifi fucking constantly
<nikolapdp>
can confirm
<Ermine>
heat: and then it happened that panic on oops was on :D
<nikolapdp>
wifi on windows was no less shite while i used it
<zid>
if it isn't the wifi, it's the sound
<heat>
lol
<zid>
every time there's a windows 11 update, half of the hangout discord I am on have to set their audio back up
<nikolapdp>
sound hard apparently
<Ermine>
So I conceded that linux wifi is shite
<zid>
linux wifi worked for me the one time I used it
<nikolapdp>
Ermine maybe wifi is just shite in general
<zid>
wpa_supplicant or whatever it was
<zid>
wifi card driver support used to be gash though
<nikolapdp>
yeah, i am on an intel chip now, and literally no issues
<heat>
wifi is hard, gpus are hard
<Ermine>
nikolapdp: all hw is shite in general, but that's how nature and physics work
<heat>
drivers in general are hard cuz they have way less eyes and way less people working on them
<heat>
and they're also wayyyyyyyyyyyy larger than the core kernel
<Ermine>
And I think I've took the bait to show that linux wifi is shite
<nikolapdp>
well some hardware is way more shit than other, let's be real
<Ermine>
amdgpu 3 million loc let's go
<heat>
BROADCOM^W
<nikolapdp>
Ermine the correct answer would've been, all wifi is shite
<nikolapdp>
on my old laptop (with a broadcom chip) wifi sucked both on linux and widnows and i had to use a silly dongle
<nikolapdp>
(the dongle had a realtek chip i think)
<Ermine>
were broadcom drivers ever mainlined
<nikolapdp>
honestly, no clue
<heat>
some are
<zid>
all hw is shit, all wifi is shite, but some wifi is less shite than others
<nikolapdp>
yes
<zid>
broadcom is horrendous for support
<zid>
*ridiculously* bad
<nikolapdp>
there are probably tables of supported wifi chips online somwhere
<heat>
tfw you pick hardware around your shitty operating system
<Ermine>
heat: ^
<zid>
like, there's a single driver, hidden in the back of a filing cabinet on a chinese only web forum, that only works on a single point release of windows 8
<nikolapdp>
zid, i didn't check the chip i got with this laptop and i got very lucky that it literally just worked (tm)
<zid>
broadcom manifesto ^
<Ermine>
heat: moreover, you can't just buy that hardware in ordinary store
<Ermine>
I had to order my wifi dongle from china
<Ermine>
and I've whined about that one too
<nikolapdp>
that's at least easy
<nikolapdp>
though it takes time
<heat>
get a mobo with wifi!
<nikolapdp>
or even better, ethernet
<heat>
all of them have ethernet
<heat>
i hope
<nikolapdp>
(what i meant is, use ethernet)
<Ermine>
ethernet is not always a possibility
<nikolapdp>
well if you are on a desktop, you should try and get a cable to it
<nikolapdp>
it's way less headache
josuedhg has joined #osdev
<Ermine>
That would require overhauling the flat
<Ermine>
Mom won't tolerate cables hanging around the place
<Ermine>
(and I won't)
<nikolapdp>
annoying
<heat>
GET THA DRILL
<nikolapdp>
my dad helped us route the cables and such
<Ermine>
And making a repair is not what we can afford
<heat>
option 1: get a trained professional to do it for you
<heat>
option 2: GET THA DRILL AND BRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
<nikolapdp>
heat it was option 2
<Ermine>
Lack of good constructors makes me want to go to college after I graduate
<nikolapdp>
how are those related
<Ermine>
what are related
<heat>
lack of good constructors and college
<nikolapdp>
^
<Ermine>
I become good constructor so I don't need to find good constructors
<zid>
what is constructors
<zid>
wait, are we going to play the zachtronics game
<heat>
ah gotcha
<Ermine>
or builders
<nikolapdp>
~.
<zid>
oh builder
<heat>
builderen
<zid>
I could be a builder, but my arse isn't big enough
<nikolapdp>
zid that's a lie, you'd have to leave your house
<Ermine>
is it some sort of fine English humour
<zid>
It's determinism nikolapdp, if I had a builder's arsecrack, I'd be a builder. I'm pale so I am a nerd.
<zid>
lamarkian determinism
<nikolapdp>
lel
X-Scale has quit [Quit: Client closed]
d5k has joined #osdev
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
<heat>
i have found a nice shortcut for patching myself into config.sub and config.guess: sed -i 's/sortix/onyx'
<sortie>
heat: Your sed is weak.
<zid>
ooooh born
<zid>
burn
<sortie>
Real men (and anyone else) uses -E
<zid>
sortie now tell him his cp is tiny
<zid>
and his rm is debauched
<sortie>
How dare you match sortix with a BASIC regular expression, those aren't even regular!
<heat>
hey sortie help me out here boss
<heat>
WARNING: 'makeinfo' is missing on your system.
<nikolapdp>
lel
<heat>
can i forcefully shut it up?
<sortie>
Install texinfo
<heat>
i mean forcefully
<heat>
not "install GNU info"
<FreeFull>
egrep
<sortie>
lol you assume GNU stuff has deterministic modes to make it do useful things
<heat>
egrep is deprecated
<FreeFull>
Not in the POSIX spec it's not
<sortie>
heat: This usually does happen whenever the package has pregenerated manuals and somehow make wants to remake them. A fresh extraction with reset timestamps may work. Alternatively recursively touch everything to the same reference file timestamp
<sortie>
FreeFull: egrep is not POSIX
<sortie>
grep -E
<FreeFull>
Ah, it only gets mentioned
<sortie>
If you ever use grep or sed without -E, then you are part of the problem and will be prosecuted.
<zid>
can I use it with -i
<FreeFull>
Too bad we can't make -E the default without breaking everything
<sortie>
-i your choice
<nikolapdp>
just write a script that calls grep -R and call it ergrep :P
<FreeFull>
grep rerere
<sortie>
FreeFull: Indeed. So use it all the time. If you use it everywhere, always, then we may have a shot at deprecating BRE (these are terrible, and not even regular expressions!)
<FreeFull>
To be fair I usually use rg instead of grep
<sortie>
As long as it does not have back references, it's fine :)
<sortie>
Back references are not regular expressions, in terms of computer science, and cannot be implemented efficiently (perhaps if P=NP)
<zid>
back references are the only reason to ever use regex
<sortie>
Call it something else and use that. It's not a regular expression.
<bslsk05>
perl.plover.com: Perl Regular Expression Matching is NP-Hard
<sortie>
The regular part of expression means it's context free
<FreeFull>
Yeah, rg doesn't have lookaround or backreferences
<acidx>
I like libpcre. it's not perl, it's not compatible with perl, and it's not regular expressions.
<sortie>
BRE in grep (without -E) has back references but doesn't even have | (wtf)
<sortie>
(GNU grep does do \| as an extension but it's not POSIX)
<FreeFull>
How can you not have | and call it regex
<sortie>
Classic grep did not have '|'! It had back references though!
<FreeFull>
Does ed regex not support | either?
<sortie>
Like I said, grep without -E is not regular expressions, and everyone involved should be ashamed of themselves
<FreeFull>
Or did they ruin it specifically for grep
<nortti>
< sortie> The regular part of expression means it's context free ← though, context free grammars are a larger set than regular grammars. would be nice if there was a conscise way to represent context-free grammars like regex tho
<FreeFull>
Wow, ed is tiny
<sortie>
Regular expressions is this one (1) area of computer science where all the mathematics is actually perfect and they can be implemented extremely perfectly efficiently. It's been known forever to be nice and well done and all. And the inventors of grep just fucked up big time by ignoring all the well known science.
<nortti>
which ed you looking at?
<acidx>
of course ed is tiny, it's only a loop that reads a line and prints "?"
<FreeFull>
gnu ed
<sortie>
So remember kids. Use grep -E and sed -E *always*.
<nortti>
aiui that's the most featureful ed there is
<FreeFull>
I imagine other eds are even tinier
<FreeFull>
acidx: haha
<FreeFull>
The most featureful ed is ex
<sortie>
acidx: while read; do echo ?; done
<acidx>
sortie: posix ed
<FreeFull>
Oh, you have to run `ed -E`
<FreeFull>
Of course
<FreeFull>
Seems gnu grep does the \| thing
<FreeFull>
Sorry, I meant gnu ed
<nikolar>
> sortie | (GNU grep does do \| as an extension but it's not POSIX)
<FreeFull>
gnu ed does the \| thing
<sortie>
glibc also does \|
<sortie>
So anything using regcomp also has it
memset has quit [Remote host closed the connection]
goliath has joined #osdev
memset has joined #osdev
<FreeFull>
I wonder what it'd take to get rust's std working on sortix
<heat>
i just had a simultaneous impossible exception
<heat>
this is really good
<nikolapdp>
what
<heat>
thats what i said!
<nikolapdp>
kek
<FreeFull>
Clearly it wasn't that impossible
<heat>
in the image: 0xffffffff8102224a <+570>: call 0xffffffff8100a040 <__llvm_retpoline_r11>
<sortie>
nooo not the retpoline
<heat>
in ram: 0xffffffff8102224a <+570>: call 0xffffffff8100a03f
<heat>
?????
<heat>
i'm not even code patching in this function
<nikolapdp>
npivr
<sortie>
heat: Back in old Sortix, I had a bug where programs crashed 10% of the time due to a situation like this.
<nikolapdp>
noice
<heat>
i mean, i'm pretty sure my tlb invalidation is on point, and that's probably one of the few possible causes
<FreeFull>
If it were ASLR I'd expect it to be off by a lot more than just 1
<heat>
could also be corrupting the direct map
<sortie>
heat: Turns out the memcpy in execve was faulty. The libc was built without the redzone so interrupts trashed the stack a bit and made memcpy return early.
<heat>
yeah that's not a problem here
<zid>
10% is pretty good odds
<zid>
I'd take that gamble
<sortie>
heat: Yeah just saying that impossible problems do happen and it can take forever to track them down
<heat>
... someone wrote to the page
<Ermine>
retpoline -- is that meltdown mitigation?
<sortie>
That is the best part of osdev. The impossible problems and how good it feels to fix it
<heat>
yes
<heat>
well, spectre
<sortie>
No Mr. Bond, I expect you to return.
<Ermine>
and llvm can generate that?
<heat>
yes
<Ermine>
nice?
<Ermine>
s/?//
<heat>
so someone with WP=0 accidentally wrote to .text and decremented that IP's instruction?
<FreeFull>
It's weird that it's exactly off by 1
<zid>
I also use my .text as a lock
<zid>
just increment a random instruction to take the lock
<heat>
i never call enable_writeprotect....
<zid>
if contention happens, the other person crashes
<zid>
and I win
<heat>
how did this never blow up in my face?
<zid>
nikolar: genius no?
<zid>
take_lock_and_fucking_keep_it()
<nikolar>
Indeed
<nikolar>
The survival of the fittest
pkal has left #osdev [Killed buffer]
hwpplayer1 has joined #osdev
d5k has quit [Quit: leaving]
josuedhg has quit [Quit: Client closed]
netbsduser has quit [Ping timeout: 248 seconds]
<heat>
wooo i can build binutils
<heat>
4min with -j4 which is actually not too shabby
<Ermine>
what's your cpu?
<zid>
nikolapdp is it monday yet
<heat>
i5-8250U
<heat>
hmm let me time the same build on linux now
<Ermine>
iirc my i5-3470 did it in 2 mins, but I will be able to check that only on Sunday
<heat>
note: i'm using serial as output, which is terrible
<Ermine>
but your cpu is U one, so I guess it's incorrect to compare it against desktop cpus
<heat>
yeah i get 1m16.976s
<heat>
let me try make -sss
<Ermine>
try everything with > /dev/null 2> /dev/null
<nikolar>
zid it's not
<zid>
fuck you
<nikolar>
Love you too
<Ermine>
but anyway, 1min is impressive
<heat>
1min for linux :(
<nikolar>
1min is host
<Ermine>
now my ivy bridge is more like rusty bridge
<nikolar>
Yeah
<heat>
i'll time it on a external timer, fuggit
<Ermine>
how much does io affect build speeds btw? like hdd vs ssd
<zid>
depends how fast your cpu is
<zid>
it penalizes fast cpus a lot
<zid>
pentium 4 don't care
<zid>
mainly it's that it's a constant factor, it takes 10 seconds to load that shit off a hdd no matter what
<zid>
so if you build it in 2 hours that's nothing, if you build it in 10 seconds that's half
<heat>
2:30 on onyx
<heat>
not baaad
<Ermine>
time for flamegraphs?
<heat>
you know it
lanodan has quit [Ping timeout: 245 seconds]
<heat>
lots of idle time. i assume my scheduling is screwing me here
lanodan has joined #osdev
<heat>
io wait flamegraph doesn't show much of note. some pipe waiting. inode_sync when destroying an inode is barely measurable
sprock has quit [Remote host closed the connection]
<mjg>
watcha doin
<heat>
building binutils on onyx
<mjg>
OH
<mjg>
i regret asking
<heat>
:(
<heat>
80% idle time mon
<Mondenkind>
oooff
<Ermine>
Ah, it's basically known issue of scheduler not being great
<heat>
if i unfuck the scheduler i'll see some good ol lock contention i hope
<mjg>
:D
<mjg>
for the record tho
<mjg>
how does it look like when you build on linux?
<mjg>
cause some toolen have just terrible build scalability
<heat>
it's twice as fast
<mjg>
they literally bottleneck themselvs building on one core long times for examle
<heat>
i didn't fg it
<mjg>
ok
<mjg>
linux > onyx i guess :X
<heat>
DISCOUT LINUX!
<mjg>
is that gmake?
<heat>
yep
<Ermine>
for scalability you need ninja
<heat>
but LAPTOP SCALE -j
<mjg>
ye there it does not matter
<mjg>
so first i would do i strace gmake
<mjg>
since that's driving jobs starting to begin with
<Ermine>
btw are u bilding it on master
<mjg>
for all i know you are stalling the poor fuck
<heat>
Ermine, no
<mjg>
erm, s/strace/trace/
<mjg>
you can extend your profiling hackery to only trace fuckers by procname
<mjg>
and then only log make
sprock has joined #osdev
<mjg>
for a qwuick sanity check tho, how much time do you need to make will-it-scale?
<mjg>
maybe that's already broken?
<heat>
for context: my scheduler cpu picking algo is literally "pick the CPU that has ran less threads at that point in time"
<heat>
it's turrible
<mjg>
turdible?
<Ermine>
is -j16 laptop level scalability?
<mjg>
Ermine: just above laptop
<heat>
PHONE scalability
<mjg>
heat: that is turdible but it does not necessarily equate to stalls
<mjg>
i see you are rocking that affinity mon
<heat>
note: i probably picked the worst moment in the build to fg - the bit where it ./configures a bunch of subdirs
<heat>
it's probably neatly serializing the build as a single make job spams out a bunch of forks
<mjg>
your man dick sites has you covered
<heat>
DICK SITES!
<mjg>
there is something you can plausibly port to onyx
<mjg>
for tracing scheduler events
<mjg>
there is both linux and freebsd codez already, so...
<heat>
i have a tracing framework already
<mjg>
after that you get a google chrome compatible trace
<heat>
i have that too
<mjg>
:O
hwpplayer1 has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.3)]
<mjg>
> error: 'noreturn' function does return [-Werror]
<mjg>
lol
<heat>
i found a funny bug while doing this: i forgot to reset CR0.WP after hot patching
<heat>
it's mysterious as to how that didn't blow up sooner
<mjg>
you hot patch?
<mjg>
doing what/
<heat>
yes i do x86 instruction patching and i also have jump labels
<mjg>
ye ye but what do you hot patch
<mjg>
mofo
<mjg>
you got static branchen or something?
<heat>
yes
<mjg>
onyx > freebsd
<mjg>
so: linux > onyx > freebsd ; so far anyway
netbsduser has joined #osdev
<heat>
nothing new innit
netbsduser has quit [Ping timeout: 248 seconds]
xal has quit []
xal has joined #osdev
netbsduser has joined #osdev
goliath has quit [Quit: SIGSEGV]
dgz has joined #osdev
dgz has quit [Remote host closed the connection]
* geist
pushes crowdstrike to onyx
<geist>
checkmate
<heat>
noooooooOOOOOoooooOOOOoooo
<nikolar>
Nice
netbsduser has quit [Ping timeout: 276 seconds]
Turn_Left has quit [Read error: Connection reset by peer]
<klys>
recently I encountered the clone3() syscall via linux. who else has heard of it?
<heat>
yeah cpu scheduling during the build looks... suboptimal
<nikolar>
How are you scheduling anyway
gog has joined #osdev
<heat>
wdym
<gog>
hi
<nikolar>
Like why are you bottlenecked here
<nikolar>
Are you not scheduling all cores or something
<heat>
generally you keep the threads bound to a single cpu
<nikolar>
Yeah
<heat>
you don't want shared scheduling structures (e.g list of active threads) as you'll have a bunch of contention possibly
<heat>
the tricky bit is to move threads between cpus
<mjg>
here is a funny thing tho mon
<mjg>
global scheduler lock is not utterly tragic for building workloads at that scale
<heat>
i'm not fucking my whole scheduler like that
<mjg>
:d
<mjg>
i highly recommend writing a lol scheduler aka 4bsd and having that as the benchmark
<heat>
i have ROUND ROBIN WITH PRIORITIES
<heat>
THE GREATEST SCHEDUELR EVER
<mjg>
why even prorities
<mjg>
fucken round robin all over
<heat>
so i've been thinking for a while about reworking the scheduler
<heat>
might do that Soon(tm)
<mjg>
which reminds me of a funny story for you heat
<heat>
oh oh oh mr funny story please do tell
<mjg>
when i was kid there was a family friend visiting, he spent quit some time in the US
<mjg>
he kept interjecting everything with "fucken" (not "fucking") instead of kurwa or similar
<mjg>
i asked him what does it mean, but he would not tell me
<mjg>
later i found an english teacher at school and asked that person