* GiantFox
just randomly spamming all the channels I'm in because heat played with /nick in here
<heat>
spammmm
<heat>
our logs are back \o/
poyking16 has quit [Quit: WeeChat 3.6]
gmacd_ has quit [Ping timeout: 255 seconds]
<gog>
i wil not
<heat>
you will
zid has joined #osdev
<zid>
There, set up SASL so I can actually join the damn channel automagically
<zid>
while my isp is playing silly buggers and/or heat is murdering my router, not sure which
<heat>
i am your isp
<zid>
oh is that why it sucks
<heat>
pay me more and it will suck less
<heat>
i'll upgrade our router from a rpi zero 2 to a rpi 400
<zid>
can you not just stop sucking cus you love me?
<zid>
I wish it were as good as an rpi
<zid>
it's an intel puma with broken tcp offload
<zid>
so it just does everything on the main cpu, badly
<gog>
oops
joe9 has quit [Quit: leaving]
<gog>
so what happens when you use bittorrent
<gog>
does it choke
<zid>
it's also locked down to fuck so I can't even set the wifi password to what I want
<gog>
ew
<zid>
and in 'bridge mode' it drops udp traffic like crazy
<zid>
so it's unusable
<gog>
you can't buy your own equipment?
<zid>
no it's docsis3 nonsense
<gog>
ewwwwww
<zid>
good news btw, the laptop I installed w7 on yesterday?
<zid>
I had to reinstall w7 again today cus I made a mistake
<zid>
and my usb stick was fucking up so it was extra spicy today too
<gog>
i used to have time warner/spectrum and they were "encouraging" their legacy docsis2 modem users to upgrade by increasing prices
<zid>
honestly the best ISP i've ever had in the UK was AOL
<gog>
and i complained repeatedly that i didn't want to rent equipment and they said "there's no rental fee it's $x flat" "even if i provide my own equipment?" "yes" "that's a nonsense fee structure who pays for the modem then" "the modem is free of charge" "in other words spectrum uses the modem to collect information about me and sell" "um..."
<zid>
use whatever you like, flat fee, it was *never* down, and they fixed our bill after the software got set to the wrong phone number
<zid>
no 2 hour disconnects unlike every other flat rate number
<zid>
BT started offering DSL, 16mbps! cheap price!.. 2GB/mo limit (so about 2 and a half minutes or something)
<gog>
lmao yes
<gog>
the fiber ISP i switched to was great tho
<zid>
I'd honestly be 'fine' with virgin if I just didn't have to use this awful hub
<gog>
flat install fee, modem was included with that fee
<zid>
I don't even get install fees, everywhere has virgin :P
<zid>
they send you a 'quick start kit'
<gog>
price was less than spectrum, faster and didn't include extras i didn't want but had to pay for
<zid>
I wonder when my next free speed upgrade is
joe9 has joined #osdev
<gog>
:thinking:
<zid>
they've upgraded my 300kbit to 110Mbps so far
<zid>
because they refuse to bother having more than 3 billing options
<zid>
so every time the packages change I can just phone up and ask for a bump
<gog>
that makes business sense
<gog>
more options, more complexity, more errors, more pissed off customers
<zid>
The more first world your country the worse the internet
<zid>
cus companies have more power
<heat>
i've noticed
<heat>
no data caps?
<zid>
not now
<zid>
for a few years they were throttling from 5pm to 10pm
<zid>
idk if they wanted to stop or a court told them to stop
<mjg>
oh>?
<mjg>
heat: you wanted something fbsd? the answer is use linux
<heat>
mjg, i was wondering how freebsd did efi runtime services
<heat>
but I think I understand it now
<heat>
what's a vm_pager btw?
<zid>
if your vm is really long, it prints --next-- until you hit space
<mjg>
heat: i'm not very familiar with that code, but it boils down to managing what backs pages from given vm obj
<mjg>
for example is it a file
<heat>
ah
<heat>
and you need it to map stuff? even in the kernel?
<mjg>
the vm stacks 'vm objects'
<mjg>
at the end of the day when you map pages by mmap or when execing you go down there
xenos1984 has quit [Read error: Connection reset by peer]
<mjg>
it's very messy code originally taken from mach
<mjg>
HISTORY NOTE: there talks back in the day baout taking the new vm (at the time) from sunos
<mjg>
sun programmers were all for it, but sun lawyers blocked the thing
<mjg>
and that's how freebsd ended with mach, despite sunos being largely based on bsd (at the time, rebased on sysv later)
srjek has joined #osdev
GiantFox is now known as LittleFox
isaacwoods has joined #osdev
gmacd_ has joined #osdev
xenos1984 has joined #osdev
<netbsduser>
interestingly netbsd hybridised the mach vm with sunos' system of anonymous memory (and some novelties) to create UVM
[com]buster has quit [Ping timeout: 255 seconds]
<netbsduser>
the principle merit of sunos' treatment of anonymous memory is that it collapses the system of 'shadow objects' found in mach vm by instead refcounting structures which describe pages of anonymous memory
<netbsduser>
so there is only ever a single 'parent object' (in the case of a MAP_PRIVATE mmap'ing of a file, for example)
<netbsduser>
presumably freebsd (as well as macOS, DragonFly, whatever) are nowadays much smarter at dealing with shadow object chains and garbage collecting them, but i like sunos vm/uvm's approach for eliminating that necessity
OS_Expert has joined #osdev
<OS_Expert>
Dear OSDev: I want to thank community and especially MR. KEVIN LANGE for his inspirational work on the Toaru OS. As a young student of the technical institute I discovered community and Mr. Lange's Toaru OS, where upon Iwas inspired to learn principles of operating systems.
<OS_Expert>
Now I am plaesed to accept the post of KERNEL ENGINEER at a major firm of Mangalore, but I must grant credit to those who lit the way for me to proceed down this most exciting career path.
<OS_Expert>
To all I thank and wish good fortune.
OS_Expert has quit [Quit: Thank You]
<gog>
cool
<GeDaMo>
They didn't ask for my bank details :|
<gog>
my account number is 42069247365
<GeDaMo>
My account number is ... 5 :P
<gog>
nice
<graphitemaster>
my password is hunter2
the_lanetly_052 has quit [Ping timeout: 268 seconds]
<junon>
klange: you have a love letter above from someone, if you missed it
psykose has quit [Remote host closed the connection]
gmacd_ has quit [Ping timeout: 268 seconds]
psykose has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
gmacd_ has joined #osdev
liz has joined #osdev
gmacd_ has quit [Ping timeout: 252 seconds]
gareppa has joined #osdev
seer_ has quit [Quit: quit]
gareppa has quit [Remote host closed the connection]
seer has joined #osdev
gildasio has joined #osdev
Vercas6 has joined #osdev
gildasio has quit [Remote host closed the connection]
gildasio has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
* geist
yawns
<geist>
sikkiladho: it's a bit late but did you figure out the 16k/64k page stuff?
eroux has quit [Remote host closed the connection]
<sikkiladho>
I think somewhat but I still can't understand why the page table size should always be equal to the page size.
<sikkiladho>
Someone wrote here that it's to avoid some problems but I don't the concrete understanding
heat has quit [Remote host closed the connection]
jafarlihi has joined #osdev
<geist>
mostly it's a software thing: OSes like to allocate physical ram in units of the current page size
<geist>
so in that case you also allocate page table pages alongside other stuff
<jafarlihi>
Does anyone know how I can find resources on "structural" search & replace? I want to convert some repeated TypeScript code with common structure to C++.
<geist>
so having a consistent size makes it easier
heat has joined #osdev
<geist>
there have been some page table sized systems where the page table size wasn't the same as page size (older arm32 for example had 1K page tables) but it's far easier if they match
<j`ey>
on 16/64 the intermediate levels arent page sized
<j`ey>
*16k/64k
<sikkiladho>
@j'ey yes because there aren't enough bits left
<j`ey>
so I guess make the last level a full page, and split the other levels evenly?
<geist>
j`ey: on arm64 they absolutely are
<geist>
all the levels are the same size
<sikkiladho>
like in 16K and 48 va case, offset =14 bits, now for L3=11 bits(2*11 * 8 bytes = 16K) L2=11 bits, L1=11 bits now there's only 1 bit left for L0
<geist>
sikkiladho: yes. there are less levels based on a) the base page granule and b) the number of bits you configure the address space for
<geist>
and it doesn't come out evenly
<geist>
so in that case you could configure it for one bit less aspace (in the TCR_EL1) and then you only have 3 levels of page tables
<geist>
that would generally be what you'd do. or configure it for even less levels (14 + 11 + 11 = 36 = 2 levels of page table)
<geist>
or there's another feature where you can configure a full 48 bit with 16k pages but declare that the top page table is 2 pages long
<geist>
that's another configuration field in the TCR. you can tell it to merge 2^N pages at the top level to form a large contiguous top L0 table
<j`ey>
this has a different number of entries per level
<geist>
j`ey: ah yes, but only at the *top* level
<geist>
the intermediate levels are always fully present, but the top level may be chopped off
<geist>
and it's variable because of the two features i was talking about
<geist>
i think most oses would configure it to 'round up/down' to the next page size
jafarlihi has quit [Quit: WeeChat 3.6]
<geist>
the way arm presents it in the manual is pretty confusing, it's easier to grok it from the hardwares point of view and then derive the stuff from that
<geist>
and yeah there's also the 52 bit virtual extension, but that's only available when using 64k pages
<geist>
primarily because it already chopped off a level of page tables by default, so they get a level back by going to 52
<j`ey>
geist: FEAT_LPA2 allows 52-bit VA with 4K and 16K
<geist>
hmm, how does it extend the 4K one out? ooooh i bet you get the 4 bits by merging 16 pages at the top level
<geist>
downside there is the top level page table ends up being a contiguous 64k physical run
<j`ey>
reuses the shareability bits
<geist>
are you sure you're not talking about 52 bit PA?
<geist>
VA doesn't need any bits, you just need more PT entries in the tree somehow
<geist>
PA you need to find bits somewhere
<j`ey>
oh yeah sorry, the PA bits are in the shareability bits
xenos1984 has quit [Read error: Connection reset by peer]
<geist>
yah i think > 48 bit VA is only really possible with > 4K pages by definiton unless 5 level paging is involved, *or* you merge one of the page levels to make linearly contiguous page tables
<j`ey>
there's level -1 now
<geist>
oh?
<j`ey>
which is the 5th level, as you said
<geist>
oh ugh. is this in a new feature?
<geist>
FEAT_LPA2 maybe?
<geist>
anyway, gotta go. bbiab
<j`ey>
yep it's part of FEAT_LPA2
<sikkiladho>
in linux there's a macro to determine the no of levles, given va_bits and the offset bits(or page size). With 52 va and 4k page, it gives out 5 page levels. https://godbolt.org/z/Pd1nMa4jM
<bslsk05>
godbolt.org: Compiler Explorer
GeDaMo has quit [Quit: A program is just a bunch of functions in a trenchcoat.]
<j`ey>
sikkiladho: at least compile for arm64 :P
<netbsduser>
geist: something i am curious about - does CoW cloning of vm objects happen often in fuchsia? i assume relatively much less than in Unix, since there is no fork() that i can see
<sikkiladho>
j'ey: it's by default, apologies for the blasphemy :P
<j`ey>
sikkiladho: ;)
<raggi>
netbsduser: every file from the blobfs is a cow clone
<raggi>
(which is also read only)
<netbsduser>
raggi: would it be become then for 2nd- and 3rd-order (and so on) clones to be made of those clones?
xenos1984 has joined #osdev
<netbsduser>
*be common
<raggi>
not generally
vdamewood has joined #osdev
vinleod has joined #osdev
vdamewood is now known as Guest1030
Guest1030 has quit [Killed (iridium.libera.chat (Nickname regained by services))]
vinleod is now known as vdamewood
heat has quit [Remote host closed the connection]
heat has joined #osdev
Vercas6 has quit [Remote host closed the connection]
Vercas6 has joined #osdev
[itchyjunk] has quit [Read error: Connection reset by peer]
gildasio has quit [Remote host closed the connection]
<geist>
netbsduser: yah what raggi said. generally cow cloning happens at the file level, or vmos that back file
<geist>
we actually have a problem where the shadow copies get exceptionally long for highly cloned vmos, like libc.so
alpha2023 has joined #osdev
[itchyjunk] has joined #osdev
<netbsduser>
geist: this is exactly the thing i was curious about
<mjg>
that's the mach problem -- you can get yourself into really long object chains
<netbsduser>
netbsd faced that problem (although more often because of fork()ing) and solved it by abolishing the concept of a shadow chain. the CoW cloning of e.g. the VM object of a device vnode yields an anonymous VM object with the device vnode's VM object for a parent. anonymous objects operate by reference-counting their pages instead (so cloning creates a new object with reference to all the pages whose refcnt is now incremented; a write fault on that
<netbsduser>
page anywhere = copy it)
<geist>
yep. and we made it worse by ensuring that the tree has a fan out of precisely 2. it makes GCing the shadow chain instantaneous
<geist>
but it has the effect of causing very long chains for thins that you clone over and over again
<geist>
and yes, we've been discussing a ref counting paging scheme
<geist>
though havne't looked at what existing systems do
<geist>
mostly been trying to decide how to ref the pages without iterating over all of them. have been thinking of some intermediate schemes for runs of pages or whatnot
<geist>
but yeah the simple strategy is to walk up the tree and for every page that is now cloned that is present, bump the ref
<geist>
question then is when you bring in a new page at the root, does it have to get its ref bumped to N, where there are N shadow vmos, etc
<geist>
a few different axis of design there
<geist>
or does it store the ref count on the 'slot' of the page in the vmo, not the page itself
<geist>
the slot means you can do it up front, but then does more work, because you have to ref for the full size of the vmo, even if there are pages not currently present
<netbsduser>
it stores it in a structure called a vm_anon which refers to the page proper, an anonymous vm object has a two-level table of these anons
<geist>
but this is part of the design work we've been mulling over. we dont really look at existing designs when thinking at this level, since that tends to cloud your judgement a bit
<geist>
ie, it's hard to un-see a good existng design
isaacwoods has quit [Quit: WeeChat 3.6]
<geist>
part of what we've really been trying to scale the storage of vmos on how many pages are currently present, so have been avoiding intermediate structurs that describe ranges of vmos or whatnot
<geist>
ie, you should be able to make a 4TB vmo with the same amount of space as a 4K vmo, and the actual usage of kernel heap is based on how many pages are physically present
<geist>
but that may be a fools errand in the long run
<netbsduser>
netbsd's way of dealing with that is only partial, it lazily allocates the array of chunks (which is the first level of the table of pages belonging to an anonymous vm object) and also the second level. so it reduces expenditure a bit, but the first-level array still needs to be quite big if you have a 4tb object but only write to its final page
<geist>
yah some sort of radix tree thing probably
<netbsduser>
it would be interesting to benchmark on how a simple 2-level table v.s. a radix or some other sort of tree would perform
vdamewood has quit [Quit: Life beckons]
vdamewood has joined #osdev
vdamewood has quit [Quit: Life beckons]
wootehfoot has quit [Read error: Connection reset by peer]
gildasio has quit [Ping timeout: 268 seconds]
terminalpusher has joined #osdev
heat has quit [Remote host closed the connection]
heat_ has joined #osdev
vdamewood has joined #osdev
vinleod has joined #osdev
vdamewood has quit [Killed (molybdenum.libera.chat (Nickname regained by services))]
vinleod is now known as vdamewood
FreeFull has quit []
terminalpusher has quit [Remote host closed the connection]
MrPortmaster has joined #osdev
heat_ has quit [Remote host closed the connection]