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
gbowne1 has quit [Remote host closed the connection]
gbowne1 has joined #osdev
Arthuria has joined #osdev
qxz2 has joined #osdev
<qxz2> there probably isn't much harm from calling a function that uses a mutex from a context where there are no threads, correct?
zxrom has joined #osdev
masoudd__ has quit [Quit: Leaving]
epony has joined #osdev
<heat> qxz2, idk? more context?
<heat> define harm
<heat> what system are you talking about?
<qxz2> say like a logging function that's called from multithreaded contexts and contexts where there's no concurrency
bauen1 has joined #osdev
<heat> well, no, there's no problem there
<heat> you'll be *slightly* slower as you still take a lock, but it's uncontended so, mostly negligible
<moon-child> iirc glibc will actually skip doing that if you haven't created any threads yet
<qxz2> yeah that's what i figured. thanks for your response
<zid> good news, every word in the Ship of Theseus article on wikipedia has now been replaced since the article was created
<heat> moon-child, yeah looks like it
Arthuria has quit [Remote host closed the connection]
PublicWiFi has quit [Ping timeout: 276 seconds]
Arthuria has joined #osdev
Arthuria has quit [Remote host closed the connection]
navi has quit [Quit: WeeChat 4.0.4]
epony has quit [Remote host closed the connection]
epony has joined #osdev
<epony> did you actually know who Theseus was before that?
<epony> (std answer one of the argo naughts)
<epony> -agro-
<epony> but how did you compare, diff by word.. so there are no collisions (matches for uchg)?
<epony> and you'd think ancient Greek mythologemastia should be.. exempt from politcorr? you're so very ##Wrong
<epony> teh Latent epmyre ojbects
exit70 has joined #osdev
epony has quit [Remote host closed the connection]
epony has joined #osdev
skipwich_ has quit [Quit: DISCONNECT]
skipwich has joined #osdev
goliath has quit [Quit: SIGSEGV]
Yoofie1 has joined #osdev
Yoofie has quit [Ping timeout: 264 seconds]
Yoofie1 is now known as Yoofie
<moon-child> hi epony welcome back b <3
<zid> don't encourage it
<geist> saw some post on discord about how over the last so many years 100% of the words in the wikipedia article on Ship of Theseus has been replaced
<zid> I beat you to it geist
<geist> ah maybe that was you then
<zid> check 2 hours ago, here :P
<geist> oh yeah i see
<geist> https://wikis.world/@wikipedia/111587024591220062 is probably the original
<bslsk05> ​<Wikipedia> Here's how the "Ship of Theseus" page looked in July 2003 when it was first created! Since then, the article has been edited 1792 times. 0% of its original phrases remain. https://cdn.masto.host/wikisworld/media_attachments/files/111/587/002/680/243/749/original/a14f92f74ab0dc66.png [A Wikipedia page for Ship of Theseus is shown. The article reads "According to an ancient Greek legend, Theseus had a warship that was preserved as a historic
<heat> maybe you mandela effected from a multiverse where #osdev is on discord
<zid> we should find a category of meme to give to geist to repost here, factorio maybe?
<geist> VAAAAAAX
<zid> vax *is* a meme, I'll grant you that
<heat> vax rust vax rust cargo
<geist> $ gtelnet mvax
<geist> Connected to mvax.
<geist> Welcome to OpenVMS (TM) VAX Operating System, Version V7.3
<geist> Trying 192.168.0.42...
<geist> mwahaha
<zid> archaic = doesn't support rust
<zid> bronze age, basically
<geist> hmm, i should see if there's some sort of irc client for this
<zid> telnet is good enough
<zid> do ircds typically strip IAC?
<geist> what's IAC?
<heat> C is going to get bronze aged by RUST
<zid> I've connected to irc a few times with a telnet client, but I've never had anybody send me an IAC SHOULD TERMTYPE IAC or anything
<zid> 0xFF
<geist> oh oh yeah last i checked at least freenode had the PING PONG set really low
<geist> like once a minute
<geist> haven't actually tried on libera
<zid> heat: I'm going to make a succesor to C that rivals rust, called patina
pretty_dumm_guy has quit [Quit: WeeChat 3.5]
<heat> is it just a new name for zidc?
<zid> yea basically
<zid> remove w, can dereference pointers to structs with incomplete members, enum types are type checked, etc
Arthuria has joined #osdev
<zid> null must be (void *)
<zid> and some other stuff I likely forgot
<heat> null is now guaranteed to not have the 0 bitpattern
<moon-child> how generous of wg14
edr has quit [Quit: Leaving]
<geist> WG14 the tagger?
<zid> working group 1914?
<moon-child> zid: wait what's w
<heat> wprintf, etc
<zid> wvacstombsrintf
<geist> ah no, WD14 is the tagger
<moon-child> oh that w
<moon-child> but how will I live without glibc's optimised wmemcpy
<heat> why is wmemcpy not "shl $2, %rdx; jmp memcpy"?
<moon-child> don't need as many special cases for small lengths
<zid> how does wshit handle nuls btw, is it just two?
<moon-child> two what?
<zid> nuls
<moon-child> why would it be
<zid> it's like BEL or LF, but it ends strings
<moon-child> it's one null wchar
<zid> cus it's WIDE
<geist> yah seems that memcpy would be the same, but then of course wstrcpy needs special code to handle w
<zid> so yes, it's two
<zid> that's the only reason printf woudln't just work then I guess
<moon-child> only on w indows
\Test_User has quit [Ping timeout: 260 seconds]
<zid> and codepoints with 0x00xx or 0xx00
<moon-child> ?
<geist> sure but if it were uft8 it wouldn't be w
<geist> i think the point being that the 'w' stuff is when using something like ucs2 or ucs4 right?
<zid> I was thinking more 'some random 16bit chars'
<heat> yeah geist
<zid> than unicode, cus unicode is *mostly* nul clean already as far as I know
<heat> it's utf-32 on everything except windows AFAIK
<zid> it's just the terminator that'd be an issue sometimes
<geist> i mean honestly on modern machiens a 32bit char seems like a great solution
<geist> just go for it, deal with the endian issues and make it nice a clean and fast
<moon-child> meh
<heat> youuu teee efff eight
<moon-child> I mean the question is what ar eyou actually doing with strings
<geist> windows going all ucs2 is much malinged but i think it was just a bit too early
<moon-child> most of the time unless you're writing a text renderer all you're doing is concatenating, reading/writing, or maybe doing substring searches. all of which don't care about the actual textual representation
<geist> the *idea* is pretty solid
<heat> rust's .chars() iterator converts the whole string to codepoints
<geist> nice thing with something W is you're not having to do all the utf8 conversions when counting size, finding boundaries, etc
<zid> yea, you should basically never ever inspect random text yourself
<zid> only leads to bugs, hi apple
<moon-child> remember the thing in apple's libc where it literally shells out to like perl or something
<zid> (They tried to cut off text that would overflow the notification bar by just chopping after so many bytes and adding ...)
<heat> thats for regex
<zid> This bricks the arabic.
<epony> moon-child, greetings and best regards
Arthuria has quit [Remote host closed the connection]
<epony> the bigger joke is about the location of the actual Troy where the famous horse was used as a stage in primitive "turn based" strategy game
netbsduser has joined #osdev
<epony> cause everybody knows C is too large to fit in 8bit CPUs of the early 80ies, and Rust is not fitting on 32bit machines either ;-)
<epony> "you keep trying"
<epony> these boots are made for walking..
fkrauthan has quit [Quit: ZNC - https://znc.in]
fkrauthan has joined #osdev
linear_cannon has quit [Ping timeout: 256 seconds]
netbsduser has quit [Ping timeout: 276 seconds]
netbsduser has joined #osdev
heat has quit [Ping timeout: 256 seconds]
netbsduser has quit [Ping timeout: 255 seconds]
netbsduser has joined #osdev
antranigv has quit [Ping timeout: 264 seconds]
antranigv has joined #osdev
netbsduser has quit [Ping timeout: 268 seconds]
netbsduser has joined #osdev
netbsduser has quit [Ping timeout: 264 seconds]
rustyy has joined #osdev
theruran has quit [Quit: Connection closed for inactivity]
jjuran has quit [Read error: Connection reset by peer]
jjuran has joined #osdev
ThinkT510 has quit [Remote host closed the connection]
ThinkT510 has joined #osdev
Starfoxxes has quit [Ping timeout: 264 seconds]
jjuran has quit [Quit: Killing Colloquy first, before it kills me…]
jjuran has joined #osdev
gbowne1 has quit [Quit: Leaving]
epony has quit [Remote host closed the connection]
epony has joined #osdev
vdamewood has joined #osdev
GeDaMo has joined #osdev
stolen has joined #osdev
masoudd has joined #osdev
heat has joined #osdev
Nixkernal has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
zxrom has quit [Read error: Connection reset by peer]
kof123 has joined #osdev
zxrom has joined #osdev
Nixkernal has joined #osdev
Nixkernal has quit [Client Quit]
Nixkernal has joined #osdev
srjek|home has quit [Ping timeout: 259 seconds]
Left_Turn has joined #osdev
Nixkernal has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
Nixkernal has joined #osdev
goliath has joined #osdev
GeDaMo has quit [Ping timeout: 256 seconds]
zxrom_ has joined #osdev
zxrom has quit [Ping timeout: 252 seconds]
stolen has quit [Quit: Connection closed for inactivity]
pretty_dumm_guy has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
gog has joined #osdev
alfplayer has quit [Ping timeout: 240 seconds]
heat has quit [Remote host closed the connection]
heat has joined #osdev
alfplayer has joined #osdev
arminweigl has quit [Quit: ZNC - https://znc.in]
arminweigl has joined #osdev
duckworld has quit [Quit: No Ping reply in 180 seconds.]
duckworld has joined #osdev
MrBonkers has quit [Remote host closed the connection]
MrBonkers has joined #osdev
FreeFull has quit [Ping timeout: 252 seconds]
FreeFull has joined #osdev
Bitweasil has quit [Quit: ZNC 1.8.2+deb2build5 - https://znc.in]
Bitweasil has joined #osdev
moberg1 has quit [Quit: Disconnecting]
moberg has joined #osdev
MiningMarsh has quit [Quit: ZNC 1.8.2 - https://znc.in]
MiningMarsh has joined #osdev
Left_Turn has quit [Remote host closed the connection]
Left_Turn has joined #osdev
navi has joined #osdev
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 268 seconds]
heat has quit [Remote host closed the connection]
heat has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
GeDaMo has joined #osdev
sortie has quit [Quit: Leaving]
vdamewood has quit [Quit: Textual IRC Client: www.textualapp.com]
netbsduser has joined #osdev
sortie has joined #osdev
vdamewood has joined #osdev
Starfoxxes has joined #osdev
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
GeDaMo has joined #osdev
epony has quit [Ping timeout: 264 seconds]
epony has joined #osdev
Turn_Left has quit [Ping timeout: 252 seconds]
Arthuria has joined #osdev
tomaw- has joined #osdev
rustyy has quit [Quit: leaving]
Turn_Left has joined #osdev
Arthuria has quit [Ping timeout: 268 seconds]
rustyy has joined #osdev
tomaw has quit [Ping timeout: 624 seconds]
tomaw- is now known as tomaw
goliath has quit [Quit: SIGSEGV]
frkazoid333 has quit [Ping timeout: 260 seconds]
frkazoid333 has joined #osdev
heat has quit [Read error: Connection reset by peer]
heat has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
srjek|home has joined #osdev
epony has quit [Remote host closed the connection]
epony has joined #osdev
Arthuria has joined #osdev
Brnocrist has quit [Ping timeout: 240 seconds]
Brnocrist has joined #osdev
xenos1984 has quit [Ping timeout: 256 seconds]
xenos1984 has joined #osdev
<zid> day16 was too easy what do I do with myself now
<gog> meow
<zid> oh whoa gog is back
<zid> hi gog
<gog> hi zid
masoudd_ has joined #osdev
<gog> zid
<gog> are you competent with regular expressions
<gog> i know a thing or two but i'm well below competent
<Ermine> long time no see, gog
<bslsk05> ​regex101.com: regex101: build, test, and debug regex
* gog prr at Ermine
* Ermine pets gog
<gog> yes i'm using that rn to try to figure out my problem
<gog> and i've mostly gotten there
<gog> i just need to figure out how to make negative lookahead match nothing if a pattern matches
<Ermine> Imo everyone uses their own dialects
<zid> I know a thing or two
<zid> I use it to cheat at wordle
<zid> ^(?=.*s)(?!.*i)(?!.*r)(?!.*e)[^s][^i][^r][^e]n$
masoudd has quit [Ping timeout: 264 seconds]
<heat> gotten?
<heat> it's supposed to be gotts gog
<heat> not gotten!
<zid> gotten is an americanism but has sneaked into british english
<zid> I use it, and I hate it
<bslsk05> ​regex101.com: regex101: build, test, and debug regex
<gog> the very last line i want to not match, but because of the 52:20
<zid> You're trying to group times? nice
<heat> regex was a mistake
<gog> it's more like i'm trying to allow anything that looks like a time and has the right number of digits in the right sequence
<gog> it doesn't have to be fully sensible
<gog> just has to reject obviously wrong times
gorgonical has quit [Ping timeout: 260 seconds]
<zid> I'd just you know
<zid> parse this
<zid> instead of using regular sexpressions
<gog> i guess i could do that too
<gog> but the easiest solution is to fix the regex i already have there because the form component i'm using already does this for me and i don't have to write more code in a thing that already is janky
<gog> idk
<gog> and none of the time formats we get back are consistent and we have no reasonable way to make them consistent
<zid> (hour):(minute)(AM|PM) then mechanically filter
<zid> rather than tring to do it all in regex
<zid> seems the nicest
<gog> i want to not add parsing code though
<gog> i want to not add code to this
<zid> disgusting
<gog> adding code means i need to test it
<gog> i don't want to test it
<gog> i don't even want to fix it but i broke it
<heat> HAVE YOU TRIED
<heat> USING CODE
<gog> i will not
<gog> you cannot make me use code
<gog> code is of the devil and i am a godly woman
<gog> begone satan
<heat> regex is of the devil
<heat> code is chaotic neutral
<zid> yea this is a fucking mess
<zid> you need to add all the cases by hand
<zid> copy pasting the regex
<zid> or you end up with fucking nonsensical capture groups
<zid> I got as far as (([0-9][0-2]|[0-9]):[0-5][0-9][ ]*PM|.*([0-2][0-9]|[0-9]):[0-5][0-9][ ]*AM) then gave up
* vdamewood gives gog a fishy
* gog chomp fishy
<gog> (?:(?:(?:\b(?:[1-9]|[01]\d|2[0-3])):(?:[0-5]\d)(?:\s*[AaPp][mM])?(?:\s*-\s*)?){1,2})
<gog> look at this abomination
<gog> it still matches one of my must nots
<gog> buuut i think it's good enough
<heat> this is gibberish
<heat> you can't explain it
traged has joined #osdev
<gog> i cannot
<bslsk05> ​redirect -> www.reddit.com: Blocked
<gog> i'm just playing with match groups
<heat> zid, lmao thanks mudryk, very cool
xenos1984 has quit [Ping timeout: 268 seconds]
<heat> zid, that mofo cost 70 million EUR
<zid> so do I
<gog> i'm only 69EUR
<heat> tell todd boehly you're peter crouch
<zid> I am
<heat> you'll get a contract for 8 year 200k pw
netbsduser has quit [Ping timeout: 276 seconds]
<heat> gosh the more i look at that clip
<heat> what the fuck was his idea
elastic_dog has quit [Ping timeout: 256 seconds]
<zid> He was listening to girei from the naruto ost
<zid> and it depressed him
<zid> true fact
netbsduser has joined #osdev
xenos1984 has joined #osdev
elastic_dog has joined #osdev
traged has quit [Quit: WeeChat 4.1.2]
traged has joined #osdev
<epony> hollyc
<epony> an eponyholic and a rustyholic walk into a bar..
<epony> reactor shutdown engaged, imminent meltdown, autospectre zomgbieunleaded
<Ermine> .. and bartender said, "We do not sell alcohol to minors"
<epony> only theorem provers and other q&a shit
<zid> It's time for, chinese takeaway
vdamewood has quit [Quit: Textual IRC Client: www.textualapp.com]
Arthuria has quit [Remote host closed the connection]
masoudd__ has joined #osdev
masoudd_ has quit [Read error: Connection reset by peer]
traged has quit [Quit: WeeChat 4.1.2]
masoudd__ has quit [Quit: Leaving]
zxrom_ has quit [Quit: Leaving]
masoudd has joined #osdev
epony has quit [Remote host closed the connection]
heat_ has joined #osdev
heat has quit [Read error: Connection reset by peer]
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
masoudd_ has joined #osdev
masoudd has quit [Ping timeout: 252 seconds]
heat has joined #osdev
pretty_dumm_guy has quit [Ping timeout: 264 seconds]
heat_ has quit [Ping timeout: 256 seconds]
pretty_dumm_guy has joined #osdev
epony has joined #osdev
<heat> zid zid zid zi dzid zid zid
<heat> check this out
<heat> *robust = a->__attr / 4U % 2;
<heat> tadaaaaaaa
<zid> what is it
<heat> musl
<zid> ah
gbowne1 has joined #osdev
<zid> I wondered where you'd get such robust code
<heat> you have heard of replacing divisions with bitops
<heat> now lo and behold, replacing bitops with integer division
<heat> musl is a giant ioccc submission
zxrom has joined #osdev
gbowne1 has quit [Remote host closed the connection]
gbowne1 has joined #osdev
<mcrod> hi
<heat> mcrod, *robust = a->__attr / 4U % 2;
<heat> what does this do
<heat> now THIS should be your interview question
sbalmos has quit [Ping timeout: 240 seconds]
sbalmos has joined #osdev
<mcrod> i feel like this is some trick question
<epony> using the robust variable makes it memory safe, rust says
<heat> it is not
<epony> yes, it's robusta
<heat> saying "it divides ... by ..." is the wrong answer btw
<geist> has anyone just been telling an AI to solve their advent problems?
<mcrod> (a->__attr / 4U) % 2
<heat> that's not helping me mcrod
<kof123> guess... /4 ~= >> 2, %2 checking if odd ala & 1 seems they could just mask the bits they interested in?
<heat> yep kof123, exactly
<geist> yah it looks like a bit test of bit 2
<heat> BITOPS AS DIVISION
<epony> is this the adventure of oom coocode yet time of the (y)ears
<mcrod> ahhhhhhhhhh
<mcrod> ok ok
<mcrod> tes
<mcrod> *yes
<geist> well, i think it's slightly more than a mask
<geist> it's shifting the bit over, then masking it. so the result is precisely 0 or 1
<heat> yep
<geist> vs just anding a mask
<kof123> yeah, the %2 is just 1 bit, i mean shift and mask
<geist> obvious equivalent: ((a >> 2) & 1)
<kof123> i would guess modern compilers will "optimize"....ack i think you can even do if (0) { } it will keep it :D
<heat> but that would be too obvious
<geist> annoying equivalent: (a & (1 << 2)) ? 1 : 0
<heat> if the solution is too obvious you lose ioccc
<kof123> so an old compiler...might even divide and remainder...
<geist> since this is C i dunno what the type of *robust is, but it's probably an int or char, as a bool?
<heat> int yeah
<geist> then you get into the very real issue of whether orn ot it is hard fixed at 0 or 1, or is it 0 and !0
<geist> i've seen various C bugs slip in because of that before
<geist> assinging some non zero to and int-as-a-bool, and then later on some code does something like foo == true
<geist> where true is 1
<geist> one of the reasons i'm a little leery of generally using == true and == false
<geist> C++ bool type solves this
<epony> the difference is, a new compiler sometimes can work too, but an old compiler does not have these optimisations available, you have to do it
<epony> s/robust/todoit/g
<heat> yeah
<kof123> i have to make one quick joke for gog > you cannot make me use code goggins... it is all code :D > He was in Bethany, “the place where John was at the first baptizing” (cf. John i. 28 with John x. 40, 41), but it took him two more days to get there at this particular time. > Mad Hatter: “Well, no wonder you are late. Why, this clock is exactly two days slow!” White Rabbit: “Two days slow?!” Mad Hatter
<kof123> : “Of course you are late! The White Rabbit is late as usual and the Hatter explains that his watch is two days slow. > Usually, a full Moon arrives a few days to weeks before or after the equinox
<heat> tbf == true and == false is a codesmell IMO
<heat> and my clang-tidy screams THIS IS REDUNDANT
<heat> (in C++, in C it probably doesn't in these situations)
<Ermine> heat: at my $dayjob I saw return cond? true : false
<geist> ashl %r0,4(%ap),%r0; bicb2 $254,%r0
<geist> oh better: rotl $30,4(%ap),%r0; bicl2 $-2,%r0
<geist> name that arch!
<Ermine> this arch has bicycles
<heat> geist, vax?
<geist> vAAAAAAX
<heat> VAAAAAAAAAAAAAAAAAAAAAAAAX
<geist> VAAAAAAAAAAX
<Ermine> heat: which dates does git blame give on that file?
<netbsduser> i am rearchitecting waiting in my kernel to do away with a big lock around areas of it
<Ermine> heat: I think I should to peek at fbsd libc at some point
<netbsduser> in order to scale on modern multiprocessors and not on vaxen i must do this
<geist> netbsduser: oh you'll be happy to note i have netbsd 1.5.3 happily installed on my VAXServer
<heat> Ermine, 10-11 years ago
<geist> it seems to be a decent vintage netbsd. not too new to be too slow, not too old to be completely useless
<mjg> you don't have a netbsd on a modern amd64 machine tho
<bslsk05> ​gnats.netbsd.org: NetBSD Problem Report #57661: Crash when booting on Xeon Silver 4416+ in KVM/Qemu
<mjg> :X
<geist> i do actually
<heat> netbsduser, will-it-scale, will-it-scale, will-it-scale
<geist> but it's on an AMD machine, proper
<heat> when are you getting flamegraphen
<netbsduser> one nice trick to identify a good lock ordering for atomic waits for several things to simultaneously become acquirable is to quicksort your pointers to the objects and use that for your lock ordering
<netbsduser> geist: great choice, i wonder how highly it ranks among the slowest systems to run netbsd
<geist> it's usable. you really feel it when compiling
<geist> but think of it as being approximately as fast as say a 20mhz 486
<geist> but with 32MB ram so it's not really under that much memory pressure, with a netbsd that old at least
<heat> netbsduser, ... how many things are you locking at once
<heat> and why is higher than 2 at any moment in time
<geist> average command line binaries have fairly small footprint (<500KB,etc)
<Ermine> geist: how much does it consume
<geist> consume what?
<Ermine> ram
<heat> 512 byte pages are ideal
<geist> not too much. i think the kernel shaves off about 3 or 4, once the handful of things have started i think it's maybe 8MB out of 32MB used
<netbsduser> heat: for atomic waits which are to be satisfied only when everything the thread is waiting for is available, everything that the thread is waiting for
<geist> unclear if it's using 512 byte pages. netbsd at this point may be treating them as 4K
<heat> netbsduser, but you don't need lock ordering for waits
<Ermine> iirc windows can pages with different sizes
<mjg> that's a mid-00s tech
<mjg> at best
<geist> oh much less than that actually
<netbsduser> you do if you want to lock everything simultaneously so you can poll all their availability atomically, and then every time that one of them becomes available
<heat> but you don't need that
<netbsduser> i had it before and i would hate to sacrifice a feature
<heat> why do you want that?
<heat> that's not a feature, it's a horrific lock warcrime
<netbsduser> originally i anticipated using it to acquire multiple mutexes or similar atomically so i don't need to have regard to their rank
<bslsk05> ​IRCCloud pastebin | Raw link: https://irccloud.com/pastebin/raw/hn5Asbpi
<geist> so actually only down about 2.5MB
<netbsduser> but in practice you have two cases where you need to acquire multiple mutexes
<zid> I use 1 byte pages
<heat> THATS SO OPTIMAL
<netbsduser> in the one case, you also have ownership semantics mixed in, and you've got to acquire them in a specific order in order to even know safely what the next one you've got to acquire is
<geist> yah it's using virtual 4K pages i think: hw.pagesize = 4096
<geist> from sysctl
<heat> bastards
<netbsduser> in the other case, probably locks protecting "sibling" objects, you can use the same principle of letting lock order equal pointer address order. so it is a probably useless feature to have atomic acquisition of multiple mutexes
<heat> guess you need those for some filesystems? if they have the block size <= page size restriction
<netbsduser> i don't think it's currently possible in netbsd to have the contrary
<netbsduser> i haven't looked very thoroughly or indeed at all but i'm sure i would've seen provision for that case if it did, having looked through uvm a few times
<geist> hmm i dont haved it booted but i also have a sparc64 install on netbsd
<geist> i think that uses 8k pages hardware
<geist> but then i think by default FFS uses 8k blocks (with 1k fragments)
<heat> netbsduser, anyway yeah qsort ordering for locks is exquisitely overkill :v
gildasio has quit [Ping timeout: 240 seconds]
<netbsduser> heat: it will be a race against time to see whether i can implement my entire solution for the problem of atomic waits for several waitables in what's left of this day
* geist queues late night hacking montage music
<netbsduser> if i don't do it tonight, i will probably forget the solutions i figured out to it after i've slept
<heat> in heat news: i'm unfucking writeback
<heat> we're making this usable baybee
<heat> my solution is exquisitely linux
gildasio has joined #osdev
<heat> it is my duty as a dollar-store-linux vendor
<geist> https://youtu.be/x5faT66jmG4 is the 'get it done' music track
<bslsk05> ​'In Motion (HD) - From the Soundtrack to "The Social Network"' by CookieAdventures (00:05:02)
<netbsduser> all this for a "feature" i will have to avoid because it pessimises everyone else dealing with the waitables (since if you make a waitable ready when it's got a waiter on it doing this, the readiness notification then has to lock everything else that waiter is waiting on and test whether they're all ready)
<netbsduser> but every kernel needs some personality
<heat> fyi many common linux objects have lock-free waiting
<heat> pipe polling for instance is lock-free
<netbsduser> how about if you put a pipe into an ePoll? or indeed a select()/poll()
<heat> yeah, lock free
<netbsduser> is there a writeup on it?
<heat> i don't think so
<bslsk05> ​elixir.bootlin.com: pipe.c - fs/pipe.c - Linux source code (v6.6.7) - Bootlin
<heat> note that poll_wait locks once per poll(2) run
<heat> but that's unavoidable really, i think
Brnocrist has quit [Ping timeout: 252 seconds]
<heat> ... yeah in retrospective it's not quite lock free is it
<heat> but it's less locky than one would naively do
<Ermine> how to implement pselect/ppoll in microkernal
<gog> context switching
<gog> forever
<heat> Ermine, normally
<Ermine> one needs to atomically switch signal mask in one place and request select/poll in another
gildasio has quit [Remote host closed the connection]
<heat> you probably don't need to context switch at all
gildasio has joined #osdev
<heat> as long as you just have an object that can get signalled
<heat> maybe sticky signalled, maybe edge signalled
<heat> s/edge/level/
gog has quit [Quit: byee]
pretty_dumm_guy has quit [Quit: WeeChat 3.5]
pretty_dumm_guy has joined #osdev
blockhead has joined #osdev
<netbsduser> i think i have an initial implementation of this
<netbsduser> but i'm not sure i cba making it first-class
\Test_User has joined #osdev
<netbsduser> it only works with synchronisation waitables and not condition waitables or event waitables
<netbsduser> and it doesn't do timeouts
heat has quit [Ping timeout: 240 seconds]
heat has joined #osdev
heat has quit [Read error: Connection reset by peer]
heat has joined #osdev
Turn_Left has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev