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 joined #osdev
heat has quit [Ping timeout: 246 seconds]
<geist> teh gog!
<gog> :3
heipiao233 has joined #osdev
<adder> meet my friend https://arcticadder.net/photo.jpeg
<zid> ur friend is upside down
<zid> reinstall it
<adder> will do
<zid> I has terrorist at home
<adder> terrorist no longer available
<adder> ah, stupid irc client
<adder> terrorist <3
<zid> She's currently on a defoliation campaign outside, to rout out either viet cong or mice, I forget which
<adder> must ask what's the invasion plan
<zid> Chewing all the grass
<geist> CAT
<zid> It's a shame she's tabby not orange, or we could rename her agent
Arthuria has quit [Ping timeout: 256 seconds]
goliath has quit [Quit: SIGSEGV]
navi has quit [Ping timeout: 268 seconds]
gog has quit [Ping timeout: 268 seconds]
vai has joined #osdev
heipiao233 has quit [Ping timeout: 268 seconds]
vai is now known as Jari--
Matt|home has joined #osdev
raphaelsc has quit [Remote host closed the connection]
nadja has quit [Ping timeout: 246 seconds]
nadja has joined #osdev
PublicWiFi has quit [Read error: Connection reset by peer]
PublicWiFi has joined #osdev
rustyy has quit [Quit: leaving]
rustyy has joined #osdev
Matt|home has quit [Quit: Leaving]
GeDaMo has joined #osdev
navi has joined #osdev
runxiyu_ has quit [Quit: ZNC 1.8.2+deb3.1 - https://znc.in]
GreaseMonkey has quit [Remote host closed the connection]
runxiyu_ has joined #osdev
gbowne1 has quit [Read error: Connection reset by peer]
<mjg> project i can happily contribute to https://liblol.aosc.io/
<bslsk05> ​liblol.aosc.io: libLoL
Vercas3 has quit [Remote host closed the connection]
chiselfuse has quit [Remote host closed the connection]
foudfou has quit [Remote host closed the connection]
Vercas3 has joined #osdev
foudfou has joined #osdev
chiselfuse has joined #osdev
netbsduser has joined #osdev
<klys_> my adventures with ovmf over the last few days have left me in the lurch. no video from qemu after compiling it.
<klys_> so when I first decided to compile it I had just got seabios done as Csm16.bin and the directions say to drop it into your ovmf tree.
<klys_> after compiling the latest ovmf it became apparent that isn't part of their tree anymore, and Csm has been patched out of head.
<klys_> the date on the patch is 2019, so I checked out a branch from 2018 called UDK2018
<klys_> compiling that and UDK2017 were both fruitless due to a linker bug, and the best advice I found was to downgrade gcc to gcc-4.9
<klys_> now it compiles and Csm16.bin appears to be firmly in place, and I have no video.
<klys_> CSM2018 requires a few other things such as acpica-tools, libpython2.7-stdlib, and g++-4.9-multilib
<klys_> gcc-4.9-multilib that is, except this package leaves my debian in an inconsistent state and I can't use apt in the meantime.
<klys_> I am running trixie here
<klys_> one of the convenient things about trixie is linux-libc-dev:all is not tied to an arch
Left_Turn has joined #osdev
<klys_> another thing is when passing -kernel /boot/vmlinuz-* -append "root=/dev/sda2 console=ttyS0" -bios /usr/share/ovmf/OVMF.fd -nographic; to qemu, there is no serial output evident either.
Left_Turn has quit [Ping timeout: 264 seconds]
jtbx has left #osdev [#osdev]
Left_Turn has joined #osdev
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 268 seconds]
aktaboot has joined #osdev
aktaboot has quit [Remote host closed the connection]
xenos1984 has quit [Ping timeout: 246 seconds]
xenos1984 has joined #osdev
npc has joined #osdev
gsekulski has joined #osdev
xenos1984 has quit [Ping timeout: 268 seconds]
emm has joined #osdev
xenos1984 has joined #osdev
Ellenor has joined #osdev
npc has quit [Remote host closed the connection]
Ellenor has quit [Remote host closed the connection]
<mjg> oh no /var/run/name_service_door
<mjg> /var/run/name_service_door: door to nscd[214]
X-Scale has joined #osdev
gog has joined #osdev
CryptoDavid has joined #osdev
heipiao233 has joined #osdev
MiningMarsh has quit [Quit: ZNC 1.8.2 - https://znc.in]
goliath has joined #osdev
Starfoxxes has joined #osdev
Jari-- has quit [Ping timeout: 264 seconds]
MiningMarsh has joined #osdev
X-Scale has quit [Ping timeout: 250 seconds]
gsekulski has quit [Ping timeout: 252 seconds]
heipiao233 has quit [Ping timeout: 268 seconds]
heipiao233 has joined #osdev
netbsduser has quit [Ping timeout: 264 seconds]
aktaboot has joined #osdev
zxrom has quit [Quit: Leaving]
aktaboot has quit [Remote host closed the connection]
aktaboot has joined #osdev
netbsduser has joined #osdev
aktaboot has quit [Ping timeout: 260 seconds]
bitoff has quit [Ping timeout: 252 seconds]
<mcrod> jesus
<mcrod> nvidia 555 solved 99% of my wayland issues
rustyy has quit [Quit: leaving]
<mcrod> i guess explicit sync was the golden nugget
rustyy has joined #osdev
ramenu has quit [Quit: ZNC 1.8.2+deb3.1 - https://znc.in]
CryptoDavid has quit [Quit: Connection closed for inactivity]
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
ramenu has joined #osdev
dennis95 has joined #osdev
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
CryptoDavid has joined #osdev
Arthuria has joined #osdev
spare has joined #osdev
flom84 has joined #osdev
FreeFull has quit [Ping timeout: 256 seconds]
flom84 has quit [Ping timeout: 252 seconds]
sham1_ has joined #osdev
gsekulski has joined #osdev
joe9 has joined #osdev
joe9 has quit [Client Quit]
heipiao233 has quit [Quit: Konversation terminated!]
heipiao233 has joined #osdev
rustyy has quit [Read error: Connection reset by peer]
rustyy has joined #osdev
heipiao233 has quit [Quit: Konversation terminated!]
vdamewood has joined #osdev
X-Scale has joined #osdev
navi has quit [Read error: Connection reset by peer]
dalme has joined #osdev
CryptoDavid has quit [Quit: Connection closed for inactivity]
X-Scale has quit [Quit: Client closed]
X-Scale has joined #osdev
aktaboot has joined #osdev
vai has joined #osdev
wantyapps is now known as aplel
vai is now known as Jari--
aktaboot has quit [Quit: zzz]
aktaboot has joined #osdev
heat has joined #osdev
aktaboot has quit [Remote host closed the connection]
Cenkeden has joined #osdev
Terlisimo has quit [Quit: Connection reset by beer]
Cenkeden has quit [Quit: Leaving.]
Terlisimo has joined #osdev
gsekulski has quit [Ping timeout: 252 seconds]
MiningMarsh has quit [Ping timeout: 256 seconds]
MiningMarsh has joined #osdev
zxrom has joined #osdev
Cenkeden has joined #osdev
<zid> You guys are quiet today, guess I don't need to tidy up
<bslsk05> ​www.metafilter.com: anime stuff | MetaFilter
<zid> what this
<zid> https://powerlinesinanime.tumblr.com/ 10/10 website at least
<zid> as long as lain is on it
gsekulski has joined #osdev
<Jari--> difficult to find a pal to my OS project
<Jari--> I guess joining and combining projects would be a good idea
<Jari--> +hi
<Jari--> elf-32 loader re :( got epilepsia attacks, so I havent finished the loader yet
<Jari--> all the time
<Jari--> does anyone right this moment know a relatively small and compact 32-bit C based project with ELF-32 loader ?
X-Scale has quit [Ping timeout: 250 seconds]
<Jari--> I could poke around the memory management and static lin
<Jari--> link
<Jari--> but I think that is not a sane idea, relocate with paging
<Jari--> because you have to convert the address pointers... this blew up on my face before
<Jari--> kernel, app, kernel, app.... what a huge load of C code just to make the address compatible
Arthuria has quit [Ping timeout: 264 seconds]
X-Scale has joined #osdev
rustyy has quit [Read error: Connection reset by peer]
<netbsduser> i am rcu'ifying the object descriptor table
<netbsduser> infinite scalability shall be mine
navi has joined #osdev
<zid> squeenix pls, why is the kh port a mess of exes that start each other
navi has quit [Read error: Connection reset by peer]
<mjg> :O
<mjg> is that what Bonwick would do though
aplel is now known as wantyapps
rustyy has joined #osdev
<heat> what's the object descriptor table?
<Ermine> who's bonwick once again?
<netbsduser> heat: fd table
<heat> pog
<netbsduser> i call them "object descriptors" because this is the term used in a lot of venerable sources on unix after they began to represent more than just files (the 4.3bsd man page for dup for example)
<heat> everything is a file
<GeDaMo> Is the file in a cake? :|
<mcrod> hi
<mjg> have you seen what SOLARIS did with fd ahandling tho
<geist> hi
<mjg> :O
<mjg> they get away without rcu
<mjg> but it's the usual bsd-quality crap
<mjg> they make sure to not free the fd table when resizing
<mjg> so it is always legal to take a look
<mjg> then they fine-grained lock around the lookup, so the struct file thing is again safe to access
<mjg> this is basically horid af
<Ermine> but fine-grained locks are less pessimal, arent they
<mjg> mofo
<mjg> that's for lookup
<mjg> freebsd, netbsd and ofc linux do it lockless
<mjg> while these poor saps slap in a lock trip around it
alpha2023 has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
<Ermine> okay okay
<mjg> that's ver much more PESSIMAL
<mjg> it does beat doing a lookup with one lock for all fds tho
<heat> and onyx
<heat> hi geist
<mjg> you do lockless?
<mjg> how?
<geist> heat: sup
<heat> rcu
<mjg> you got rcu? :O
<mjg> w00t
<mjg> noice
navi has joined #osdev
<heat> yes i have rcu m8
<heat> we've talked about this before
alpha2023 has joined #osdev
<mjg> i remembet you wanted to add it, don't recall going through with the thing
<netbsduser> mjg: i read about the way solaris is doing it and it was certainly interesting
<mjg> it is for "crap" values of interesting
<netbsduser> ever since i got rcu i have gone sour on using more complicated locking strategies where much simpler strategies are possible with rcu
<geist> hmm, did the write the rcu implementation from scratch?
<netbsduser> and i understand matt dillon's point more and more
<netbsduser> i wrote an rcu implementation directly from the thorough description in the patent (now expired)
<heat> geist, i used some early RCU lwn articles and early patch descriptions
<heat> this is the early, sane version of RCU that only scaled to hundreds of CPUs and not thousands
<geist> cool. didn't know if that was easily possible or so
<netbsduser> the first patent anyway - the newer ones for sleeping rcu, rcu with trees, and such are not expired
<heat> early rcu is seriously not rocket science
<mjg> ye
<mjg> it's the core idea which matters
<mjg> past that it's pretty pedestrian
<geist> yah it was just patented, and thus completely off limits to me for so long
<netbsduser> tree rcu is nice and when i understood the principle of it i liked it
<heat> tree rcu, rcu modifications for idle, etc, are the complex shit
<netbsduser> i will not share on tree rcu in case anyone doesn't want to hear patented stuff, but it is what it sounds like
<mjg> for a real product the problem is you may infringe on another patent by accident
<mjg> so
<heat> i LGPL'd the code
<heat> so no one can patent-fuck-me
<geist> indeed, hence why i've generally stayed away from it
<mjg> you would need some serious review to get things in
<mjg> still
<mjg> for the scale fuchsia is going to operate on you can probably implement that and reap all the benefits
<mjg> which afair is always lower than smaller core count
<netbsduser> yes, netbsd has pserialize which is in the same family, but they are afraid of doing rcu proper
<geist> oh i'm not talking about fuchsia at all
<geist> that's a different story
night has quit [Remote host closed the connection]
<heat> get tha lawyerz
<geist> i'm just talking about for hobby stuff or even just being interested in it
night has joined #osdev
<netbsduser> exactly because they want to put clear blue water between themselves and the incredible parade of linux patents
<geist> but have stayed away
<netbsduser> and you can patent anything these days, it's ridiculous
<netbsduser> microsoft has a patent for something called WaitOnAddress/WakeAddress, which is almost exactly the same as a futex
<mjg> multicore patents are pretty ridiculous
<heat> geist, to be fair, for lk it'd be pretty redundant
<geist> indeed
<mjg> most obvious shit out there is patented
<geist> though i'm always looking for things to do, modernize, etc
<heat> rcu has a real problem where it just churns memory temporarily
<netbsduser> when i asked someone how on earth this could work, i was suggested that because it isn't cross-process, it's somehow a different thing
<netbsduser> so my feeling is that the GNU people are right and that software patents really are an abomination
gsekulski has left #osdev [#osdev]
<nikolar> They indeed are
<nikolar> Thought that was obvious long ago
<zzo38> I think that all patents are no good and should be abolished.
<heat> netbsduser, how does pserialize work?
<heat> oh there's a man page
Jari-- has quit [Ping timeout: 264 seconds]
<heat> it is indeed very rcu-like, but i imagine it's not using QSBR
<netbsduser> heat: it works on top of a mechanism called xcall
<netbsduser> that's a way to request another cpu carry out a callback
<netbsduser> the pserialise read sections call spl to raise priority to such a level as to inhibit xcall callbacks of the priority used by pserialise from running
<heat> okay that is QSBR
<heat> they're already stepping on the patents
<netbsduser> the writers' interface is different however
<netbsduser> there is no call_rcu
<netbsduser> what you have to do instead is to call pserialialize_perform, a bit like synchronize_rcu, but pserialize_perform broadcasts an xcall to all cores
<netbsduser> and once every core has completed the callback, then it returns, and you can proceed to delete
heat has quit [Read error: Connection reset by peer]
heat has joined #osdev
<heat> hmmm yummy crash again
FreeFull has joined #osdev
<netbsduser> so the fundamental different then is quiescent state detection is explicit and quite heavy, as you are doing this every time you would have used call_rcu or synchronize_rcu
Starfoxxes has quit [Remote host closed the connection]
<heat> yeah that's some real crap for any path that has semi-frequent writes
gbowne1 has joined #osdev
MiningMarsh has quit [Ping timeout: 252 seconds]
MiningMarsh has joined #osdev
<netbsduser> it is very heavy
dennis95 has quit [Quit: Leaving]
<Ermine> Oh, thermald is not supported on my laptop...
<Mondenkind> 'every time' you can defer it, surely
<netbsduser> i will admit i think i just learned how pserialise works just now
gbowne1 has quit [Remote host closed the connection]
<netbsduser> let's see where they use it
gbowne1 has joined #osdev
<heat> Mondenkind, it might be that deferring it is stepping over the RCU qsbr patents
<Mondenkind> T_T
<Mondenkind> 'hey we patented queues, you're not allowed to put shit in queues now'
<heat> "hey it's this thing where we stop you from running a bunch of callbacks for 'reclamation' during a read period, which is implemented by simply not allowing quiescent points at all, including preemption"
<netbsduser> there is another mechanism appaerntly
<netbsduser> psref
<netbsduser> that one permits sleeping
<netbsduser> so this is perhaps the netbsd answer to sleeping RCU
pieguy128 has quit [Ping timeout: 264 seconds]
<heat> oh yeah preemptable RCU is also patented
pieguy128 has joined #osdev
heat has quit [Remote host closed the connection]
Bonstra_ has quit [Quit: Pouf c'est tout !]
heat has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
Cenkeden has quit [Quit: Leaving.]
Bonstra has joined #osdev
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
<nikolar> Heat what rcu isn't patent encumbered
<heat> the first one(s)
<heat> but i didn't really check too deep cuz i didn't really care, LGPL 4 life
<heat> but preemptible rcu is one of the later inventions, together with tree rcu and a bunch of fun ideas for idle
<nikolar> But all ate fair game if use {l,}gpl
<nikolar> *rcu
gsekulski has joined #osdev
<heat> yep
gsekulski has left #osdev [#osdev]
<nikolapdp> neato i was planning on using gplv3 anyway so no patent concerns there
<heat> use v2
<heat> v3 is baaaaad mkay
<Ermine> ^
<nikolapdp> why's that
<nikolapdp> genuinely curious
<heat> because tivoization is normal, not all software needs to be exchangeable
<nikolapdp> ah right, the word i forgor the meaning of
<nikolapdp> (that forgor was a typo but i kept it :P )
<nikolapdp> a
<heat> for example, apple can't update bash to a modern version because gplv3 won't let it have a read-only system software partition
<nikolapdp> so what's the exact reason that was added then
<nikolapdp> because in that case it sounds like a silly thin
<zid> НЯ
<heat> because they strongly think tivoization is bad and everyone should be able to replace their software
<nikolapdp> what exactly is tivoization
<Ermine> it would be desirable tbh
<nikolapdp> i mean it's my silly os, i don't think anyone would care if it's gplv3 instead of gplv2
<heat> tivoization comes from tivo (the tv provider) using linux but not allowing you to replace the software
<heat> then GNU/FSF got really mad
<zid> nikolapdp: tivoization is making something 'for free' by using all gplv2 software, but then adding drm/etc to stop anybody actually modifying the device
<netbsduser> that's what their goal was
<nikolapdp> doesn't sound like a that bad thing to me
<zid> it's not hugely a problem, but, tivo took the piss
<zid> and made a small problem
<netbsduser> they didn't invent the GPL so that people could inscribe source code onto crystal vessels to look at it, but for the practical purpose of trying to let people replace software and such
<Ermine> your firmware consists of free software, but effectively you can't excercise your rights
<zid> It's an end-run around your rights, yea
<nikolapdp> right yeah, so tivoization clause isn't that bad (tm)
<netbsduser> as the story goes maurice stallman invented the GNU after he was told he couldn't replace a printer's firmware
<netbsduser> matthew, whatever he's called now
<zid> how does android deal with it I wonder
<heat> the problem is that not all software should be replaceable
<zid> just by.. the software authors not being the phone authors?
<heat> say i buy a phone, replace the kernel with a compromised one that's spying on you, then sell it to you
<heat> oopsie!
<nikolapdp> heat well it's my os and i say it should be replacable because it's going to be crap :P
<heat> lol
<zid> so if the phone designers only accept signed firmware blobs from certain vendors, who then use a bunch of gnu, nobody can figure out who to complain to?
<netbsduser> the gnu principle is that it all should be
<Ermine> that can be said about any tech seller
<netbsduser> and i think this is why some people invented the term "open source" instead
<Ermine> (and here in .ru shelves already full of phones containing spyware)
<netbsduser> because those people just like looking at source code and maybe stealing it for their own products but they don't care about actually doing anything else with it
<nikolapdp> v3 for the win then
<heat> what
<Ermine> me, being paranoic: flashes another firmware
<heat> that makes sense
<heat> but, say, if samsung nails their crypto and secure bootieness, no mitm will be able to replace their stuff
<Ermine> that said, it is legal to release nonfree kernel modules, so irl there's no 'another firmware'
<heat> it's overall safer
<zid> kernel is v2 anyway
<Ermine> s/samsung/android, all of them have verified boot
<Ermine> sadly, working verified boot and replaceable firmware are incompatible
rustyy has quit [Ping timeout: 252 seconds]
<heat> this is exactly why secure boot exists, but the open-source paranoid people think it's about microsoft taking away their guns
<heat> i mean taking away their linux
<Ermine> I mean how secure boot is made on android phones
<heat> i know
<nikolapdp> who issues the secure boot certs
<Ermine> Certs there are irreplaceable afaik, unless a small number of phones implementing user-set root of trust, and those phones are mostly Pixels
<heat> trusted entities
<nikolapdp> and who are these "trusted" entities
<zid> It'sme
<heat> commonly it's microsoft, but microsoft signed a bunch of other certs
<heat> so red hat, canonical can all sign their kernels
<Ermine> on PCs, certs are replaceable, and microsoft even demands that to give their holographic stickers, certification 'n shit
<Ermine> (And I've even installed my own certificates)
<Ermine> Actually, idk how root of trust is stored on android phones. Is it some kind of memory that just can't be overwritten because physics disallow that? Never heard of such kinds of memory
<zid> you've never heard of rom?
<zid> most game console security is implemented by internal roms
<heat> the way it works in PCs is that they store the key in fuses
<heat> then that starts the chain of trust
<zid> the cpu or gpu or something just has a boot rom inside it, advertized on the bus at startup, then eventually once it's done verifying the 2nd stage bootloader off the volatile storage (nand, hard drive, whatever) it does a magic poke that drops itself from the bus
<zid> and execution continues from there
Cenkeden has joined #osdev
<Ermine> oh, fuses. If stuff was modified you at least can know it
<zid> xbox security was weird, they had a virtual machine in the boot rom, and boot2 was just bytecode for that virtual machine
<zid> guess they couldn't fit the full verification routine in the mask rom
<zid> they banned the bytecode from writing the mask rom disable word, but fucked up and forgot about address mirroring, so you can do it anyway :P
<nikolapdp> lel
<zid> they also forgor that memory wraps around (or remembered and forgot they changed between amd and intel mid project, unsure) so you can just run eip off the end of memory and execute ram at 0x0
<zid> as only jumps inside the top of memory are supposed to be valid inside the bytecode, to stop you escaping
<nikolar> very nice
<zid> gameboy just maps the boot rom over 0x0 and then the final thing it does at PC=0xFF is disable itself, and the game cart is also mapped from 0x0, so games just execute from 0x100
Cenkeden has left #osdev [#osdev]
<Ermine> but anyway, gplv3 doesn't help
netbsduser has quit [Ping timeout: 255 seconds]
<heat> proprietary modulen momenten
<zzo38> On Game Boy, the header is stored at 0x100 and the header usually starts with an instruction to jump to the proper starting address; the boot ROM also reads the header to determine if it is colours or mono and to verify that it is a valid Game Boy cartridge (by a checksum and a Nintendo logo); emulators can use the other information in the header for additional functions.
<Ermine> yes, also hw docen
<zzo38> I dislike the way the secure boot and UEFI is working, because I think they are too complicated for that function and has other problems too.
* Ermine wants to replace home smart tv firmware
<zzo38> I don't want smart TV. Older TV sets would not need a operating system and this one shouldn't need either. Additional functions can be added by external devices such as a VCR; the functions to add into the TV set itself might include picture setting, input selection, and perhaps audio volume (if you do not want to use external speakers with their own volume controls)
<heat> >a VCR
<heat> found the 1980s time traveller
<zzo38> Or a VCR/DVD combo
<Ermine> because webdevOS on a weak mips cpu is visibly sluggish
<Ermine> and it literally runs out of memory
spare has quit [Remote host closed the connection]
mxs9 has quit [Quit: The Lounge - https://thelounge.chat]
alexander has quit [Quit: ZNC 1.8.2+deb3.1 - https://znc.in]
alexander has joined #osdev
<mjg> YO
<nikolapdp> OI
<mjg> WATAP
<nikolapdp> NOTHING YOU
<mjg> watching the game, having a bud
<nikolapdp> fun times
<Ermine> people speedrun zuma up to these days
sham1_ has quit [Remote host closed the connection]
<Ermine> hoegaarden > bud
<mjg> zuma?
<Ermine> zuma deluxe
janemba has quit [Read error: Connection reset by peer]
sham1_ has joined #osdev
sham1_ has quit [Remote host closed the connection]
sham1_ has joined #osdev
goliath has quit [Quit: SIGSEGV]
janemba has joined #osdev
Turn_Left has quit [Read error: Connection reset by peer]
Nixkernal has quit [Ping timeout: 256 seconds]
mxs9 has joined #osdev
heipiao233 has joined #osdev
troseman has joined #osdev
sham1_ has quit [Quit: ZNC 1.8.2 - https://znc.in]
sham1_ has joined #osdev
emm has quit [Ping timeout: 246 seconds]
alpha2023 has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
alpha2023 has joined #osdev
mxs9 has quit [Quit: The Lounge - https://thelounge.chat]
frkzoid has quit [Ping timeout: 255 seconds]
Arthuria has joined #osdev
mxs9 has joined #osdev
agent314 has joined #osdev
<heat> mjg, mon of scalability
<heat> are BSD or POSIX locken ever used too heavily?
<heat> in a real workload
<heat> file locken i mean
<nikolapdp> are you on a new obsession with file locks
<zid> on your bullshit again*
<zid> you got the meme wrong
<heat> no, i implemented them yesterday and i want to make sure this isn't terrible in practice
navi has quit [Ping timeout: 264 seconds]
<mjg> heat: nobody uses them for anything serious
<mjg> heat: multicore-wise
<mjg> heat: the only legitimate use is to lock out shite scripts
<mjg> or for the package manager to lock out other instances 'n shit
<mjg> it's basically to protect the user against themselves
<heat> gotcha
<nikolapdp> they are advisory
<heat> i saw a random mention of POSIX file locken wrt oracle db
<heat> it might be possible they're using it
<mjg> ? LD
<mjg> wtf
<bslsk05> ​docs.oracle.com: Database File System (DBFS)— POSIX File Locking
<mjg> at best they use it to lock out other instances from starting
<mjg> anything past that is insane
<heat> hmm, it might be talking about implementing those semantics on this weird fs on top of oracle db?
<heat> shrug
<mjg> anyho sample legit use: you have a lul script from cron
X-Scale has quit [Ping timeout: 250 seconds]
<mjg> you lock a file with a timeout
<mjg> and complain if it is locked next time around
<heat> i know they like using it wrt /etc/passwd and /etc/shadow
<mjg> it may be there is something better with systemd now
<heat> and openrc had some random flock use
<mjg> it can't be anything perf related
<mjg> merely keeping the system in sync
<mjg> again see package managers as an example
<heat> makes sense
<heat> what's wrong with a good old LOCK FILE
<mjg> mon
<mjg> meanwhile check out gcc
<mjg> 0xffffffff81959c30 <+16>: xor %edx,%edx
<mjg> 0xffffffff81959c32 <+18>: test %edx,%edx
<mjg> 0xffffffff81959c34 <+20>: jne 0xffffffff81959c55 <lockref_get+53>
<mjg> lol
<heat> what function is that?
<heat> oh i guess some inline of dget
<heat> oh wait no you're looking at the lockref_get codegen. yeah i could see that happening with inline asm
<mjg> it's not the stock version, i'm messing with it and gcc decided to fuck with me
<heat> c compilers are always kind of sketchy around inline asm
wantyapps is now known as aplel
<heat> mjg, isn't that retry = 100 kind of arbitrary?
<mjg> worse than that
<mjg> it is entirely harmful on amd64
<nikolapdp> wouldn't say sketchy, they just can't look into the asm
<nikolapdp> so they generate weird code around it
<mjg> namely the limit is never reached, not even close, but you are fucking with the actual retry loop
<mjg> this was added for some piece of shit arm
<mjg> and landed for everyone
<heat> can't you reach the limit in a horrible edge case?
<heat> With the retry limit the performance of an open-close testcase improved between 60-70% on ThunderX2.
<heat> yeehaw good old thunderx2
<mjg> that's the piece of shit
<heat> my favourite arm
<mjg> intel cpuz try to enforce some degree of fairness when fucking like that
<heat> to be fair it's a fair problem on archs without cmpxchg primitives
aplel is now known as wantyapps
<mjg> then add the limit to those fucks
<heat> i guess thunderx2 might be llsc
<mjg> all arm without LSE is
<mjg> lse is maybe 5 yeras old