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
<heat> hmm, that kind of stuff might require CAS
<zid`> column address select?
<zid`> NSPIRE CX
<zid`> really sick photo
<heat> you can't use CAS on any exam (here at least) cuz it'd do the whole exam for you
<zid`> we have
<zid`> two maths papers
<zid`> with and without calculator
<zid`> with is like "do this math olympiad problem" where the problem is figuring out what the fuck to calculate in the first place
<zid`> and without calculator that's like "add these three numbers"
<zid`> In serbia the mathematics exam is to solve one of the prisoner's dilemma problems. You have to hand your guess in rubles what the 2nd highest amount of rubles given is to get top marks.
<heat> okay yours is similar to ours
<nikolapdp> why rubles
<heat> you also can't have CAS
<zid`> communism
<zid`> The fuck is JCQ
<nikolapdp> communism = russian currency?
<nikolapdp> that's news to me
<mjg> 8(
<mjg> i read CAS
<heat> and exam mode yep
<mjg> only to find out you shitheads are talking about some exams
<zid`> ah, it says which exams cover this
<zid`> BTEC, GCSE, okay
<heat> don't worry mjg my calculator has a FILESYSTEM
<zid`> yea you don't need calculus and shit in gcse so not surprising
<mjg> reiser
<heat> you don't need calculus?
<zid`> not at gcse
<mjg> what kind of lame ass calculus or algebra exam are you passing that a calculator is of any use
<zid`> at most it will be rewriting 2x^3 as 6x^2
<mjg> can it do fucking proofs or something
<zid`> so you don't need a calculator that can solve anything
<heat> mjg, CAS can do limits and stuff
<heat> basically algebraic super powers
<heat> no one's asking for proofs for your 12th grade math exam
<mjg> well i was joking a little but now i'm concerned
<mjg> in Real College majority of what you have to fuck with is proofs
<mjg> employing stuff even for made up examples is lower tier for shite colleg
<mjg> e
<bslsk05> ​i.imgur.com <no title>
<heat> zid im worried about you guys
<zid`> I hope this is the calculator exam
<zid`> 5*24 is rough
<mjg> which grade is it?
<nikolapdp> math hard
<heat> what's foundation tier?
<zid`> for retards
<heat> are there harder GCSEs?
<zid`> yes
<zid`> top grade on that is a C or whatever
<zid`> if you max it out
<heat> is it Higher?
<zid`> higher is the higher one yes
<heat> is there a higherer
<heat> higher looks more reasonable
<zid`> the maffs isn't any harder but it covers more shit
<zid`> like calculating standard deviations or quartiles or doing slightly more advanced trig etc
<zid`> rather than just adding numbers up and knowing what an angle is
<heat> it does look a good bit harder than "uhhhhhhhhhhhhhh numbaer?"
<heat> its still quite different from ours though
<heat> a *lot* longer
zetef has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
<zid`> plus there's two don't forget
<zid`> calculator, non-calculator, and chatgpt
<heat> three actually
<heat> *i think*
<zid`> no I asked chatgpt, it said two
<heat> and can translate that somehow
<zid`> do I need to speak goose
<zid`> yes
<heat> google translate baby wooooo
<heat> you'll also notice sen = sin here
<heat> cope
<zid`> figure 1 represents sheep line polygonal simple of cum a constructed of parts of segments of retard
<zid`> give your answer in centimeters
<heat> i think you're looking at the serbian exam
<zid`> that's what it says
<zid`> this paper is super hard
<heat> no, *you're* hard, the paper isn't
<zid`> but you could teach all the material in it in like, 20 mins, if you knew it in advance
<zid`> did you ever see the papers they gave to jews in russia
<heat> wait are you actually unironically saying it's hard?
<zid`> yes, compared to what I rememberof gcse
<zid`> gcse just had *lots* of easy stuff on it
<zid`> like reading graphs, doing averages, medians, modes, basic trig, quartiles, arithmetic, blah blah
<zid`> This opened with a limit?
<zid`> of an infinite series?
<heat> yeah GCSEs look looooong as fuck
<heat> yeah that's a limit
<heat> limit of that should be 2e
<zid`> if you say so
<heat> oh wait no, yeah it's infinite
<heat> +inf
<zid`> lol
<zid`> -1/12
<heat> i forgot the ^n bit
<zid`> sequences, ratios, fractions, multiplying fractions, etc
<zid`> just like.. every single basic math operation
<zid`> percentages, percentiles
<zid`> volumes, areas, angles, trig identities..
<nikolapdp> heat you got it right the first time
<nikolapdp> it's 2e
<zid`> paper too easy, heat almost gets it right
<nikolapdp> er no
<nikolapdp> e^2
<nikolapdp> is correct
<nikolapdp> math hard :(
<heat> yeah i completely forgot 99% of this
<zid`> The answer is infact, infinity
<heat> i can't derivate for shit anymore, limits are LMAO
<zid`> divided by 7
<heat> yeah it makes sense it's e^2
<nikolapdp> thanks zid for confirming i was right :P
<zid`> (1 + very small) ^ very big
<zid`> and as we all know, 1 ^ big = e^2
<heat> but what's on the paper is n -> +inf
<nikolapdp> yeah and the answer is e^2
<zid`> oh I copy pasted the wrong picture
<zid`> it's e^2 from both
<nikolapdp> yeah
<zid`> The real question is why it ends up being e with the 2 xor'd back out so it's just 0.7
<heat> -Wxor-used-as-pow
<nikolapdp> what ends up as .7
<zid`> e is 2.7 or am I having a stronk
<heat> roughly yeah
<zid`> 0.717, 1/0.717 = 1.7 etc, everything is fcuking .7 except pi
<zid`> 1/sqrt(2) best paper
<nikolapdp> 3.14 = 3 + 0.7 * 2
<nikolapdp> boom
<nikolapdp> o.7 found
<zid`> do it properly
<nikolapdp> do what
<zid`> 2(1.5 + 0.07)
<nikolapdp> kek
<zid`> you did 4.4 you moron
<heat> lmfao
<zid`> see heat it's funny when I do it
<zid`> when linus does it you call him the worst human
<zid`> I think you have a bias
<nikolapdp> lol
<nikolapdp> math hard :(
<heat> yes
<heat> reality has a liberal zid bias
<zid`> no heat just has an anti-finnoswede racism issue
<zid`> understandable though, rich northern european country, compared to portugal
<zid`> linus is the MAN keeping heat DOWN
<heat> we're so joever
<zid`> lol
<zid`> there was some bonus weirdness with that that I am forgetting
<heat> vlc and libreswan????
<zid`> INT_MAX having to be defined in an odd way
<heat> #define INT_MAX 2^32
<heat> NEXT!
<zid`> this same issue but I think also another issue compounded on it
<nikolapdp> oh no way lol
<heat> the true INT_MAX is 34
<nikolapdp> indeed
<zid`> it's all this actcd19 guy
<zid`> who is he
<nikolapdp> there are no integeres greated than 34
<zid`> # ifdef PNG_DO_BC
<zid`> the povray oneis commented out with that at least
<zid`> it's just showing how to generate the seuqence inside the array
<zid`> using bc
<zid`> all the other ones I get are copies of that, plus hackrf
<bslsk05> ​tomazos/actcd19 - ACTCD19: Andrew's C/C++ Token Count Dataset 2019 (1 forks/4 stargazers)
<heat> i think he tokenized a bunch of software into stuff you can actually code search into
<zid`> yea
<heat> i.e doesn't match comments
<zid`> stripping comments would be nice yea
<zid`> I just tried it on github and it was 100% comments
<zid`> the libpng one is a comment too it's just in an ifdef comment that it can't tell apart from a non-comment ifdef
<zid`> This is the kind of shit that chatgpt might actually be useful for, you don't care about false-neg or false-pos too much, and it's a text processing task
<heat> static qulonglong c_maxlonglong = (2^64)-1;
<zid`> oopsie
<zid`> I just noticed that this is double wrong btw
<zid`> *just* noticed
<zid`> it's so bad I just read straight over it after seeing the *first* issue with it
<heat> is it?
<zid`> integer constant expressions
<nikolapdp> you can't left shift by 64
<zid`> are integer
<zid`> not long
<zid`> so 2^32 is out of range
<zid`> if it were a shift
<heat> oh yeah
<zid`> but it fucking isn't a shift at all it's a fucking or
<zid`> xor, and I *just* noticed that
<zid`> I was too busy staring at the type bug
<nikolapdp> kek
<heat> this is great stuff
<zid`> #else
<zid`> gets(str);
<zid`> guess what the ifdef is called
<heat> SAFE?
<zid`> sadly no, USE_READLINE
<zid`> Thankfully most of these are just like, io/test.c
<nikolapdp> well i wouldn't care about tests either
<zid`> or "oof.c"
<zid`> like, 80s nethack highscore dumper application you build yourself in ~/ or whatever? Yea it's using gets
<zid`> heat: find some printf(str)
navi has quit [Ping timeout: 252 seconds]
gog has quit [Ping timeout: 268 seconds]
edr has quit [Quit: Leaving]
nitrix has quit [K-Lined]
agent314_ has joined #osdev
skipwich has quit [Quit: DISCONNECT]
agent314 has quit [Ping timeout: 260 seconds]
skipwich has joined #osdev
heat has quit [Ping timeout: 268 seconds]
Bitweasil has quit [Quit: ZNC 1.8.2+deb2build5 - https://znc.in]
Bitweasil has joined #osdev
vdamewood has joined #osdev
srjek has quit [Ping timeout: 246 seconds]
nitrix has joined #osdev
gbowne1 has quit [Remote host closed the connection]
Gooberpatrol66 has quit [Ping timeout: 260 seconds]
zetef has joined #osdev
Gooberpatrol66 has joined #osdev
zetef has quit [Ping timeout: 245 seconds]
<geist> puuuuuuuuts
zetef has joined #osdev
<klys_> compute?
\Test_User has quit [Quit: \Test_User]
azonenberg has quit [Ping timeout: 272 seconds]
\Test_User has joined #osdev
zetef has quit [Ping timeout: 255 seconds]
<geist> urgh, another internet outage
<geist> just as i was settling in to watch some streaming
<sskras> geist: do you use only one internet provider at the moment? If not, Multipath TCP setup would have helped :)
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
<geist> yeah just one
<geist> am using my ipad to get to irc here
netbsduser` has joined #osdev
<ddevault> okay
<ddevault> lwext4 is giving me some shit
gog has joined #osdev
<ddevault> corrupting directories as soon as I add entries to them
ZipCPU has quit [Ping timeout: 240 seconds]
ZipCPU has joined #osdev
rom4ik7 has joined #osdev
rom4ik has quit [Ping timeout: 255 seconds]
rom4ik7 is now known as rom4ik
gog has quit [Quit: byee]
carbonfiber has joined #osdev
theyneversleep has joined #osdev
netbsduser` has quit [Read error: Connection reset by peer]
<ddevault> aha! got it
<ddevault> problem was in my AHCI driver
<ddevault> was writing more than it was asked to
chiselfuse has quit [Remote host closed the connection]
foudfou has quit [Remote host closed the connection]
gildasio has quit [Remote host closed the connection]
wand has quit [Remote host closed the connection]
wand has joined #osdev
foudfou has joined #osdev
gildasio has joined #osdev
chiselfuse has joined #osdev
gog has joined #osdev
heat has joined #osdev
zetef has joined #osdev
zetef_ has joined #osdev
zetef has quit [Ping timeout: 245 seconds]
zetef_ has quit [Remote host closed the connection]
suqdiq has quit [Quit: suqdiq]
srjek has joined #osdev
<nikolar> Heh
srjek has quit [Ping timeout: 252 seconds]
FreeFull has quit []
FreeFull has joined #osdev
zetef has joined #osdev
chiselfuse has quit [Remote host closed the connection]
chiselfuse has joined #osdev
<ddevault> I think my uniprocessor scheduler is done and not *too* much painted into a corner with SMP on the horizon
<ddevault> now I don't have to touch it again for a while
edr has joined #osdev
zetef has quit [Ping timeout: 256 seconds]
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
zetef has joined #osdev
<nikolar> Nice work ddevault
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
m3a has quit [Ping timeout: 260 seconds]
<ddevault> thx
zetef has quit [Remote host closed the connection]
netbsduser has joined #osdev
<nikolar> That's cool
goliath has joined #osdev
Left_Turn has joined #osdev
MiningMarsh has quit [Quit: ZNC 1.8.2 - https://znc.in]
MiningMarsh has joined #osdev
agent314 has joined #osdev
agent314_ has quit [Ping timeout: 268 seconds]
<clever> funny story from another OS dev place, the guy wrote his own basic libc just to fill in the needs for a few functions
<clever> gcc saw the memset loop, and replaced it with a call to memset
<clever> infinite recursion!
<nortti> ah, the classic
<vdamewood> That's why you build libc freestanding and with nostdlib
<clever> ah, thats the flags i was thinking of
<zid`> yea if you do that it replaces it instead with 40kB of sse
<zid`> and then you remember you need -mgeneral-regs-only
<gog> yo dawg we heard you liked memset
<clever> zid`: in this case, it was risc-v, so no sse
<zid`> -fno-builtins also
* vdamewood memset gog fishy
* gog chompset(fishy)
GeDaMo has joined #osdev
<Matt|home> hey guys, sorry (again) for the off topic question, i just want some _very_ general advice about computer security, im not too concerned if it's super accurate so opinions are fine: basically just wondering what decent security software/practices look like for windows and linux in general. im told for example "linux doesn't usually need antivirus software" but not sure why windows does. sorry for the vagueness, like i said just
<Matt|home> looking for suggestions since there's a lot of opinions on the topic
<Matt|home> cool ddevault
dostoyevsky2 has quit [Quit: leaving]
dostoyevsky2 has joined #osdev
<gog> depends on who is using the machine
<gog> i'm not terribly concerned about catching viruses on windows, but only because i usually know what i'm doing and hvae only been caught off guard a few times
<gog> but it only takes one time
<gog> so
<gog> weigh that against the risks
<zid`> computer security same as sexual health
<gog> yes
<gog> why worry
<gog> we're all gonna die anyway
<gog> inb4 somebody starts calling PrEP "McAffee"
<nikolar> You generally don't download random binaries on Linux
<nikolar> So that's one major reason why you don't need antivirus software
<zid`> no
<zid`> The one set of linux users who that applies to
<zid`> get ridiculed for doing it
<zid`> everybody else downloads random binaries
<GeDaMo> Some people pipe downloads straight into a shelll :P
<zid`> GeDaMo did you link your irc client to PSN yet
<GeDaMo> PSN?
<zid`> playstation network
<zid`> (there's drama you're clearly not privy to)
<GeDaMo> :|
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 268 seconds]
heat has quit [Read error: Connection reset by peer]
heat has joined #osdev
wand has quit [Ping timeout: 260 seconds]
<heat> most binaries on linux are random
<heat> "supply chain security" are terms never put together before, in most distros
gog has quit [Ping timeout: 260 seconds]
goliath has quit [Quit: SIGSEGV]
<zid`> ring ring, ring ring
netbsduser has quit [Ping timeout: 252 seconds]
<nikolar> I trust my distro way more than a random .msi executable i download
gog has joined #osdev
gog has quit [Client Quit]
<heat> you don't need to trust your distro, you need to trust the maintainers, usually
<zid`> I trust your distro less than I trust a random .msi depending where I downloaded it
<zid`> see: xz
<heat> i don't know how artix works, but on arch maintainers can push whatever, whenever
<heat> artix's security situation is in all likelyhood *worse*
<heat> when people can push whatever they like, no strings attached, you don't trust the distro, because updating packages and review is not a "distro thing"
<zid`> it's why leftpad was such a nightmare, security wise, nobody's checking that code and some guy could just push code to millions of people
<Ermine> By push you mean without merge request?
<heat> yes
<heat> i can trust arch all i want (and i usually do), but some hobo could randomly update arch's gcc to rm -rf ~/Onyx
<heat> and i'd know after ~/Onyx gets nuked
<zid`> msis are technically signed by the dev at least
<zid`> so I can download them from an unsafe location as long as I bother to do the checks
<Ermine> I can slap my pgp signature on some .tar.gz as well
<zid`> The intermediate can strip it out, tar.gz's are not *typically* signed
<zid`> so I wouldn't even bat an eyelid if it was unsigned
gog has joined #osdev
<zid`> nor will my distro stop me
<zid`> windows will infact, refuse unsigned msis unless you tell it not to
carbonfiber has quit [Quit: Connection closed for inactivity]
<heat> that's also true, PE and windows have code signing
<heat> ELF has skibidi toilet baby gronk rizzed up livvy dunne
<Ermine> But then cert expires and that renders wi-fi adapter unfunctional
<Ermine> (And I'm in a situation when I have a linux-only adapter and windows-only adapter)
<heat> yes and that hints that your vendor sucks ass
netbsduser has joined #osdev
theyneversleep has quit [Remote host closed the connection]
<Ermine> one is d-link, and another is comfast
<heat> d-link ass? checks the fuck out
<heat> if i had to choose between d-link and tp-link i'd off myself
theyneversleep has joined #osdev
<Ermine> Currently all of them use realtek chips anyway
theyneversleep has quit [Remote host closed the connection]
Arthuria has joined #osdev
voidah has joined #osdev
nur has joined #osdev
Arthuria has quit [Ping timeout: 268 seconds]
Arthuria has joined #osdev
gorgonical has joined #osdev
<gorgonical> what is good everyone
<mcrod> stupid question
<mcrod> this is in the context of embedded work
<mcrod> let’s say I’m writing a driver to communicate with some chip
<mcrod> but that chip supports both polling and interrupts
<mcrod> i don’t know I can support both
<mcrod> how to*, i know it’s obviously possible
<gorgonical> I prefer polling because async computing and callbacks are the work of the devil
<mcrod> that’s not what I asked :p
<gorgonical> i know lol
<gorgonical> so what exactly is the question
<mcrod> basically
<mcrod> “spawn a way to talk to x, synchronously”
<mcrod> it’s hard to type over the phone
<mcrod> but I want to communicate with something over SPI
<mcrod> wait…
<gorgonical> fancy condensed ellipsis
<mcrod> I think this problem is much simpler
<mcrod> DRV_REDACTED_ProcessIncomingData, SendData
Gooberpatrol66 has quit [Ping timeout: 246 seconds]
<mcrod> it then doesn’t have to know about hardware
<mcrod> maybe?
Arthuria has quit [Ping timeout: 260 seconds]
gbowne1 has joined #osdev
gbowne1 has quit [Remote host closed the connection]
gbowne1 has joined #osdev
wand has joined #osdev
Gooberpatrol66 has joined #osdev
voidah has quit [Remote host closed the connection]
wand has quit [Ping timeout: 260 seconds]
wand has joined #osdev
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
Starfoxxes has quit [Ping timeout: 255 seconds]
chiselfuse has quit [Remote host closed the connection]
chiselfuse has joined #osdev
Starfoxxes has joined #osdev
agent314_ has joined #osdev
agent314 has quit [Ping timeout: 268 seconds]
<geist> you can generally support both butyou need a way to transition between them
<geist> or in the case of some sort of crash time situation: disable interrupts and use an alternate polling api
<geist> GetPendingPacket() -> [ packet or error ], etc
<heat> i think on Real Kernels for performance when you ask for polling all you get is not sleeping
<heat> basically polling the internal data structure instead of some register
<GreaseMonkey> polling or interrupts? trick question, the answer is always DMA
<heat> what
<zid`> what
<GreaseMonkey> (unless it's IBM PC DMA)
<childlikempress> what
<mjg> rust has fearless device driver handling
<heat> you have scared shitless device driver handling because you never wrote one
<GreaseMonkey> but yeah for polling vs. interrupts, you can have both - the latter can set a flag and ensure that the CPU is awake, and then the main task(s) can check which flags are set... or instead of a flag one can consider an event queue
<GreaseMonkey> and if you don't have DMA... probably best to emulate it in an interrupt handler if you have the RAM to spare
<mjg> heat: OH. while i never wrote a driver from scratch, i did patch some up a little bit
<mjg> i consider myself a senior device driver programmer, and by that mean i probably should not be writing any
<heat> vice president of drivers
<GreaseMonkey> basically you'd want to tell your SPI driver "i want to send this message and get a response back of the same length because SPI"
<heat> distinguised driver engineer
<GreaseMonkey> and in the best case, only one thing should need to use the specific SPI peripheral
<heat> director of drivers
<mjg> heat: senior VP
<GreaseMonkey> driver training coach
<heat> chief driver officer
<mjg> virgin normie seeing ooo thinks out of office
<mjg> chard programmer thinks out of order (execution)
<mjg> chad even
<heat> glue sniffer heat thinks ooooooooooooooooooooo
wand has quit [Ping timeout: 260 seconds]
<mjg> meanwhile italians think OH
<bslsk05> ​'The Sopranos Ohs and Hos!' by TheMotherFarquhar (00:03:25)
<gog> ooo is the noise i make when i see a cute outfit
<mjg> gog is a target hoe
<gog> ehhhh
<gog> target is fine ig
<gog> they had a cardigan and some sneakers i bought once
<gog> but mostly it's too twee for me
<gog> and for some reason in my mind i associate target with beige moms now
<mjg> is that the new wave of old money aesthetic for people with no money?
<gog> idk how to describe it really. it's like an extension of scandiavian modern styling i guess?
<gog> where everything is grey, black, or some tone of whit
<gog> like the interior of my apartment
<heat> eggshell
<gog> yes
<gog> eggs hell
<heat> are you a e s t h e t i c too
<heat> do you speak i t a l i c
<gog> no
<mjg> i speak colloquial polish quite fluently
<mjg> watch this: w szczebrzeszynie chrząszcz brzmi w trzcinie
<mjg> means "hello, nice to see you"
<heat> agreed
Arthuria has joined #osdev
Arthuria has quit [Read error: Connection reset by peer]
Arthuria has joined #osdev
<zid`> EGG
<nikolar> EGG
<heat> wooooo i can create a partition from onyx and write to it
<netbsduser> is there a modern analogue to the buffer head in linux? i know that still exists and is tagged into page cache pages (which, i assume, disables automatic write back of the said pages?) - but i've heard that even Torvalds himself rages against the buffer head now
<heat> yes
<heat> iomap
<heat> >(which, i assume, disables automatic write back of the said pages?)
<heat> no, not at all
<netbsduser> purely for fs metadata i am thinking here
<netbsduser> because there you can't have the swapper writing back your data willy-nilly
<netbsduser> what if it's not been put to journal first?
<heat> yes you can
<heat> journalling is different
<heat> jbd2 actually depends on buffer heads, but AIUI they'll only start thinking about writeback after it has been committed to the journal
<heat> journaling? yeah journaling
<netbsduser> if you're journalling you surely can't be having the metadata you modified in the page cache get thrown onto disk before you've put the changes into the journal first
<netbsduser> thanks for the iomap pointer btw it will be useful
<heat> i don't know exactly how the jbd2 bits work, but they work
<heat> np
<netbsduser> i have a block cache (only for fs metadata) but i'd like to modernise
<heat> note that iomap isn't a buffer cache
<heat> the current narrative around filesystems in linux is that you're supposed to bring your own buffer cache (xfs_buf, btrfs extent_header(?), or even buffer_head)
<netbsduser> that's interesting, do they use the page cache at all for metadata in the modern filesystems or do they just do direct reads into their own buffer cache?
<heat> iomap buffered IO data is IIRC something like {spinlock, bytes_dirty, dirty block bitmap, uptodate block bitmap}, for every folio
<heat> i think It Depends
<mjg> itDepends.unwrap()
<heat> xfs doesn't, i think, because they support a bunch of crazy stuff (i.e vmalloc'd buffers)
<heat> and they historically supported block size > page size even if that wasn't necessarily true for the linux port
<netbsduser> someone told me linux is moving to support that generally now
<heat> yes
<heat> well, "generally", aka with iomap
<heat> buffer_heads will probably be stuck on order-0 folios (single pages)
<geist> NTFS has the neat effect, by design, that all the metadata itself fits in hidden-system files so they can use the same file cache to cache them
<geist> and the journalling code is basically a layer on top of that to selectively journal writes to system files
<mjg> huh
<mjg> i don't know if that's necessarily neat
<geist> like at mount open the 10 metdata files, then register them with the journalling layer
<geist> well neat from a design point of view, its a nice design
<geist> of course that came from VMS which came from RSTS or so, since FILES-11 FS did the same thing
<mjg> i mean metadata has fundamentally different properties than actual data
<geist> well, not if you reframe it, which is the strategy there
<mjg> so NOT mixing them in this way would probably avoid special casing
<netbsduser> vms has much to answer for
<heat> le unix filesystems also do metadata in files
<heat> aka directories
<geist> yah, directories
<geist> so you could, for example, construct a virtual file to represent all the inodes in the system, and the bitmap, etc
<netbsduser> they picked a 512 byte page size for hte vax because vms people thought you would need it to do a page cache
<mjg> no, inode's metadata are NOT in a directory
<geist> and then cache them at the file level
<mjg> in fact inodes are not in directories
<mjg> at best you have a hardlink to an inode in a directory
<netbsduser> being equal to the block size
<geist> right but a strategy is to map them into one large virtual file
<netbsduser> geist: this is broadly the lines i had been considering, a synthetic vnode whose page cache is used for caching FS metadata
<geist> yah
<heat> mjg, directories are metadata
<heat> like, by definition
<netbsduser> would need a pinning mechanism + writeback control on a per-block basis for something like ext
<heat> netbsduser, that's what i have yeah
<geist> yah that would be teh trick, building some sort of layer on top of it or within it to let you specially deal with those metadata files
<heat> all block devices get their own backing inode in a special hidden fs
srjek has joined #osdev
<geist> question there is if it makes sense to split it into multiple virtual files for different pices of metdata, or one large one that backs the whole device
<geist> the latter is simpler, but you end up with a very large sparse vnode
<geist> and thingsl ike readahead and whatnot may not help you
<heat> 'tis life
<heat> something that buffer heads give you is coherency between fs metadata and /dev/sda
<heat> for free!
* kof673 points out eggs are double or even triple layered, and the metaness of this discussion
<heat> and this is actually used by some ext234 utils
<heat> like, poking at metadata from userspace. i know, insane
<heat> netbsduser, btw this can help, dave chinner (the xfs guy) explaining why buffer heads suck: https://lwn.net/Articles/932665/
<bslsk05> ​lwn.net: Sunsetting buffer heads [LWN.net]
<heat> the article itself should also be useful
<netbsduser> heat: cheers, this is useful
<netbsduser> i am different atm in that i have no buffer heads for (regular) file caches, there i did think it would be particularly wasteful in the presence of extents - i have a traditional buffer cache for FS metadata only (includes directories) - i don't have anything but the block cache yet to help in deciding where a dirty file page gets written back to
<netbsduser> the write back daemon just posts the request to the FS which will consult its metadata block cache to find out where to write back to
agent314_ has quit [Ping timeout: 256 seconds]
agent314 has joined #osdev
<heat> geist, btw TIL there's a discard option you can use to enable QEMU TRIM commands
<heat> which can TRIM on the backing block device or just use fallocate to punch holes in the file
zxrom has quit [Quit: Leaving]
azonenberg has joined #osdev
<kof673> i'm not sure the main article realizes the purpose of a sunset is that it rises again. "We're going to turn this team around 360 degrees" -- attributed to jason kidd
<clever> heat: ive had trouble with iscsi, trim, and zvol, the problem is that my iscsi daemon doesnt believe that a zvol supports trim (when it does)
<clever> so i often have to either remount things directly on the server and fstrim, or dd some nulls over
<clever> #define VIRTIO_BLK_T_DISCARD 11
<bslsk05> ​docs.oasis-open.org: Virtual I/O Device (VIRTIO) Version 1.2
<clever> and yeah, virtio supports 3 types of trim
<clever> discard, write-zeros, and secure-erase
Left_Turn has joined #osdev
xenos1984 has quit [Read error: Connection reset by peer]
Bitweasil- has joined #osdev
zhiayang_ has joined #osdev
onering has joined #osdev
wantyapps_ has joined #osdev
xelxebar_ has joined #osdev
zy_ has joined #osdev
Beato has quit [Excess Flood]
Turn_Left has quit [Remote host closed the connection]
zy has quit [Remote host closed the connection]
wantyapps has quit [Remote host closed the connection]
zhiayang has quit [Quit: oof.]
Bitweasil has quit [Quit: ZNC 1.8.2+deb2build5 - https://znc.in]
valshaped7424880 has quit [Quit: Ping timeout (120 seconds)]
xelxebar has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
zhiayang_ is now known as zhiayang
<heat> why does debugfs dump offsets in octal...
<zid`> to annoy you
<zid`> scroll anchoring is broken in ff again :(
<heat> everyone younger than 45
<zid`> how can I read erotic manga if every time I change page, it stays at the bottom of the scroll bar
<heat> easy just switch to chrome
<zid`> but then it'd be covered in ads and I still wouldn't be able to
<heat> yesss i can copy onyx to a new partiton lets gooooo
<childlikempress> zid`: do what i did, write a crappy script to download it
<childlikempress> fuck browsers
<bslsk05> ​i.imgur.com <no title>
xenos1984 has joined #osdev
netbsduser has quit [Ping timeout: 252 seconds]
<heat> i'd love to know why copying files is soooooo slow though
<heat> lack of readahead maybe?
Left_Turn has quit [Read error: Connection reset by peer]
<zid`> childlikempress: integration for that would be painful
<zid`> web browsers much much easier
<childlikempress> yeah but then your scroll bar whatever problem will go away
<heat> curl | sudo sh
<zid`> I'll just switch pirate site until it's fixed
<zid`> easier than writing a greasemonkey script to fix the scroll
goliath has joined #osdev
<heat> wow i'm spending 3s reading ~60MB
<heat> just blocked
<mjg> genz
<mjg> don't take fucking screenshots when dpaste would do
<heat> i can't dpaste my virtual terminal in my vm
<heat> boomer
<bslsk05> ​gist.github.com: ext2.svg · GitHub