channel logs for 2004 - 2010 are archived at http://tunes.org/~nef/logs/old/ ·· can't be searched
#osdev2 = #osdev @ Libera from 23may2021 to present
#osdev @ OPN/FreeNode from 3apr2001 to 23may2021
all other channels are on OPN/FreeNode from 2004 to present
http://bespin.org/~qz/search/?view=1&c=osdev2&y=24&m=7&d=5
03:50:00 <zid> For the americans, remember, if a finger lands on your property, you get to keep it
03:54:00 <kazinsal> so say we all
03:55:00 <kazinsal> though note to residents of blaine, wa: if your finger lands on my side of the border, I will not keep it. I just got my trusted traveler card renewed and I do not want to have it taken from me over a lost fingat
05:03:00 <vdamewood> kazinsal: So, if it happens, you'll give us the finger?
05:04:00 <Mondenkind> i want kazinsal's finger🥺
05:04:00 <kazinsal> vdamewood: whichever agency dealt with the feet washing up on shore twenty years ago can handle the finger
05:08:00 <vdamewood> As long as it's not the people who deided it was a good idea to blow up a whale on the beach.
05:08:00 <vdamewood> decided*
05:28:00 <geist> blaine the train is a pain
05:29:00 <vdamewood> Blaine has a train?
05:30:00 <kazinsal> there's probably an amtrak stop there, sure
05:31:00 <geist> it's a deep reference that i dont expect anyone to get
05:31:00 <vdamewood> Probably, the Cascades line goes vrom Eugene to Vancouver
05:31:00 <vdamewood> from*
05:31:00 <kazinsal> ah, no, there isn't! goes straight from pacific central to bellingham
05:32:00 <kazinsal> the blaine crossing is my preferred one by car because it has the fun extra lane that lets me skip the hour of waiting
05:32:00 <kazinsal> thanks to my Certified Not A Terrorist card
05:33:00 <kazinsal> the Lynden crossing is closer but doesn't have such a lane
05:33:00 <geist> but yeah teh cascades does go through there AFAIK
05:33:00 <geist> i always meant to take it
05:33:00 <jeaye> But how else would you get harrassed about why you're crossing the border on a Thursday afternoon?
05:33:00 <geist> i was thinking abut point roberts anyway when you first mentioned it
05:33:00 <kazinsal> actually these days I think I am closer to blaine anyways
05:34:00 <geist> oh man there are fireworks everywhere outside, and i'd love to continue sitting on the porch listening to it
05:34:00 <geist> but the mosquitoes are eating me alive
05:34:00 <jeaye> You'll still hear 'em inside.
05:34:00 <kazinsal> heh, yeah. nasty lil buggers
05:35:00 <kazinsal> reminds me, I gotta get down that way this summer for a weekend
05:35:00 <zid> I hope not
05:35:00 <kazinsal> my NEXUS renewal came through yesterday so I'm just waiting on my new card
05:35:00 <zid> If you can hear the mosquitoes through walls they must be HUGE
05:35:00 <jeaye> Deathsquitos.
05:36:00 <jeaye> (found in the plains)
05:36:00 <zid> My mother likes to breed them, for whatever reason
05:36:00 <zid> I should see how hard it is to breed dragonflies
05:37:00 <heat> wow i'm up so early the PNWers are still here
05:37:00 <heat> hi
05:37:00 <geist> whatever version of mosquitoes are up here in PNW are nothing like the ones we had in texas where i grew up
05:38:00 <geist> but these will still eventually bite you
05:38:00 <geist> they love to get all up in your grill
05:38:00 <kazinsal> they wait for you to let your guard down
05:38:00 <heat> tech snob mosquitoes vs yeehaw mosquitoes
05:42:00 <Mondenkind> mosquitoes already in wa? eesh
05:42:00 <Mondenkind> none up here yet really
05:42:00 <jeaye> I haven't seen any in Seattle yet, but I also wansn't out on the porch listening to fireworks.
05:42:00 <kazinsal> there's a good few up near the fraser
05:43:00 <kazinsal> and runoffs thereof
05:46:00 <vdamewood> No squitoes yet here in Portland
05:56:00 <geist> i'm out in the woods, and i think there's some water nearby
05:56:00 <geist> especially around dusk they really come out
05:57:00 <kazinsal> yeah, stagnant freshwater is 4loko for the lil bastids
07:01:00 <vdamewood> Yay! Splody day is over!
07:15:00 <geist> still a few stray splodies
10:01:00 <Jari--> rock'n'roll
17:46:00 <mjg> > Problems worthy of attack prove their worth by fighting back.
17:46:00 <mjg> :>>
17:47:00 <heat> hi mjg
17:47:00 <nikolapdp> oi
17:47:00 <mjg> hello
17:47:00 <mjg> mofos
17:52:00 <kof673> where is that from mjg?
17:53:00 <mjg> https://www.goodreads.com/quotes/75064-problems-worthy-of-attack-prove-their-worth-by-fighting-back
17:53:00 <bslsk05> ​www.goodreads.com: Quote by Piet Hein: “Problems worthy of attack prove their worth by...”
17:53:00 <heat> Died: April 17, 1996 (age 90 years), Middelfart, Denmark
17:53:00 <heat> oh god i'm preemptively buying a ticket o middelfart for when i get terminally sick
17:54:00 <kof673> i don't mind ...marcus aurelius or anyone else, but file under "roman military sayings" lol
17:55:00 <GeDaMo> https://en.wikipedia.org/wiki/Piet_Hein_(scientist)
17:56:00 <kof673> (with oblig. internet quote beware) “A WORD TO THE WISE Let the world pass in its time-ridden race; never get caught in its snare. Remember, the only acceptable case for being in any particular place is having no business there.”
17:56:00 <kof673> sounds like vonnegut "we are here to fart around, and don't let anyone tell you otherwise"
18:09:00 <heat> mjg, are you working on the rcu stat
18:09:00 <heat> cuz that'll definitely bite back :v
18:10:00 <mjg> i may over teh weekend
18:10:00 <mjg> the way the l man is proposing this is too error prone tho
18:10:00 <nikolapdp> what's going on
18:10:00 <mjg> i got full smr operation on freebsd few years back, could nto be fucked to get it to a committable state
18:11:00 <mjg> but it very much relied heavily on maintaining as much sane state as possible
18:11:00 <mjg> so in particular vnodes not suddenly becoming something else
18:12:00 <mjg> in the entire ordeal i'm confusing how tf was xfs allowed to not wait for rcu grace periods
18:12:00 <mjg> confused even
18:12:00 <heat> that whole convo made me realize i have some weird race condition bugen in my dentry code wrt inodes popping in and out of view
18:12:00 <nikolar> BUGEN
18:12:00 <nikolapdp> BUGGEN
18:13:00 <heat> i *probably* need rcu free deferral there anyway
18:13:00 <mjg> you don't do the one-time read?
18:14:00 <mjg> anyway the only real difficulty with this shit is handling the crappers
18:14:00 <mjg> like LSM
18:14:00 <mjg> what bites is regrettable hooks which are racy by design
18:14:00 <mjg> and the vfs folk not interested in changing that
18:14:00 <nikolapdp> how does the one time read work anyway
18:14:00 <heat> maybe with a seq count. like: d_inode(dentry) {rcu_read_lock(); do {seq = dentry->d_seq; ino = dentry->d_inode; inode_get_if_not_zero(ino); } while(seq != dentry->d_seq);}
18:15:00 <heat> that's my idea anyway
18:15:00 <heat> (with proper error handling along the way)
18:15:00 <heat> fwiw i don't understand what you mean with one-time read
18:16:00 <heat> if you mean "taking d_inode out of the dentry to struct file", yeah, i do that, but i need to be careful around that particular bit of code
18:16:00 <mjg> no
18:17:00 <mjg> i mean the race l man mentioned
18:17:00 <mjg> i presume you transition dentries to hold NULL on unlink
18:17:00 <heat> yes
18:17:00 <mjg> say you are racing against someone who continuously creates and unlinks on the same name
18:17:00 <mjg> you may spot inode1, NULL, inode2, NULL, etc.
18:18:00 <mjg> if you read the inode pointer more than once... ooops
18:18:00 <mjg> you might have done some shit based on the one pointer, and some shit based on the other
18:19:00 <mjg> so you make sure to READ_ONCE and stick with it
18:19:00 <nikolapdp> mjg what does READ_ONCE do exactly
18:19:00 <mjg> in this context prevents the compiler from fucking with that load
18:20:00 <mjg> issuing it multiple times 'n shit
18:20:00 <nikolapdp> so something like a read and a compiler barrier or something
18:20:00 <heat> i'm worried with just the basic race i mentioned
18:20:00 <heat> unlink/open, with unlink doing d_inode = NULL and open grabbing a dying inode
18:20:00 <heat> or dead inode
18:21:00 <heat> i'm not sure if i actually need a sequence counter there, but i definitely need get_if_not_zero with some rcu protection around that
18:21:00 <mjg> you need seq at the end to validate the association
18:22:00 <mjg> i presume you change it when modifying d_inode
18:22:00 <mjg> fwiw ONYX can probably implement fully-scale rcu usage very easily
18:22:00 <mjg> because you don't have to deal with this shit
18:23:00 <mjg> LSM et al
18:23:00 <heat> i dont have a d_seq yet
18:23:00 <heat> but yes, that's the plan
18:23:00 <mjg> q:S
18:23:00 <mjg> that's bad mon
18:23:00 <mjg> correctness first
18:23:00 <mjg> unless you are read-write locking around right now
18:23:00 <heat> why correctness? i don't have rcu walking yet
18:23:00 <mjg> ye ok
18:24:00 <mjg> PESSIM^Wmakes sense
18:26:00 <heat> OH this is actually not a race here, i lock the last parent dir's inode shared
18:26:00 <heat> so i can't just unlink it while open is looking at it
18:26:00 <heat> this might be a problem for other syscalls though, but not open
18:30:00 <mjg> so are you faster than illumos at path lookup?
18:30:00 <mjg> you very plausibly already are
18:30:00 <mjg> since they take mutexen all the way
18:33:00 <mjg> tell you what mofo give me an up to date snap
18:59:00 <heat> what for
19:00:00 * geist yawns
19:01:00 <heat> hello geist
19:01:00 <heat> you're safe, the fireworks are gone
19:01:00 <geist> the explosions continued far into the night
19:01:00 <heat> ohno
19:01:00 <geist> like 3am
19:07:00 <zid> win any fingers?
19:25:00 <geist> still have all of em!
19:50:00 <heat> there's a particularly awful trick i need to pull off here with procfs
19:50:00 <heat> pid entries and associated subentries need to have lazy inode numbers
19:50:00 <heat> basically schordinger's inode :)
19:57:00 <geist> i ended up spending like 2 hours yesterday walking through btrfs data structures
19:57:00 <geist> the btrfs inspect-filesystem command is really really useful
19:57:00 <geist> i encourage anyone designing their own FS to do something similar
19:57:00 <heat> what is it?
19:58:00 <geist> i think i'll brush off my old btree project and finish it off
19:58:00 <heat> is it debugfs for weirdos
19:58:00 <geist> it's a command line, the btrfs tool does everything command line wise, but it also has a 'dump all of the data structures' usage
19:58:00 <geist> with tons of switches to let you control what to see
19:58:00 <heat> ah yeah okay debugfs for weirdos nice
19:58:00 <geist> so you can basically dump any of the internal trees
19:59:00 <heat> yeah xfs also has one, debugfs is ext2/3/4's version
19:59:00 <heat> it is really really handy
19:59:00 <nikolapdp> geist you have a btree fs?
20:00:00 <geist> ah didn't know about debugfs
20:00:00 <geist> nikolapdp: no but... if you have a btree what best to do with it!
20:00:00 <heat> yeah ermine was using it the other day to save his corrupted fs
20:00:00 <nikolapdp> geist, well an fs or a database :)
20:00:00 <geist> but also would be interesting to take a mature btree and apply it to things like VM data structures, since what works best with btrees than a single block size (pages)
20:02:00 <heat> yeah that's basically the maple tree
20:02:00 <heat> fully RCU-able btree
20:04:00 <nikolapdp> yeah tree structures are nice
20:09:00 <geist> yah trouble i've generally found is there aren't a lot of good non GPL generic btree libraries around AFAICT
20:09:00 <geist> plus it's fun to build something like that
20:10:00 <heat> become GPL-pilled geist
20:10:00 <geist> noooo!
20:10:00 <heat> GNU/LittleKernel
20:10:00 * geist bats it away
20:11:00 <heat> what spelling of littlekernel do you prefer?
20:11:00 <heat> LittleKernel? littlekernel? lk?
20:11:00 <geist> good question, i wasn't thinking much about it
20:11:00 <nikolapdp> most often you refer to it as lk
20:11:00 <heat> lk is a little hard to explain to random people
20:11:00 <gog> hi
20:12:00 <nikolapdp> oi
20:12:00 <geist> yah that's the problem. i mean i'm terrible at naming things so i tend to name it the first thing i think of
20:12:00 <geist> heck i have a previous kernel i never released called `muffle`
20:12:00 <gog> i'm very good at naming things you should have asked me
20:12:00 <geist> because, i dunno wasn't thinking
20:12:00 <geist> everything thinks lk == linux kernel
20:12:00 <nikolapdp> geist are you referring to a c++ btree library?
20:12:00 <geist> or C
20:12:00 <gog> NewOS
20:12:00 <nikolapdp> lel
20:13:00 <gog> oh wait that one was already taken
20:13:00 <gog> by you
20:13:00 <nikolapdp> geist well if you find a c one, i'd be curious to take a look
20:13:00 <geist> but yeah, i have it in C++ now, so you ca templatize it
20:13:00 <heat> haha muffle sounds like a fun name for a... javascript framework?
20:13:00 <geist> it was a little µkernel i was fiddling with for a few weekends, more L4 like with very minimal interface
20:13:00 <gog> i'm gonna write a kernel in java called toebeans
20:14:00 <gog> i was not just looking at breki's paws
20:14:00 <geist> got it kinda working but then abandoned it and started on a new line of little kernels, uos, and uos2
20:14:00 <nikolapdp> uh java
20:14:00 <geist> and then went a little bigger, hence 'little kernel' vs 'µos'
20:14:00 <gog> yes jav a do you have a problem with that
20:14:00 <gog> it's no more stupid than my c# idea
20:14:00 <geist> at the time (about 2005) i was thinking about the L4 style of microkernel a lot
20:14:00 <nikolapdp> i mean c# is just ms java so :P
20:14:00 <geist> LK was started out of the guts of uos2
20:14:00 <gog> well, maybe more stupid because i _do_ have a compiler for native c#
20:15:00 <gog> it just doesn't have a feature i need and i don't have the nenn to try to figure out how to write it myself
20:15:00 <geist> actually i may have done muffle after uos. may have bee uos, uos2, muffle, littlekernel
20:15:00 <geist> but those were like weekend projects, just a basic hello world with some basic context switching
20:15:00 <geist> on qemu on arm, so it was very fast to get them going
20:16:00 <geist> that's when i started really following the gospel of booting with `-kernel ` and not fucking around with bootloaders and whatnot
20:16:00 <geist> just load your shit and go, dont worry about booting on real things, get to the meat of it, play with ideas, discard them, start over, repeat until you find what you like
20:17:00 <geist> people get so fixated on sequentially implementing everything perfectly, but the key is to move fast and try out ideas and retry, you learn a hell of a lot more that way
20:28:00 <kof673> well, on top of that too...sequential means can get stalled on something. insert pipeline metaphor :D
20:29:00 <kof673> or dsp :D
20:30:00 <geist> right
20:30:00 <geist> it's a problem i've seen here over and over again
20:30:00 <geist> *especially* getting stuck on the x86 bootloader problem. not as much lately since grub is more mature
20:30:00 <geist> but in the earlier days it was the classic trap
20:31:00 <zid> noo my bootloader should be BETTER than grub
20:31:00 <zid> and I'm not allowed to write any real OS code until it is
20:31:00 <zid> how dare you geist :(
20:31:00 <geist> exactly
20:31:00 <geist> bcos i think was really stuck in that trap
20:31:00 <geist> spent like 5 years trying to build the perfect bootloader
20:31:00 <geist> no idea if they ever finished it, but i seriously doubt it
20:31:00 <zid> I spent 5 days getting ayame onscreen and then gave up once I'd achieved it
20:32:00 <geist> they had like antialiased truetype fond rendering in their bootloader
20:32:00 <nikolapdp> what's ayame
20:32:00 <zid> https://static.wikia.nocookie.net/virtualyoutuber/images/0/09/Nakiri_Ayame_Portrait.png/revision/latest?cb=20190215184953
20:32:00 <nikolapdp> should've guessed
20:33:00 <kof673> i'm not saying i am anywhere near...reliable...got 99 problems but lack of something to work on is not one :D
20:36:00 <geist> i'm pretty bad at starting something, doing all the fun parts, but not really doing the polish and commiting at the end
20:37:00 <geist> i think having to do that a work where the process is so slow sours the taste a bit
20:37:00 <zid> I am doing it *for* fun
20:37:00 <zid> so that's inevitable
20:37:00 <geist> plus i think i like the act of programming more so than getting things done
20:43:00 <nikolapdp> understandable geist
20:43:00 <geist> like it's pleasing to get in the zone and do something, that feels nice
20:50:00 <kof673> does anyone use smallerc? i am just screwing around adding targets to "test" little programs...it does not matter, just it does not like my compiler invocation -dos_foo -mac -win, generates elf always...so i call the linker manually object(s) -> executable, to get proper executable (for dos, mac)
20:50:00 <kof673> i think it is just picky about argument order :/
20:51:00 <kof673> -v shows, it does not even invoke the linker :/ it seems fixed but...why is it doing this? who knows
20:57:00 <kof673> dos/dosemu of course is totally robust, it looks at the contents, not file extension j/k it segfautls lol
20:57:00 <kof673> *segfaults
21:51:00 <geist> hmm, no
22:13:00 <heat> hah here's a fun fact: you can proactively reclaim memory in linux using e.g echo "1G" > /sys/fs/cgroup/memory.reclaim
22:14:00 <nikolapdp> what does that do exactly
22:15:00 <geist> oh cute. i have used the other switch to dump the file cache and whatnot
22:16:00 <heat> nikolapdp, it reclaims memory
22:16:00 <heat> i have no other way of describing this
22:16:00 <heat> like, it takes the amount of memory you asked for and literally frees it. it stays in the page allocator
22:17:00 <heat> vs the normal mode of allocation where linux does not proactively reclaim memory, but rather acts on memory pressure (which is when you get the horrible deadlocking, etc)
22:17:00 <nikolapdp> interesting
22:17:00 <geist> is it a one time actuion, or is setting that 1G there actually trying to set a cap on that cgroup?
22:17:00 <heat> one time
22:18:00 <geist> makessense, so it's running the normal reclaimation to that threshold
22:18:00 <heat> i'm 99% sure you can set caps on memcgs but that's another mechanism
22:19:00 <geist> on cgroups too it must be tracking what pages belong to what
22:19:00 <geist> though since on linux most of them are anonymous, it's easy to do so
22:19:00 <heat> yep
22:19:00 <heat> memory cgs keep their own LRU lists of pages
22:19:00 <geist> that would makes sense
22:20:00 <geist> on the topic of reclaimation, now that i have my proxmox box loaded up the integrated memory ballooning is really nice
22:20:00 <geist> works exactly as expected, and to a linux client if you're watching it with top you basically see total memory move around
22:20:00 <geist> you can even set relative priority between the VMs
22:22:00 <nikolapdp> oh that's fancy
22:22:00 <geist> not a thing you'd probably want to do in production, but it's nice for overcommiting a box with lots of test OSes and whatnot
22:23:00 <geist> and there's even client balloon drivers for windows
22:23:00 <heat> overcommit is so based
22:23:00 <heat> it's like being heavily in credit card debt and paying off cc debt with more cc debt
22:23:00 <geist> i basically have one main VM that used to be the thing i ran on the box that i set to high priority
22:23:00 <geist> so when i'm using it its more or less the same as before
22:23:00 <nikolapdp> heat how's that analogy based
22:24:00 <geist> but then i can switch over and futz with the other ones which will slowly drain memory out of the others
22:24:00 <heat> nikolapdp, because when banks do it it's economy 101, when people do it it's financially irresponsible, when kernels do it it's MEGA BASED LETS GO
22:25:00 <geist> like i said it'd be irresponsible on production
22:25:00 <kof673> ^^^ just saying depends on who/where you ask :D semi-related, i notice old osen/etc. just malloc() in a ghetto attempt to see how much RAM there is...guess what linux does? overflows size_t :D i am guessing if you don't actually write to the areas, it is just "bookkeeping" but :D
22:25:00 <geist> since your production systems are presumably sized for the task, and having the size change owuldn't be a good idea
22:25:00 <heat> overcommit is not irresponsible
22:25:00 <kof673> *if you just repeatedly malloc()
22:25:00 <heat> i'm joking around but overcommit is key and pretty fine
22:25:00 <heat> it just depends on how hard you're overcommitting the thing
22:26:00 <geist> yah and i can overcommit the cpu like crazy, because the nature of it i'm not really doing more than one thing at a time in any given OS
22:28:00 <kof673> *count overflows, it perhaps just goes forever
22:28:00 <nikolapdp> yeah but overcommitting memory will hurt eventually