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__ has joined #osdev
admiral_frost has joined #osdev
heat_ has quit [Read error: Connection reset by peer]
admiral_frost has quit [Client Quit]
<heat__> moon-child, what does it use, 16 bytes? or a cacheline?
heat__ is now known as heat
Arthuria has quit [Ping timeout: 245 seconds]
<geist> iirc there are canonical nops for amd and intel that you’re supposed to use up to 15 bytes, and presumably their decoder can pick those out with no trouble
<geist> but yes it chews up space in the 32 bytes or so they fetch per cycle
<moon-child> definitely less than a cache line. 16 bytes sounds about right
<clever> heat: is that a relocation thing, where you need more bytes for a longer offset?
<clever> heat: and your stuffing some nops in, that can be overwritten with a longer opcode?
heat_ has joined #osdev
heat has quit [Read error: Connection reset by peer]
<clever> heat_: did the peer eat the last 2 messages i sent you?
[itchyjunk] has quit [Ping timeout: 272 seconds]
[itchyjunk] has joined #osdev
<heat_> clever, yeah but i have no idea how they (toolchains) even do it
<clever> heat_: ive heard that the arm/gcc toolchain, cheats, it generates thunk functions at link time
<heat_> yeah but arm is a special boy there
<clever> so if the compiler used a pc-relative opcode, with only 16bits of offset, and it doesnt fit, the linker makes a fatter jump opcode, within range
<clever> it sounds like risc-v is using a smaller opcode, but padding with nop's?
<clever> so the linker can increase the opcode size?
<heat_> riscv generates the more expensive opcodes and then gets relaxed at link time if possible
<clever> ah, so the linker uses nop's to shrink the opcode?
<heat_> doesn't even use nops AFAIK
<heat_> riscv linker relaxation is extensive
<clever> ive heard LTO is the better option
<clever> because normally, the linker cant modify the generated .text too much, due to pc offsets
<heat_> but LTO works with compiler-internal IR and not instructions
<heat_> it's not the same thing
<clever> yeah
<clever> its basically letting gcc re-generate the whole program, based on distance hints
<heat_> but e.g for x86 you have the same problem when picking between jmp imm8 and jmp imm32 and i have no idea how they do it, maybe they only try to gen imm8 for jumps in the same symbol? or the same section
<clever> and then gcc can pick better opcodes, now that it knows the distance
<clever> there is also the mcmodel argument, which is missing on some ISA's
<clever> mcmodel tells gcc to prefer certain styles
<heat_> anyway all of this means that I need to reserve 5 bytes for my jump labels even if the x86 jmp ends up being smaller
<heat_> which is annoying but seriously hard/impossible to figure out ahead of time
<clever> the linux x86 kernel profiling also does some similar funny bussiness
<heat_> i know it does
<clever> the gcc profiling flag, just inserts a function call at the start of every function
netbsduser`` has quit [Ping timeout: 264 seconds]
<heat_> i stole the static_key/jump_label idea from them :p
<clever> but linux then patches it out
<heat_> yes, but that's something else
<clever> thats also bricked some network cards
<heat_> and in that case it's *always* 5 bytes
<bslsk05> ​lwn.net: The source of the e1000e corruption bug [LWN.net]
<heat_> and in fact gcc can pre-patch those out for you and give you the call sites in a special section
<clever> TLDR, linux is lazy about the patching (tlb and icache stuff), and batches the patching
<clever> but if some .text gets unmapped, and MMIO takes its place in virtual space...
<heat_> oof
<clever> and one stray write, is enough to brick an e1000 NIC, enough that it wont even pcie enumerate
<clever> rpi at least protected sensitive mmio with a "password", you must OR 0x5a000000 into every data you write, or it has no effect
<heat_> that's weird
<clever> only the clock and power registers have that
heat_ has quit [Ping timeout: 258 seconds]
gog has quit [Ping timeout: 240 seconds]
masoudd has joined #osdev
agent314 has joined #osdev
sjs has quit [Remote host closed the connection]
[itchyjunk] has quit [Read error: Connection reset by peer]
sjs has joined #osdev
duthils has quit [Ping timeout: 240 seconds]
gbowne1_ has joined #osdev
gbowne1_ has quit [Remote host closed the connection]
gbowne1_ has joined #osdev
gbowne1 has quit [Quit: Leaving]
Osmten has joined #osdev
gbowne1_ has quit [Quit: Leaving]
masoudd has quit [Quit: Leaving]
masoudd has joined #osdev
agent314 has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
goliath has joined #osdev
agent314 has joined #osdev
agent314 has quit [Client Quit]
admiral_frost has joined #osdev
Left_Turn has joined #osdev
danilogondolfo has joined #osdev
nyah has joined #osdev
Burgundy has joined #osdev
admiral_frost has quit [Changing host]
admiral_frost has joined #osdev
admiral_frost has quit [Quit: It's time]
admiral_frost has joined #osdev
rustyy has quit [Ping timeout: 272 seconds]
rustyy has joined #osdev
Osmten has quit [Quit: Client closed]
masoudd has quit [Ping timeout: 245 seconds]
GeDaMo has joined #osdev
tomith has quit [Quit: tomith]
gog has joined #osdev
[itchyjunk] has joined #osdev
Left_Turn has quit [Remote host closed the connection]
Left_Turn has joined #osdev
pounce has quit [Ping timeout: 245 seconds]
Left_Turn has quit [Remote host closed the connection]
pounce has joined #osdev
Left_Turn has joined #osdev
Left_Turn has quit [Read error: Connection reset by peer]
Left_Turn has joined #osdev
lojik has quit [Quit: ZNC 1.8.2 - https://znc.in]
lojik has joined #osdev
bauen1 has quit [Ping timeout: 255 seconds]
netbsduser`` has joined #osdev
Vercas2 has joined #osdev
Vercas has quit [Ping timeout: 252 seconds]
Vercas2 is now known as Vercas
vai has joined #osdev
<vai> hi
<gog> hi
ripsquid has quit [Ping timeout: 246 seconds]
craigo has joined #osdev
danilogondolfo has quit [Quit: Leaving]
Vercas has quit [Remote host closed the connection]
Vercas has joined #osdev
Turn_Left has joined #osdev
<goliath> hi
<mcrod> hi
<mcrod> fuck google
Left_Turn has quit [Ping timeout: 246 seconds]
<zid> guck foogle
<zid> That's my stripper name
<zid> I am asian when I'm a stripper
<Ermine> hi gog
<gog> hi Ermine
<Ermine> I'm once again struggling to set up wireguard tunnel
<zid> is tehre an point to using wireguard over openvpn?
<zid> big perf?
<mcrod> here's why I hate google
<bslsk05> ​en.m.wikipedia.org: Web Environment Integrity - Wikipedia
<mcrod> *this*
* zid un-m's your link
<pitust> web environment integrity is such a scam
<zid> sounds disgusting
<pitust> its not ensuring the integrity of anything iiuc
<FireFly> it seems like the usual thing of "let's spin a feature in a way that makes it harder for critics to oppose it"
<zid> amp can suck a cock too
<FireFly> see also the ongoing chat control stuffs EU-wise that gets spun with "but think of the children"
<pitust> i also love how their github page doesnt allow anyone to comment except them
<pitust> this proposal isn't stopping fraud, really
<pitust> a fraudster can get a normal pc, get chrome on it, and do whatever fraud they want (plus they can use chrome extensions or accessiblity apis to do any amount of automation desired)
<mcrod> 10-15 years ago, this shit wouldn't have been a thing.
<mcrod> all the joy and fun of this shit is being sapped away I think
<zid> web is horrendous, I haven't wanted to touch it since like 2004
<zid> excepting webgl, that was a bit of un
<zid> fun
<zid> gog: https://i.imgur.com/iwByYyl.png do you know what this is?
<bslsk05> ​i.imgur.com <no title>
bauen1 has joined #osdev
<mcrod> web is indeed horrnedous
<mcrod> horrendous*
<zid> horrednous too
<FireFly> pitust: well tbf they've also separately been working on reducing the scope of those APIs, but it doesn't really change the point that it's just another hurdle to overcome if you're determined enough (or just do it manually/with cheap labour)
<mcrod> however, it wasn't so monopolized as it is today
<zid> ehh the era where the web wasn't monopolized was a blip, it seems
<zid> <IE5>, <mix of shit>, <chrome>
<mcrod> nor was it the land of javascript and 3942834234 other stacks of bullshit
<pitust> i mean to be fair theres firefox and safari
<FireFly> barely
<mcrod> firefox *was* the ruler of the world before google came in and crushed them
<pitust> but it's a functional web browser, and the specific web browser you use doesn't really matter
<mcrod> i use chrome because 99% of websites are geared towards supporting basically only chrome these days
<mcrod> even if they implement poor shit behavior it becomes law due to their market share
<pitust> well idk i haven't seen a website not work in ff
<mcrod> i haven't either, but 6% of the browser share vs chrome's like 65% is pretty telling what developers will prioritize
<pitust> ofc
<pitust> but the browsers are pretty damn similar anyway
<mcrod> i'm going to sound like i'm 90 years old but when I was 15 (i'm 30 now), things were a lot less... bad
<pitust> and most people use react or a similar framework and they *do* optimize for all the browsers
<zid> there is firefox, but, all they do is chase chrome
<zid> else the web would stop working for i
<mcrod> that's because they have to
<mcrod> right
<pitust> yeah i guess
<zid> chrome posts a stack of specs 6 feet high, per year
<mcrod> google won the browser wars
<zid> at least they post specs I guess
<zid> IE never did
<mcrod> and google chrome will probably never lose its #1 spot
<pitust> i cant see them falling out of favor unless goog goes bankrupt or something
<mcrod> no matter what google does
<zid> There's a google article somewhere where the premise is basically just that, it's impossible to write a webbrowser
<zid> good*
<pitust> well no if goog goes bankrupt or if they are forced by the eu to stop doing chrome or something
<zid> The rate at which the web (read: chrome) adopts new specs is faster than any organization other than google, or mozilla just having to tweak ff, still with a huge team, could ever pull off
<mcrod> that'll never happen
<zid> and starting from scratch to do it now would basically be impossible
<mcrod> the era of big major tech companies suddenly totally failing is basically ovef
<mcrod> over*
<mcrod> the ones that are around (apple, google, etc) are going nowhere
<zid> proletiariat revolution in the US is about the only way
<FireFly> <pitust> well idk i haven't seen a website not work in ff <- every now and then you get well-known webapps not working in firefox because idk fuck you I guess.. see also: slack and their voice calls
<pitust> slack is fake and my audio config is broken anyway :^)
<bslsk05> ​explore.org: Fat Bear Week 2023 | VOTE
<zid> don't think this works in ff, I can't vote
<vai> zid: U.S. needs a pension system like Finland has.. everyone gets a pension, no matter if you work or not
<FireFly> psch that's far too commie,
<mcrod> i can see why some people still use windows 2000 and windows 98
<mcrod> not kidding
<mcrod> zid you know exactly who i'm talking about too
<vai> mcrod: my friends still use Basic V2
<FireFly> not sure what I'd use win2k for in this day and age
<FireFly> as much as I used it once upon a time
<vai> something in common with old Slackware and Windows 2000... all services are open to attacks
<mcrod> hey i'm not saying i'd use it myself
<zid> I'd still be using w7 if I could
<mcrod> but win2k was... beautifully simple
<vai> zid: me Windows XP personally
<zid> and I'd have still been using xp64 if I could have, prior to 7
<zid> w11 looks like w10 with even more ads, and even fewer ways to make it act like windows xp
<FireFly> win2k was pretty solid and robust, but also, today?
<zid> 2k lacks too many things modern hw takes for granted to work as a modern OS
<zid> SMP, HPETs, SSDs, to name just three
<mcrod> at least there was *no fucking ads*
<mcrod> there was no major intrusion
<FireFly> oh sure
<FireFly> I forgot OSes these days have ads in them sometimes
<zid> god I miss w7's windows update, too
<zid> select which packages to install, when you want to, and install them
<pitust> take win2k and insert a win10 kernel :^)
<mcrod> when I installed windows 11 recently
<FireFly> idk last windows I had installed was XP
<mcrod> i had to spend a good half hour removing the preloaded stuff, which included tiktok
<FireFly> I don't game enough to bother with windows these days
<pitust> wait what are they preloading tiktok
<mcrod> yes
<zid> w10 doesn't have drivers for my capture card :(
<mcrod> it comes standard with win11 installations
<zid> w10 comes with.. purple palace?
<zid> I nuked the store, but nuked it too hard and broke something
<vai> zid: run it over a converter
<zid> so I had to dig through google (which is now close to useless) to fix it
<zid> :(
<vai> Maybe you can virtualizeit
<mcrod> right now I have my linux system set up exactly the way I want it to work
<mcrod> there are some quirks but it's manageable
<mcrod> at least no matter how bad the Linux environment is sometimes, I won't ever see ads
<FireFly> mcrod: now pray it keeps working as you update software :v
<mcrod> i pray every time I execute yay -Syu
<mcrod> every. time.
<zid> updating is evi
<zid> I do it as little as possible
<zid> It only ever breaks things
<zid> I've not done anything 'new' with a computer in 20 years
<zid> I don't need updates, really, please, stop
<mcrod> you do if security is involved
<zid> bugfix point releases I begrudgingly accept as needed
Left_Turn has joined #osdev
<zid> restyling your application and moving all the buttons, deprecating two vital features and adding a cloud model? yea fuck off.
<zid> tech is an upgrade treadmill scam
<mcrod> fair
<zid> like those fucking peleton bikes
Turn_Left has quit [Ping timeout: 240 seconds]
<FireFly> where does "update dependencies to stay up-to-date with maintained versions, yet as a result major overhauls are needed breaking things" go? that seems to happen a lot with graphical applications and moving between major toolkit versions
* FireFly grumbles in dino still not quite working right after they updated to Gtk4 or whatever
<zid> why do I need major toolkit versions
<zid> I used the w98 theme until it disappeared in.. w10
<zid> and then I spent many hours trying to make it look more like w98
<mcrod> okay that's a little crazy
<zid> what as wrong with it?
<FireFly> classic style/motif-style is fine
<FireFly> nothing wrong with that if one prefers it
<mcrod> no no that's fine
<mcrod> people have their preferences
<mcrod> but I can't imagine using a windows 98 theme personally these days, just a personal thing
<mcrod> heh
<zid> major ui features: minimize/maxmize/close triplet, hmenu, radio buttons, checkboxes, buttons, scrollbars etc
<zid> we still have all those things, now they just look like ass
<zid> because they're less skeumorphic
<zid> also, stupid monitor, stop flashing
<zid> I just rebooted you
<FireFly> at least classic style with bevelled buttons and such clearly shows you where there's a button :p
<zid> Mechanical control panel > awful touch screen
<zid> classic theme emulates the former
<FireFly> I mean I wouldn't go that style myself, but it's certainly very utilitarian
<zid> for a piece of software I use for 20 hours a day
<zid> I'd say that's vital
<FireFly> you should probably get more sleep :P
<FireFly> or alternatively, not use computers while asleep
<zid> https://i.ibb.co/zJCG9vZ/Screenshot.png crappy picture but you get the idea I hope
<zid> resize controls are now 1px large
<zid> titlebar area is unknowable so clicking to drag is hard
<zid> information is super sparse and requires scrlling an *invisible* scroll bar
<zid> most actual useful clicks just end up opening a window with classic window controls *anyway* because these are too limited
<FireFly> I like how a lot of stacking WMs in the linux world allow meta/OS-key + drag to move a window from anywhere
<FireFly> not sure if that's a thing in windows
<zid> if non-classic theme meant "functional but different" that's one thing
<zid> but what it almost always means is
<zid> "we've hidden everything you might want to click in an ugly menu that's hard to find, so that the rest looks 'clean' but is ambiguous"
<zid> "We did extensive statistic collection to know which buttons to hide, and it turns out 90% of people never use this menu, so we just removed it"
<zid> Except 90% of people only opened that menu by accident in the first place looking for something else and immediately closed it :P
<zid> so 100% of the people who intentionally opened that panel, are now buggered
heat_ has joined #osdev
admiral_frost has quit [Quit: It's time]
SanchayanMaity_ has joined #osdev
SanchayanMaity_ has quit [Client Quit]
freakazoid332 has quit [Remote host closed the connection]
<pitust> zid: the scroll bar being invisible doesn't matter to the 110% of people who use a mouse or two-finger scrolling
bauen1 has quit [Ping timeout: 255 seconds]
freakazoid332 has joined #osdev
<zid> pitust: Knowing you can scroll is 99% of it
<zid> as well as knowing where the limit is, but that one is actually solved, if you start scrolling, it magically appears
bauen1 has joined #osdev
bauen1 has quit [Ping timeout: 255 seconds]
bauen1 has joined #osdev
goliath has quit [Quit: SIGSEGV]
bauen1 has quit [Ping timeout: 260 seconds]
bauen1 has joined #osdev
klingfan has joined #osdev
<klingfan> Huuh....
eddof13 has joined #osdev
<klingfan> What is the Secret of the Windows Microkernel
<klingfan> And what is it's homologue in Linux....
<klingfan> Or in Mac OS
<heat_> windows is not a microkernel
<klingfan> You have wrong heat_, in the diagram you can see: "Microkernel"
<heat_> sorry, that's wrong
<klingfan> "Kernel Components Windows NT is like a microkernel in the sense that it has a core Kernel (KE) that does very little and uses the Executive layer (Ex) to perform all the higher-level policy. " This is from microsoft.com
<heat_> that makes 0 sense
<heat_> the "executive layer" is also part of the kernel
<heat_> ntoskrnl.exe even
<heat_> whether they want to brand themselves as a microkernel or not, i don't know. but it's not a microkernel
<heat_> at best it's a *hybrid* kernel
<klingfan> What is the Homologue of the Windows Microkernel in Linux or Mac OS?
<Ermine> u don't have kernel mode drivers in microkernels
<heat_> the nt kernel is aware of files, filesystems, storage drivers, graphics drivers, fucking directX
<heat_> they had an HTTP server in the kernel once
<heat_> GDI is/was also pretty entrenched in nt
<netbsduser``> mach (yes even mach 3+) disagrees Ermine
* Ermine disagrees with mach
<klingfan> As you can see on the Disgram there is a Microkernel in Windows...
<mcrod> it doesn't matter what it says. windows is not a microkernel.
<zid> It's all linked together into one big file, they're just describing ".o files"
<zid> or more realistically, directories of
<Ermine> if I write 'shit' on that diagram will windows become shit?
jimbzy has joined #osdev
<mcrod> the thing is I can understand why this would be hard to accept
<netbsduser``> the term "microkernel" has been historically fuzzy and so some call the 'ke' component of Windows a microkernel, but nowadays "microkernel" is usually used to refer to extremist kernels which evict even fundamentals like the VFS from kernel-mode running
<mcrod> there is a diagram on wikipedia
<klingfan> The Diagram says it clearly, so does this guy a MS Developer https://techcommunity.microsoft.com/t5/windows-os-platform-blog/one-windows-kernel/ba-p/267142
<bslsk05> ​techcommunity.microsoft.com: One Windows Kernel - Microsoft Community Hub
<mcrod> "so it's not a true microkernel."
<mcrod> next!
<klingfan> I will find out in a different channel. /part #osdev I will
klingfan has left #osdev [I will find out in a different channel]
<mcrod> you do that
<mcrod> what a moron.
<zid> could tell he was mental when he first messaged
<mcrod> indeed
<zid> it's why I didn't engage
<mcrod> i get why it might be confusing, but the arrogance is off putting
<netbsduser``> "hybrid kernel" is also a pseudo term i think
<zid> It's not regular arrogance, it's the sort of delusional revealed truth sort
<zid> "these people are hiding the info I know is true"
<mcrod> yeah, might be schizo
<netbsduser``> i have searched long and hard for references to it historically, but the earliest use i can find is Steve Jobs using it to rebrand Darwin
<Ermine> if i get employed by ms and write shit on that diagram will windows become shit?
masoudd has joined #osdev
<netbsduser``> i have proposed this as the correct definition of a 'hybrid kernel': "A kernel which has all the benefits of a monolithic kernel, and none of the disadvantages of a microkernel."
<heat_> that sounds unobtainable
<zid> that's already a monolithic kernel
<zid> "A monolithic kernel that isn't a microkernel" is.. a monolithic kernel
<heat_> haha actually that may be the point
<netbsduser``> read it slowly
<zid> I did.
<masoudd> false dilemma? Is there really only 2 types of kernel?
<zid> advantages are relative
<zid> and the thing it's relative to is monolithic
<heat_> hybrid kernel is kind of a marketing term but i would accept a monolithic kernel that can branch itself out to userspace (userspace drivers) calling itself hybrid
<zid> (mono^micro)^micro is just mono
<netbsduser``> masoudd: i would argue there is no such thing as a 'hybrid' really
<zid> heat_: yea, just using fuse a bunch would fit the branding of hybrid
<netbsduser``> it sounds cool though, which is probably why Steve Jobs invented the term
<heat_> linux can have userspace filesystem and block drivers
<heat_> linux hybrid kernal when??
<zid> When you start a website
<zid> promoting hybrid kernel gnu
<mcrod> me, i'm a freak
<heat_> microsoft.com
<mcrod> i get off on pure monolithic kernels
<zid> I don't see why you'd want anything else
<zid> given how shitty microkernels are
<netbsduser``> where i think the term goes wrong in describing Windows and Darwin is that both are easily analysed as monolithic kernels, just architected with a greater level of abstraction inside the kernel
<gog> mike rowe kernels
<mcrod> they're excellent for certain applications
<mcrod> but for anything else, monolithic
<heat_> the monolithic kernel is a pragmatic kernel
<heat_> it doesn't mean it's the best, but it does mean it's the fastest
<mcrod> indeed
<zid> yea, my applications all require things to be certain ways
<zid> so a microkernel is a non-fit
<mcrod> me, i'd rather squeeze every last drop of performance out of the system
<heat_> mjgcrod
<Ermine> heat_: mesa is very related to linux kernel, can we count it as another proof of linux being hybrid
<mcrod> :D
<zid> I don't need to care about someone hacking my chinese multi-processor games console or whatever
<netbsduser``> i don't believe in the speed argument all that much and i think it's a nonissue anyway
<mcrod> it's definitely an issue
<zid> which seems to be the only place I've seen microkernels have a use-case that at least sounded good
<mcrod> but again it *entirely depends* on your goals
<heat_> the nintendo switch has a microkernel and it's fine and fast
<zid> where you have two monolithic kernels and you IPI syscalls between them and pretend it's a microkernel :p
<netbsduser``> if i felt that the other advantages of microkernels were desirable enough for general purpose OSes i would happily condemn google to pay an extra 1% per year on their server farms
<zid> heat_: also got hacked instantly, whoops
<heat_> it happens
eddof13 has quit [Quit: eddof13]
<heat_> netbsduser``, you don't lose just 1%
<netbsduser``> i picked a random figure, it could be significantly less
<heat_> you mean more
<mcrod> if I had some type of high security/high reliability system, it'd be a microkernel hands down
<netbsduser``> there's no evidence yet to work off because there is no general purpose OS based on a microkernel which has seen the kind of investment and work that gnu/linux or even freebsd have enjoyed
<mcrod> otherwise, mono
<zid> egg on face for people who claim microkernels are worth the performance loss for extra security though heat
<heat_> netbsduser``, fuchsia has had significantly more investment than freebsd probably
<netbsduser``> https://www.youtube.com/watch?v=_Ekhm1sCEms thanks google
<bslsk05> ​'Fuchsia Masterclass (potting, pruning, cuttings, hardiness) - Pots & Trowels' by Pots & Trowels (00:10:55)
<netbsduser``> oh it's magenta
<netbsduser``> i know they wanted to unseat Android but i've heard lately it's just a trinket for their smarthubs
<heat_> companies donate to FreeBSD challenge [IMPOSSIBLE]
<zid> freebsd seems like a project you could knock out internally in a year to better standards, ngl
<heat_> nah
<heat_> have you seen the playstation fbsd forks?
<zid> training devs to work on freebsd enough to extend it to do what you wanted ~= writing the extended freebsd from scratch
<netbsduser``> freebsd is called the queen and custodian of networking
<netbsduser``> just look at the outrageous heights of scalability that NetFlix fly it to
<heat_> yeah but that's wrong isn't it
<heat_> linux is used far more often in networking in both server and desktop and mobile and embedded
<netbsduser``> windows yet more on the 2nd count
<netbsduser``> though i have no doubt linux might some day match freebsd's performance as a server if the right backers pour a few billion into that
<heat_> yeah but if you count total devices on the internet, it's linux on top, by far
<heat_> what
<zid> match freebsd? like, get slower?
<heat_> doesn't FreeBSD still have BKLs in some places?
<zid> can freebsd even handle plugging a 100gigE nic in and not having it route all the interrupts to a single cpu and dying on its arse? :P
<heat_> meanwhile they re-invented worse RCU which linux has been doing since... 03-04
<netbsduser``> by god zid, even i don't do that in my toy kernel
<netbsduser``> i have work to do when it comes to more zero-copy though
<mcrod> heat_ performance critical stuff uses finer grained locking
<netbsduser``> freebsd expressed interest in RCU historically but Linux gates it by taking out yet another new patent everytime they change the wording of a comment, though i think they've slowed down on this now
<netbsduser``> now even Microsoft has reportedly began implementing RCU in windows
<heat_> mcrod, r u sure
<mcrod> i'm sure
<heat_> r u really sure
eddof13 has joined #osdev
<mcrod> i'm really really sure
<heat_> even linux sometimes has big locks
<heat_> lackofinvestementBSD isn't beating it on that end
<heat_> in fact freebsd is the only BSD that is not in dire straits when it comes to performance
<heat_> netbsduser``, re: RCU, RCU is only an API, EBBR has been around for quite some time, they only got that like 5 years ago. EBBR is worse than QSBR RCU though, which linux uses
<heat_> all the patent shenanigans could've been bypassed if you licensed it LGPL *shrug*
<Ermine> openbsd gave up on performance, and no amount of investment will save it
<netbsduser``> Ermine: their buffer cache is INCOHERENT
<Ermine> idc
<mcrod> openbsd was never about performance
<mcrod> it was about super security bullshit to the point of it being unusable
<heat_> yeah but it's also bad to unusable on > 8 core systems
<mcrod> you can't deny openbsd's influence though
<mcrod> openssh, libressl, sndio, pf, bionic, etc
<heat_> >bionic
<nortti> isn't bionic the google thing?
<zid> heat_: can you put a fast nic in a freebsd machine?
<mcrod> yes
<heat_> zid, i don't know
<heat_> niceperson, can you?
<heat_> i assume the answer is yes or it would be completely unusable for netflix
<zid> not if you're using it for high bw streaming
<zid> rather than c100k
<zid> linux can do both
<zid> and it's the latter that's hard performance wise
<heat_> mcrod, fyi: openssh is good, libressl is crap, sndio lmao, pf is fine, bionic is objectively ugh and took code from many systems
<mcrod> doesn't change their influence whether it's good or not
eddof13 has quit [Quit: eddof13]
<kof123> "*invisible* scroll bar" yeah these crack me up...when monitors/resolution was smaller...next puts the arrows together for "speed".....now that resolution is large, make it invisible to slow you down lol
xenos1984 has quit [Ping timeout: 240 seconds]
xenos1984 has joined #osdev
bauen1 has quit [Ping timeout: 260 seconds]
<kof123> alternately, trying to use tablet/phone guis on desktops leads to such fun (and vice versa presumably)
SGautam has joined #osdev
<kof123> same thing for sticky menus...got turned into hamburgers apparently
<zid> I was about to say, it'd be nice to see someone take a unix clone kernel and actually make a cohesive desktop env out of it
<zid> then I remembered someone did and it's called osx
Matt|home has joined #osdev
<zid> There's very little sense in which any of the larger OSS community is working towards any sort of cohesive vision, which is precisely why linux doesn't get one
<zid> shit is a mess of random packages because it's just a collection of random packages
<heat_> yeah definitely
<zid> occasionally a distro will make a package that they need to tie other packages together properly, but it's fairly rare
<zid> the best you get is a little pushback/cooperation between individual package authors about apis and stuff
<zid> The same problem does happen in corp development though, I forget the name of the law?
<zid> That the internal subsystems of a package mirror the corporate management divisions of the company that made it
<heat_> yeah
<gog> conway
<heat_> we should stop naming generic statements that may or may not be true <Rando's name>'s Law
<zid> no, conway's law is that if a cell only has 2 of fewer neighbours, it dies
<gog> melvin conway
<heat_> Heat's Law: "we should stop naming generic statements that may or may not be true <Rando's name>'s Law"
<gog> not that other guy whose name i don't know
<mcrod> gog: i am injured, hug
* gog hug mcrod
<zid> I don't think heat is recognisable as a name
* mcrod hug gog
<zid> pedro's law
<gog> what's your injury
<heat_> Warmth's Law
<mcrod> i ripped my fingernail right off of my thumb.
<gog> gog's law: meow meow meow meow meow meow
<mcrod> completely.
<gog> oooooof owie
<Ermine> s/law/doctrine
<heat_> pedro's law: "linox kernal unix pessimal optimal page reclamation"
<zid> <zid> gog: https://i.imgur.com/iwByYyl.png do you know what this is?
<bslsk05> ​i.imgur.com <no title>
<Ermine> optimal onyx when
<gog> catte
<zid> gog: correct!
<gog> carry baby cat
<zid> heat_: Do you know what it is?
<kof123> i'm fine never saying conway's law again...ch.ch.chia pet law works just as well
<kof123> "sculpture" probably has a term for this too
<Ermine> perfect time to say "Not earlier than you finish the fucking #85, Ermine"
<nortti> is it a grotesque?
<zid> correct!
<zid> We've found both the correct answers
<mcrod> i think it's time for some soup
<zid> I'm proud of you all for not saying gargoyle
<zid> have a gold star
<gog> a gargoyle gargs water from its oyle
eddof13 has joined #osdev
<mcrod> gog: make me soup
<mcrod> i can't use my thumb
* gog makes soup
* mcrod eat
<heat_> Ermine, onyx is never optimal but always approaching optimalness
<heat_> since optimal is +inf
<Ermine> Let's say 'sane desktop system' level of optimalness
gog has quit [Quit: Konversation terminated!]
<mcrod> god
<heat_> basically once im finished with pedro/vm-work i'll have approached more or less some level of optimalness in a software build
<mcrod> i hope we don't end up in *another* war
<heat_> then some basic readahead functionality and it's pretty fine as a desktop system, heck you probably don't really *need* readahead
<Ermine> afaik readahead efforts died in linux
<heat_> i mean, linux does readahead
Matt|home has quit [Quit: Leaving]
<heat_> it's just very basic. like you read up to N pages and set a readahead flag in one, and if you end up accessing that page, you trigger more readahead, with maybe N*2 pages, up to a limit
<heat_> it tops out at 256KiB at a time
<heat_> hinting at random basically makes it do... nothing
<zid> heat_: after you're done with pedro/vm-work you need to write me a 50 liner for zid/vm-shit
<heat_> zid, do you have a struct page?
<zid> no I don't need vm objects that's for losers
<zid> I need an allocator
<zid> maybe some nice ranges in a tree too
<heat_> yeah i have an allocator that would be perfect for you, just needs struct page
<zid> fine add a struct page
<bslsk05> ​github.com: hsd/usr/sys/sys/malloc.c at master · heatd/hsd · GitHub
<zid> no you have to add it
<heat_> mckusick-karels was an actual allocator that was BSD's allocator for some really good years
<zid> sounds too fancy for me
<heat_> the only thing it can't do is reclaim pages
<zid> oh, so it's useless
<zid> I can do that
<zid> += n
<heat_> it's not useless
<heat_> you can reclaim objects within a bucket, you just can't reclaim those pages
<heat_> once they get used by malloc, they're pinned for malloc, for that specific bucket
<zid> oh so it can reclaim pages
<zid> it just has to wait until the frees are a bit contiguous or whatever
<heat_> you'd need to modify the design a bit to allow for page freeing
<heat_> if you think of it in a old UNIX PoV it's strictly better than struct inode inode_pool[NINODES];
<zid> I don't
<zid> because I never read the source to old unix
<zid> I never read source in general tbh, I just like to tinker
<zid> and think
<zid> but I am lazy so I don't do that either
<heat_> i cant connect my galaxy buds to linux
<heat_> yer of the linox deskbottom
bauen1 has joined #osdev
mctpyt has joined #osdev
<FireFly> bluetooth is... tempereamental
masoudd_ has joined #osdev
<FireFly> sounds like you lost the bluetooth lottery today
masoudd has quit [Ping timeout: 260 seconds]
bauen1 has quit [Ping timeout: 258 seconds]
masoudd__ has joined #osdev
masoudd__ is now known as masoudd
bauen1 has joined #osdev
masoudd_ has quit [Read error: Connection reset by peer]
admiral_frost has joined #osdev
<zid> I've never managed to connect anyything via bt ever
valshaped7424880 has joined #osdev
<FireFly> I have a setup that works for me (with my machines and my headphones) and I dread touching anything there lest it falls apart
<heat_> the annoying thing is that i've managed to pair these *once* and they worked, albeit with a really shitty connection
<zid> Ask the bosses anything you want, you will only get the lie. And you will get the bullet.
<zid> quote from my bluetooth devices
gog has joined #osdev
<zid> 2:30 until bookwooorm I can't sit still
mctpyt has quit [Ping timeout: 240 seconds]
<FireFly> huh is it debian release day or something
<Ermine> Doesn't RAII imply that mutex should be released on scoped_mutex destruction?
<zid> I'd be annoyed if my raii didn't handle that
<zid> the question is how do you inform the language what a lock is, generally, though
<zid> which is what.. rust sorta aims to solve
<zid> with their heavy ownership annotations
<geist> not exactly osdev but i found this to be really fun
<bslsk05> ​'Coding Adventure: Simulating Fluids' by Sebastian Lague (00:47:52)
klingfan has joined #osdev
<klingfan> I have Discovered that even though part of Windows is called "Microkernel", it's is really just one separate but Equal part of the Whole Kernel, a Basic Component which many other Components build on it..
<geist> yah at the time (late 90s) calling things microkernel was a good marketing idea
<geist> and most folks dont really know what microkernels are, so it stuck
<geist> i tend to see them as somewhat of a continuum, and Nt does have at it's core a microkernelish kernel, or at least initially did, but you have to squint pretty hard
goliath has joined #osdev
<Ermine> hurd was on the roll back then I guess
* kof123 points at pipe dream...this was to geist's comment, not a hurd joke
eddof13 has quit [Quit: eddof13]
gorgonical has quit [Ping timeout: 255 seconds]
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
eddof13 has joined #osdev
Left_Turn has quit [Remote host closed the connection]
Left_Turn has joined #osdev
Left_Turn has quit [Remote host closed the connection]
Left_Turn has joined #osdev
gbowne1 has joined #osdev
Left_Turn has quit [Remote host closed the connection]
Left_Turn has joined #osdev
<heat_> GNUUUUUUUUUUUUUU HURD
<heat_> zid, fwiw clang has lock annotation extension for C and C++
Left_Turn has quit [Remote host closed the connection]
Left_Turn has joined #osdev
masoudd_ has joined #osdev
<zid> cute
masoudd has quit [Ping timeout: 272 seconds]
masoudd__ has joined #osdev
masoudd_ has quit [Ping timeout: 255 seconds]
masoudd_ has joined #osdev
masoudd__ has quit [Ping timeout: 240 seconds]
<klingfan> I will implement my own Kernel a bit like Windows. Complete with a "Microkernel" at it's Heart
<klingfan> Has Anyone else Left the OSDev Discord?
<heat_> first step of writing a nt-like kernel is to realize you're not writing a microkernel
<niceperson> we are unix purists here
<klingfan> They call it a "Microkernel", but I have Discovered, that infact it is Part of the Wider Kernel
<heat_> it's not a microkernel
<heat_> they call it a microkernel because as geist said, it sounded cool back in the 90s
<heat_> i heard they had *some* ideas for a microkernel but quickly discarded those as they realized it sucked
<niceperson> i don't know if something being bad would be a reason for ditching at ms
<klingfan> It is a component, which is called the "Microkernel", and it does These Responsibilities: IRQ Management & IRQ Level Management, Dispatching Threads and Locking, PCID Management, and Other Sundry Things...
night has quit [Quit: goodbye]
<zid> It is 22pm my dudes
<niceperson> wrong
<niceperson> what the fuck even are you doin
<CompanionCube> zid: do you know where your processes are
<klingfan> It is an Independent component which does not do much if you only have it! But it is Independent of other Components except for the HAL. The Higher-Level components such as the Memory Manager, the Object Manager, and Other Executives, they Rely on the "Microkernel" component
night has joined #osdev
<heat_> it is 22:00 yeah
<zid> CompanionCube: they're madly refreshing nyaa for my honzuki fix, ofc
<niceperson> no, it is 22am!
<heat_> klingfan, that graph is bullshit
<acidx> it might be 22h somewhere but I ain't no dude :p
<heat_> "kernel-mode drivers" depend on the HAL, on the "kernel proper", on the executive layer, etc
<zid> everyone's a dude
<heat_> dudette
<zid> plural pronouns are gender neutral
<zid> everythey knows that
craigo has quit [Remote host closed the connection]
<heat_> until you undergo diversity training and they try to make you say yall
<geist> klingfan: a few of us have bounced off the discord, yes. though i dont think we generally like to besmirch them
<heat_> like fucking hell i'm sorry i like diversity as much as the next person but there's NO WAY IN HELL IM SAYING YALL
<bslsk05> ​redirect -> www.reddit.com: Reddit - Dive into anything
<geist> saaaaay it heat
<geist> does your language have a vosotros equivalent?
<zid> what about "Yous" like a gangster
<zid> PREPUB IS OUT
<zid> Yous guys, prepub is out*
<niceperson> can you 'aight'
<heat_> geist, yeah "vocês"
<heat_> vós as well but that's kinda too formal and weird
<geist> ah but voces is used?
<heat_> if i say yall i might go all southern
<acidx> yes, vocês is used
<acidx> (I'm also a lusophone)
<heat_> oh cool
<heat_> there can only be one.
<geist> didn't know if it was like spanish where only some countries use it, etc
<heat_> FIGHT TO THE DEATH
<geist> like maybe brazil doesnt but portugal does, etc
<acidx> geist: brazil uses it, but not in all regions. I'm sure portugal is the same
klingfan has quit [Quit: Quit the osdev server]
<heat_> yeeeeeeeehaw hey yall how u doin
<geist> so fun thing i learned the other day: on riscv on real hardware you need to TLB when *mapping* entries, even if nothing was there before
<heat_> what????
<geist> for reasons i do not completely understand, but it is within the spec, because the spec explicitly is wishy washy about fence.vma and that it's not technically a TLB flush but a more vague 'you modified the page tables'
<heat_> they cache invalid mappings?
<geist> almost like it caches invalid mappings. this is on a visionfive 2, sifive u74 core. no indication they do at all
<geist> but then they dont precisely describe what their TLB does, only that its there and has N entries
<geist> i found when getting zircon running on it is we'd PF on a missing page, then add the page (and not the first time we added a page table either), then exit the PF and it'd just PF again in a loop
<geist> until there was enough disturbance (IRQ, context switch etc) to clean enough of the TLB that it'd make forward progress
<geist> so might fault 100 times in a row until moving to the next page
<geist> adding a sfence.vma when mapping the page clears it right up
<heat_> /*
<heat_> * The kernel assumes that TLBs don't cache invalid entries, but
<heat_> * in RISC-V, SFENCE.VMA specifies an ordering constraint, not a
<heat_> * Relying on flush_tlb_fix_spurious_fault would suffice, but
<heat_> * cache flush; it is necessary even after writing invalid entries.
<heat_> * the extra traps reduce performance. So, eagerly SFENCE.VMA.
<heat_> */
<geist> right,. i still can't possibly imagine how any sort of ordering issue would still end up with it 'active' after diving throught he PF code
SGautam has quit [Quit: Connection closed for inactivity]
<geist> but it's almost like there's some sort of pending load/store sitting there that it just restarts on the way out of the PF
<heat_> this is seriously fucking annoying
<geist> now then the question is do you have to do a global shootdown and i think the answer is no, it's just local
<heat_> they legally allow you to cache invalid mappings
<geist> but then i think you have to always handle at least sfence.vma on a 'spurious' PF
<geist> or just always preemptively sfence.vma when entering a PF, which is probably the right thing to do
<geist> that's probably what i'll add
<heat_> i think you need to do it after setting the PTE, no?
<geist> yeah but then what happens if a microsecond later another core hits it, decides there's no entry to set
<geist> i think in that case you'd want to at least sfence.vma on the way out so it gets another shot at it
<geist> that's probably what the reference to `flush_tlb_fix_spurious_fault` is in the above quote
<geist> but that's probably a reasonable win: only locally TLB flush when setting a new page, but other cores *might* spuriously fault, but then that's still cheaper than preemptively doing an IPI to shoot down the TLB there
<heat_> riscv says: Executing an SFENCE.VMA
<heat_> instruction guarantees that any previous stores already visible to the current RISC-V hart are ordered before certain implicit references by subsequent instructions in that hart to the memory-management data structure
<geist> yah which makes sense. it';s basically both a TLB flush and an dsb, which totally
<heat_> then they also suggest 1) a write fence 2) an IPI 3) local sfence.vma
<geist> anyway this is a case where a new arch throws you a curveball. never heard of one that has this sort of behavior, so it's generally totally safe to assume no tlb flushes on map, or elevate permissions, but alas, no
<heat_> this is like seriously fucking annoying to handle isn't it
<geist> also dunno precisely how the Sinval version of sfence.vma deals with it, but presumably it's basically the same
<geist> no not really, just have to pepper maps/protect with sfence.vma too, locally
<geist> and then make sure PFs sfence, at least it's no cross-cpu shootdown
<heat_> you need to IPI no?
<geist> no that's my point. you can just do it locally
<geist> as the linux comment says
<heat_> unless you want to take the hit when faulting
<geist> yes, but it's ar easonable risk to take that a remote cpu might spuriously fault
<geist> but the local one almost certainly would
<geist> so locally it's cheap, but high percentage of spucrious fault, so go ahead and sfence
<geist> remote, who knows, but as long as you sfence in a PF you're okay
<geist> that's cheaper than taking an exception on the remote cpu for an IPI, since that's 100% guaranteed
<heat_> hmm right
<heat_> i guess
<geist> that's my current model at least, and seems to be what linux does
<geist> i think the explicit sfence.vma in the PF is the fix there, and one that other arches do implicitly
<geist> there's verbiage in x86 and ARM spec about if the cpu will auto dump the TLB on particular types of PFs
<geist> which is why you usually dont have to think about it
<geist> but in riscv who knows, so i thnk it's safe/prudent to just sfence.vma the page that caused the PF on the way out (or way in?)
<geist> and that would clean up any spurious faults if the VM decided to not do anything about it
<geist> afk, meeting a few
<heat_> lets see if freebsd does it right
<zid> ahh honzuki was fucking sick
<niceperson> l mao
<heat_> it does not
<heat_> as far as I can tell
<niceperson> riscv port is basically a PoC
<heat_> i thought it ran on real hardware though? including CHERI and shit
<niceperson> it is beaten into a state where teh few people using it have it operational
[itchyjunk] has quit [Ping timeout: 248 seconds]
xenos1984 has quit [Ping timeout: 260 seconds]
xenos1984 has joined #osdev
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 240 seconds]
goliath has quit [Quit: SIGSEGV]
rustyy has quit [Quit: leaving]
<geist> heat_: i got the impression it sfenced all over the place, which at first i was like 'eww' but maybe they had already figured it out
<heat_> yes they sfence all over the place but not after storing the PTE
<bslsk05> ​grok.dragonflybsd.org: pmap.c (revision 8882b785) - OpenGrok cross reference for /freebsd/sys/riscv/riscv/pmap.c
<heat_> pmap_store is just an atomic_store_64
Turn_Left has quit [Ping timeout: 272 seconds]
<heat_> http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/stdio-impl.h;h=4260468b612e80bb0452efc3c337f8a7edd81a5b;hb=HEAD
<bslsk05> ​git.savannah.gnu.org: Savannah Git Hosting - gnulib.git/blob - lib/stdio-impl.h
<heat_> look at this cursed thing
<moon-child> y tho
Burgundy has quit [Ping timeout: 258 seconds]
<heat_> they need this shit to emulate some extensions i assume
<heat_> needless to say DO NOT CHANGE A FILE STRUCTURE EVER AT RISK OF BLOWING EVERY GNU SOFTWARE THE FUCK UP
<moon-child> tbf it's kinda annoying that fopencookie isn't standard
<moon-child> buut ...
masoudd_ has quit [Ping timeout: 255 seconds]
<clever> heat_: nixos would like to say hello :P
zxrom has quit [Quit: Leaving]
<zid> onyx looking on in jealousy, it tried to say hello but it said h€óéóóol instead
<heat_> olá
marshmallow has quit [Ping timeout: 258 seconds]
<mcrod> fuck
<mcrod> jesus fuck C++
<mcrod> listen to this shit
<mcrod> I have a call that looks like this: main_window_controller_.CallsignGet().toUtf8().constData();