Search logs:

channel logs for 2004 - 2010 are archived at http://tunes.org/~nef/logs/old/ ·· can't be searched

#osdev2 = #osdev @ Libera from 23may2021 to present

#osdev @ OPN/FreeNode from 3apr2001 to 23may2021

all other channels are on OPN/FreeNode from 2004 to present


http://bespin.org/~qz/search/?view=1&c=osdev2&y=24&m=7&d=3

Wednesday, 3 July 2024

02:19:00 <azonenberg> Is there a way to automatically discard unused sections at link time, a la --gc-sections, but somehow also mark specific sections as "never discard even if unreferenced"?
02:30:00 <Mutabah> Add them to the NODISCARD section in the linker script
02:32:00 <Mutabah> (I think?)
02:33:00 <Mutabah> azonenberg: Wrap the reference in the linker script with `KEEP( )`
02:34:00 <Mutabah> https://github.com/thepowersgang/rust_os/blob/master/Kernel/Core/arch/amd64/link.ld#L21
02:34:00 <bslsk05> ​github.com: rust_os/Kernel/Core/arch/amd64/link.ld at master · thepowersgang/rust_os · GitHub
02:47:00 <azonenberg> Mutabah: aha thanks
02:48:00 <azonenberg> (I had problems with hardware SFRs being discarded and subsequent SFRs showing up at the wrong place in address space)
03:19:00 <Matt|home> serious question philosophical debate kinda thing
03:20:00 <Matt|home> On average, would you say that software bloat has gone up? In general for things like web browsers which get -very- frequent complaints about inefficient memory usage, and that unnecessary additional software you get with modern samsung phones nowadays
03:21:00 <Matt|home> and if so.. does that also apply to kernel and OS code as well? or is it _absolutely_ needed nowadays to use up that much memory
03:21:00 <Mutabah> Well, a lot of that can be attributed to the compexity of modern systems, and expectations about them
03:21:00 <Matt|home> e.g. quick google search says the windows 10 OS is about 15 gigs uncompressed
03:22:00 <Matt|home> but is that all kernel code or is it like, graphics stuff which are big by necessity
03:22:00 <Mutabah> ... and the amount of assets required to make an OS look pretty
03:22:00 <Mutabah> ntoskrnl is probably nowhere near large
03:22:00 <Mutabah> although, drivers can get big
03:22:00 <Matt|home> right. what im saying is, is there a way to be more efficient with our use of data and memory without sacrificing practicality
03:22:00 <Matt|home> or is this pretty much as good as it gets rn
03:22:00 <Mutabah> Especially graphics ones, with lots of features (and per-game hacks)
03:23:00 <Matt|home> the only reason i brought this up is cuz im doing a _very_ slow write of a windows installer to my usb drive and.. yeah it's taking forever. is it really impossible to do something like the entire windows OS in only a few gigs of data?
03:23:00 <Mutabah> ntoskrnl.exe on my machine is 10MB - seems kinda chunky compared to a hobby OS, but I assume there's a lot of glue code there for the various drivers
03:24:00 <Mutabah> Oh yeah, I think you can trim a windows install down to much smaller - there used to be tools for that
03:24:00 <zid> 10M is pretty small given how old it is, that is to say, 'featureful'
03:24:00 <zid> loot of syscalls in ntoskrnl
03:25:00 <zid> plus it's effectively an 'allyesconfig'
03:25:00 <Matt|home> in terms of extremes i assume we're still limited to the gigabytes range? like, you're never ever gonna be able to make a modern full featured web browser only require 128MB of ram or whatever are you?
03:25:00 <azonenberg> Matt|home: i mean given how big modern web *sites* are
03:25:00 <Matt|home> yeah no chance
03:25:00 <azonenberg> you probably need 128 MB of ram just for the HTML :p
03:26:00 <Mutabah> The browser code? Most likely
03:26:00 <Mutabah> the browser's working set - Unlikely
03:26:00 <azonenberg> But like, on my current embedded platform
03:26:00 <Matt|home> im a little fascinated by efficiency nowadays. it's taken quite an interesting journey.. especially with things like renewable energy now
03:26:00 <azonenberg> I have a TCP/IP stack, SSH server, SCPI server, NTP client, DHCP client, serial console, and a bunch of other things
03:26:00 <Mutabah> a 1080p framebuffer is 2MB on its own - and a modern browser engine will have lots of buffers to make rendering efficient
03:26:00 <Matt|home> but i just have a nasty feeling ten years from now we're gonna have a 20 gig slackware install :\
03:26:00 <azonenberg> In about 160 kB of code and maybe 128 kB of SRAM
03:27:00 <azonenberg> it's running on a 500 MHz Cortex-M7 with perfectly acceptable performance, ssh'ing to it (with a little help from a hardware AES block on the MCU and a curve25519 accelerator on the adjacent FPGA) is faster than a Debian x86 box
03:28:00 <azonenberg> not even a RTOS per se just a single threaded event loop and a few interrupt handlers
03:31:00 <Matt|home> sadly i am beginning to feel the "not enough storage space" creep that im sure literally everyone else started feeling in like.. the early 2000s. but i never needed to store like, 4K videos before okay ;_;
03:32:00 <Matt|home> srsly there is _not_ enough storage space i can afford to keep all my shit on that i really really want to -_-
03:32:00 <azonenberg> Matt|home: i've stopped putting local disks on my boxen
03:33:00 <Matt|home> As of 2023, the largest capacity of a single SSD is 100TB, while the largest capacity of a single Hard Disck is 22TB. Nimbus ExaDrive DC is the largest SSD on the market, with a capacity of 100TB. It is a PCIe Gen3 x4 NVME drive that uses 3D TLC NAND flash.Dec 14,
03:33:00 <azonenberg> other than a tiny ssd for the OS
03:33:00 <azonenberg> All of my bulk data lives on the Ceph cluster
03:33:00 <Matt|home> hm. yeah i'd need like ten or so of those drives to store my stuff. that'd be clunky as hell
03:33:00 <azonenberg> The bulk of that data, in terms of volume of storage, is a few things... my personal photo/video archives dating back to 2004
03:34:00 <azonenberg> FPGA toolchains (almost a terabyte worth of just those, lol)
03:34:00 <Matt|home> lol.. do you guys remember when we needed those bigass floppies to store our stuff, we carried them around in long boxes :D
03:34:00 <Matt|home> i kinda wanna do that with SSDs now
03:34:00 <azonenberg> and high resolution microscope photos
03:34:00 <Matt|home> The list price for the 100 TB ExaDrive DC drive is $40,000, or $400 per TB <-- bahahahahahahahahahahahahaha
03:35:00 <azonenberg> if you ever want to burn disk space fast, get yourself a microscope on a CNC XYZ table and start scanning specimens at 2500 photos an hour
03:35:00 <Matt|home> oh yeah.. i know how huge some images can be
03:35:00 <azonenberg> i can see spikes in the disk usage chart on my cluster every time i turn it on lol
03:35:00 <Matt|home> iirc the upper limit was somewhere around like, 4 gigs or so for the highest resolution/quality frame you could possibly get
03:36:00 <azonenberg> These are stitches not single frames
03:36:00 <azonenberg> single frames are like 4 megapixels coming off my system
03:36:00 <Matt|home> right, but im saying i know how huge that data _can_ theoretically be :d
03:36:00 <Matt|home> :D
03:36:00 <azonenberg> with the highest mag objective the physical sensor resolution is about 45 nm/pixel although the optical diffraciton limit is around 300 depending on wavelength
03:37:00 <azonenberg> but some of my datasets of large specimens are 60K frames stitched and focus stacked lol
03:37:00 <azonenberg> you run into file format or tool size limits very quickly
03:37:00 <Matt|home> average SSD size iiiis.... 500GB, which isn't too bad. so i could carry like 20 of them around in a backpack or something
03:37:00 <azonenberg> JPEG: max 64K in one axis
03:37:00 <azonenberg> as in uint16 pixel dimensions on each axis
03:37:00 <azonenberg> TIFF: 32 bit pointers to chunks so max 4GB file size
03:38:00 <azonenberg> ImageJ stitching tools: 32 bit signed integer pixel indexes so max 2^31 pixels regardless of aspect ratio
03:38:00 <azonenberg> I have hit all three of those limits
03:38:00 <Matt|home> :D gj
03:38:00 <Matt|home> btw what were you scanning
03:38:00 <Matt|home> and which microscope were u using :D
03:39:00 <azonenberg> PCBs and ICs, depending on objective in use. It's a LIP-X1 from Labsmore, a purpose built mass imaging microscope combining a CNC XYZ table with a Mitutoyo optical column
03:39:00 <Matt|home> i have kind of a shitty one i spent.. quite a bit of money on sadly. i really need someone else to take a look at it and help me with the damn lubrication and settings -_-
03:39:00 <Matt|home> ah
03:39:00 <Matt|home> i use mine for bio slides mainly.. been really wanting to finish my chlorophyll video for a while now
03:41:00 <azonenberg> https://siliconpr0n.org/map/micron/mt36asf4g72lz-2g6d1qg-side1/azonenberg_mit1x/
03:41:00 <bslsk05> ​siliconpr0n.org: Loading...
03:41:00 <azonenberg> this is what it does on PCBs at the lowest magnification
03:43:00 <azonenberg> https://siliconpr0n.org/map/unknown/fake-ft232r/azonenberg_dlyr2_ns100x/ and here's a high mag view of a FTDI FT232R clone, after etching off most of the interconnect to show the poly and contact layers
03:43:00 <bslsk05> ​siliconpr0n.org: Loading...
03:43:00 <azonenberg> You can see every transistor of the approximately 5000 gates
03:43:00 <Matt|home> it does the board trace etchings?
03:43:00 <azonenberg> The DIMM was with a 1x objective, the die shot was with a 100x
03:43:00 <azonenberg> both were
03:43:00 <azonenberg> both were stitches of many many frames*
03:44:00 <Matt|home> rofl.. that _is_ impressive. i legit did not know that gates were literally made up of actual transistors
03:44:00 <Matt|home> that's wild, i thought it would've been a different design or something at least
03:44:00 <azonenberg> I do (among other things) silicon security work for my day job, but we use a SEM since modern chips are too small to see all the fun stuff optically
03:44:00 <azonenberg> same idea of thousands of photos stitched though
03:45:00 <Matt|home> btw i should mention im _really_ high right now so you showing me this acid blot trip of the back of the PCB is also incredibly wild :D
03:45:00 <Matt|home> any idea what the purple coloring is from?
03:46:00 <Matt|home> oh is this like a thermal image?
03:46:00 <azonenberg> no thats color optical of the silicon die itself
03:46:00 <Matt|home> ahh
03:46:00 <azonenberg> those are interference fringes from thin layers of partially etched glass insulator
03:46:00 <azonenberg> just like oil on water
03:46:00 <Matt|home> ...
03:46:00 <azonenberg> https://siliconpr0n.org/map/unknown/fake-ft232r/azonenberg_mz_ns100x/
03:46:00 <bslsk05> ​siliconpr0n.org: Loading...
03:46:00 <Matt|home> i have very important instructions i need you to follow
03:46:00 <azonenberg> here's the top layer before etching
03:47:00 <Matt|home> i need you to come here, to where i live, give me your brain just put it in my hands and you can walk away :D
03:47:00 <Matt|home> and i will study it
03:49:00 <Matt|home> sigh.. little under 1/3 of the way done with my friggin usb write.. jesus christ it shouldn't be this slow even at 5MB/s
03:50:00 <zid> smh you spilled a blob of acid onto it
03:51:00 <zid> This is weird
03:52:00 <zid> It's got like, horizontal rows of pads and then just a bunch of vertical links connecting them.. but also a bunch of U shapes
03:52:00 <zid> Is this some standard type of design I'venot seen before
03:52:00 <zid> or is it legitimately weird
03:59:00 <azonenberg> zid: this looks like a very textbook standard cell 2 metal ~600nm design
03:59:00 <azonenberg> maybe 500
04:00:00 <azonenberg> On 3 metal and up processes, normally you have the gates on poly and M1, then alternating layers of horizontal and vertical routing
04:01:00 <azonenberg> With only 2 layers available, you have the gates and horizontal routing both on metal 1 with rows of routing and cells alternating, then vertical routing on metal 2
04:02:00 <azonenberg> https://www.antikernel.net/temp/gates.jpg you can see a couple of individual gates here
04:02:00 <azonenberg> for example the one at the right is an inverter, the vertical white strip with the little tab out to the left is the polysilicon gate
04:03:00 <azonenberg> that's the input, the tab is where a via up to metal 1 was (before i etched it off)
04:03:00 <zid> I need to find that xkcd strip
04:03:00 <zid> https://xkcd.com/2501/
04:03:00 <bslsk05> ​xkcd - Average Familiarity
04:03:00 <azonenberg> then at the top you can see a single P-channel MOSFET with two vias each for source and drain (the structure is symmetric, doesn't matter which is which)
04:04:00 <azonenberg> and a single N-channel at the bottom with one via each for S/D
04:04:00 <zid> ah yes, of course I can
04:04:00 <azonenberg> P-channel tend to have higher resistance than N-channel for physics reasons i dont fully understand
04:04:00 <azonenberg> So they tend to be bigger (effectively more channel width in parallel) to compensate
04:04:00 <azonenberg> https://en.wikipedia.org/wiki/File:CMOS_inverter.svg
04:05:00 <azonenberg> here's what it looks like in schematic
04:05:00 <azonenberg> the vertical bar with the tab is Vin
04:05:00 <vin> azonenberg: ??
04:05:00 <azonenberg> then the left or right side of each of the two transistors connects to power (top side) or ground (bottom side) while the other side is the output
04:07:00 <azonenberg> zid: https://www.antikernel.net/temp/gates2.jpg
04:07:00 <azonenberg> here it is with the metal 1 connectivity drawn over it
04:07:00 <azonenberg> top blue bar is power, bottom is ground, red is input, right hand blue is output
04:08:00 <azonenberg> each of the blue-red-blue sandwich structures is a transistor
04:09:00 <azonenberg> vin: sorry i meant V_{in} lol
04:09:00 <azonenberg> Matt|home: does that make any sense?
04:11:00 <azonenberg> you can see a second, mirror image NOT gate at the left of the image, and then in the middle there's what looks like an AND2 (an inverter paired with a NAND2) although i can't be absolutely certain without seeing the corresponding metal layer
04:12:00 <azonenberg> (e.g. it might be a NAND2 with one *input* inverted rather than the output)
04:12:00 <azonenberg> But it clearly contains a NAND stage and an inverter stage
04:13:00 <Matt|home> mh?
04:14:00 <Matt|home> oh god no, im tripping balls right now
04:14:00 <azonenberg> lol
04:14:00 <Matt|home> but i get the general gist of the fact that you know everything behind pcb and computer engineering
04:14:00 <azonenberg> i wish i did :p
04:14:00 <azonenberg> the rabbit hole goes deeeeep
04:14:00 <Matt|home> oh if you're that smart i could get you to answer a question for meh
04:15:00 <Matt|home> so.. when i say "computers" i mean in the most generalist vague sense. for me the most common type of computer i can think of is an IBM
04:15:00 <Matt|home> but im including like macs and whatever
04:15:00 <Matt|home> so in general, for computers, is there a way to physically prevent pressing the power button and holding it down from doing anything? can you interrupt something that low level?
04:15:00 <Matt|home> i.e. the only way to turn it off is to unplug it
04:16:00 <Matt|home> i asked this b4 here and the answer i got was iirc "not really" but im curious if u know the specicifs:d
04:16:00 <azonenberg> I don't know how that is actually implemented on desktop PCs
04:16:00 <Matt|home> aw
04:16:00 <Matt|home> sadness
04:16:00 <azonenberg> On laptops, I would expect this is a GPIO input to the embedded controller
04:16:00 <azonenberg> And the EC actually implements the "hold down for X seconds" check
04:16:00 <azonenberg> and then shuts things down
04:17:00 <azonenberg> So with custom EC firmware you could theoretically override it
04:17:00 <azonenberg> On my own hardware, I have soft power on/off functionality implemented like this, I have a dedicated Cortex-M0 or M4 microcontroller that connects to the enable and power-good signal of every power rail in the system
04:17:00 <azonenberg> plus the reset of the main processor, the FPGA, etc
04:17:00 <Matt|home> could you brick a computer hard enough that it rebooted too fast constantly for you to do anything about.. or is there no real way to prevent entering the bios like that
04:17:00 <azonenberg> when you ask it to turn on it'll turn on each rail in the correct sequence then sit in the background waiting for you to push the off button
04:18:00 <azonenberg> (or for a rail to drop out of the safe voltage range in which case it does a panic shutdown)
04:18:00 <azonenberg> um, i mean if nothing else you could overwrite the flash that the bios is stored on
04:18:00 <azonenberg> the CIH virus famously did this years ago
04:18:00 <Matt|home> yeh im just being silly
04:18:00 <Matt|home> hm. yeah bios flash would suck
04:19:00 <azonenberg> a lot of more modern systems have the bios as a socketed DIP chip so its still field swappable if completely hosed
04:19:00 <azonenberg> (vs soldered down)
04:19:00 <Matt|home> in terms of malware im actually kinda enamored with worms. i just really think the idea of self propogation is awesome, but apparently they're stupidly complex
04:19:00 <azonenberg> Depends on the platform and what libraries are available etc
04:20:00 <Matt|home> i've heard of the CIH virus, but i forget the name of it.. it was a worm that was just a school project or something but it was so effective it infected half the internet in the 90s :D
04:20:00 <azonenberg> and how hard getting into the target is
04:20:00 <azonenberg> the morris worm? the original one?
04:20:00 <Matt|home> buster worm?
04:20:00 <Matt|home> oh yeah morris lol
04:20:00 <Matt|home> i need to think of a better name for my virus..
04:21:00 <Matt|home> right now it's just called santa's workshop but i kinda don't like the origins of that name so
04:22:00 <azonenberg> What's more fun is the whole cat and mouse between malware and AV developers
04:22:00 <Matt|home> https://en.wikipedia.org/wiki/Morris_worm <-- ..... rofl. can you imagine some jackass museum curator asking if he can keep shit from your house to put on public display? the guys still alive :D
04:23:00 <azonenberg> For example, since malware started to use packers to obfuscate themselves, pretty much any modern AV actually contains a sort of emulator
04:23:00 <azonenberg> that basically runs the target malware in a simulated system to see what it does
04:24:00 <azonenberg> and looks for either it unpacking a known malware payload, or doing various things like writing to certain system files that raise red flags
04:24:00 <Matt|home> It is usually reported that around 6,000 major UNIX machines were infected by the Morris worm. Graham claimed, "I was there when this statistic was cooked up, and this was the recipe: someone guessed that there were about 60,000 computers attached to the Internet, and that the worm might have infected ten percent of them".[10] Stoll estimated that "only a couple thousand" computers were affected.[5]
04:24:00 <Matt|home> The Internet was partitioned for several days, as regional networks disconnected from the NSFNet backbone and from each other to prevent recontamination while cleaning their own networks.
04:24:00 <azonenberg> But these simulations are imperfect and if you know enough about how the emulator is implemented, you can detect you're not on a real PC and just sit tight and not do anything malicious, in hopes of not being picked up by the scanner
04:25:00 <Matt|home> bahahahahahahahahahahahahaha :D they had to turn off the internet to prevent infecting each other :D luuuuuls
04:25:00 <azonenberg> https://www.usenix.org/conference/woot16/workshop-program/presentation/blackthorne
04:25:00 <bslsk05> ​www.usenix.org: AVLeak: Fingerprinting Antivirus Emulators through Black-Box Testing | USENIX
04:25:00 <azonenberg> So the emulators are all obfuscated and locked down to make it harder to fingerprint them
04:25:00 <azonenberg> and of course a bunch of my classmates years ago blew that wide open :p
04:43:00 <azonenberg> unrelated: apparently on risc-v with recent gcc, -fno-exceptions does not imply -fno-threadsafe-statics
04:43:00 <azonenberg> so if you declare a static object in a function g++ will still try to create a whole bunch of mutexing that can throw exceptions and brings in like 50+ kB of libstdc++ i dont want
04:48:00 <zid> do we know any serenityos people as a hole?
04:49:00 <zid> whole*
04:56:00 <vin> I am trying to understand if/when linux merges or divides VMAs (/proc/pid/smaps). I read https://landley.net/kdocs/ols/2009/ols2009-pages-19-28.pdf but it only talks about sharing pages across virtual machines and nothing about a VMA merges in a single process
05:41:00 <geist> VMA as in a single mapping
05:41:00 <geist> ?
05:41:00 <geist> i think it splits and merges then opportunistically. like if you map something and unmap something in the middle of it, it has to split it
05:42:00 <klys_> after switching to freedos everything works, and it can chainload w95b of course, i should have used freedos sooner.
05:43:00 <klys_> well the first thing that worked was to try grub1 on the vm
05:43:00 <geist> i've been reinstalling my main server box with proxmox
05:43:00 <geist> actually have a little cluster of two proxmox servers right now, pretty neat
05:44:00 <klys_> i've been through this cycle a few times, freedos -> grub4dos -> linux -> kexec grub4dos -> grub2 -> linux -> kexec grub4dos -> repeat
05:44:00 <klys_> proxmox is known for some kind of use case i forget what exactly
05:45:00 <klys_> otoh, I know this is ovmf, except it seems to ignore /EFI/boot/bootx64.efi
05:46:00 <klys_> right, i'll try putting the gpt mbr back now...
06:06:00 <klys_> yeah it goes straight to mbr
06:08:00 <klys_> right iirc proxmox is a distribution featuring qemu
06:13:00 <Mutabah> Iirc it's a KVM/qemu wrapper UI/framework for distributed virutalisation
06:14:00 <klys_> oh I found efi
06:19:00 <klys_> the shell says a lot of the .efi files are "not an application."
06:24:00 <klys_> then if I load grubx64.efi -> linux -> kexec grub4dos -> I get an unresponsive grub prompt with Memory: 0K / 0M, MenuEnd: 0x47FFD
06:46:00 <vin> Yes geist I wanted to know what "opportunistically" actually means and if there is a way to disable it
07:13:00 <Matt|home> ^^ hello
08:56:00 <chiselfuse> i used ida to disassemble a binary and output this https://0x0.st/XaJl.asm
08:57:00 <chiselfuse> is this a valid assembler file that i can re-assemble again with an assembler? if so, which flavor/dialect is it and which assembler can do it?
08:58:00 <Mutabah> it's intel/nasm format by a quick look
08:58:00 <Mutabah> That said, the `__bss_start db ?` may not compile
08:58:00 <chiselfuse> i'll try nasm then, i wonder if it includes absolutely all info from the original file or if some info is lost
08:59:00 <chiselfuse> Mutabah: what does that line mean?
09:00:00 <Mutabah> Probably that IDA knows that some data could be there, but has no idea what
09:01:00 <Mutabah> It's in the BSS section, which is "Blank State Segment" - a block of writable memory that is initialised to zero
09:01:00 <chiselfuse> i'm guessing that in nasm language it's <name of thing> <size> <value> and there should be a value in place of '?' ?
09:01:00 <Mutabah> Yes, or a `name: resb <size>`
09:02:00 <chiselfuse> resb?
09:02:00 <Mutabah> "reserve byte"
09:02:00 <Mutabah> are you using this to learn assembly?
09:03:00 <chiselfuse> i don't remember nasm requiring that i specify all that elf information in order to assemble an elf from a few instructions. does nasm automatically add elf information unless explicitly specified as in this file?
09:04:00 <chiselfuse> Mutabah: i don't know, i was just using ida for something and i decided i'd try every button it has
09:05:00 <chiselfuse> so now i'm trying this "produce asm" button
09:09:00 <Mutabah> Most assemblers will/can emit ELF files - I assume this is intended to be emitted as a raw binary instead
09:11:00 <netbsduser> https://github.com/apple-oss-distributions/xnu/blob/main/osfmk/kern/smr.c
09:11:00 <bslsk05> ​github.com: xnu/osfmk/kern/smr.c at main · apple-oss-distributions/xnu · GitHub
09:11:00 <netbsduser> looks like apple implemented something like freebsd's safe memory reclamation
09:14:00 <netbsduser> the freebsd people are very happy with SMR and think it a real novelty and the better of RCU and epoch in a lot of cases (less space overhead, faster.) i have no idea how it works yet
09:14:00 <chiselfuse> looks like it's some hybrid syntax that doesn't work with most assembler and needs fixing
10:39:00 <geist> netbsduser: interesting
10:42:00 <netbsduser> geist: a possible thing to look at for yourself given these are not patent-encumbered (and apple using it is a good guarantee)
10:42:00 <geist> indeed
10:43:00 <netbsduser> though mjg will turn up (any minute now) to explain why it's pessimal
10:43:00 <geist> it even says it's derived from the freebsd version
10:43:00 <geist> apple has the property that they only have to scale to as big as hardware they make
10:43:00 <geist> so at least for some time they wont have to worry about 256 or 512 core machines, presumably
10:48:00 <nikolapdp> likely ever if you ask me
10:49:00 <nikolapdp> unless they change their mind again on the server side of thigns
10:50:00 <mjg> they implemented it based on the freebsd code
10:50:00 <mjg> it is not pessimal, but it is highly deficient
10:50:00 <mjg> it probably wont matter at the scale os x is running at though
10:51:00 <mjg> the code can end up in a state where all cpus are pulling on the same line
10:51:00 <mjg> when smr was being created i tried to explain to the author this will cause massive trashing but he would not listen
10:51:00 <nikolapdp> mjg what's the difference between rcu and gus
10:51:00 <mjg> what's gus
10:51:00 <nikolapdp> that freebsd thing?
10:51:00 <mjg> freebsd thing is "smr"
10:51:00 <nikolapdp> that one then
10:52:00 <mjg> rcu is a general "did everyone pass the grace period" mechanism
10:52:00 <nikolapdp> > This SMR scheme is directly FreeBSD's "Global Unbounded Sequences".
10:52:00 <nikolapdp> from the apples' code
10:52:00 <mjg> lol i never heard "global unbounded sequences"
10:53:00 <mjg> anyhow smr is kind of like epoch, except freed memory is batched
10:53:00 <vai> thank you all for the ELF loaders, looks decent code, lots of migration work needed, going to get someone to do somethings, so I can speed it up
10:53:00 <mjg> it is tightly coupled with the allocator
10:53:00 <vai> I just want my Windows games to run on top of my OS
10:53:00 <nikolapdp> while rcu is an independent thing for synchronization
10:53:00 <vai> (source code in games by me)
10:54:00 <mjg> oh lol dude this indeed use that in the comment
10:54:00 <nikolapdp> what
10:55:00 <mjg> https://cgit.freebsd.org/src/tree/sys/kern/subr_smr.c#n41
10:55:00 <bslsk05> ​cgit.freebsd.org: subr_smr.c « kern « sys - src - FreeBSD source tree
10:55:00 <mjg> anyhow it performs like shit under actual pressure
10:55:00 <mjg> despite the author claiming otherwise
10:56:00 <nikolapdp> so, rcu >> gus/smr ?
10:56:00 <mjg> every cpu gets a zone-specific counter to bump when entering a smr-protected section
10:56:00 <mjg> but also every cpu has to load from other cpus to check if it perhaps can retire it's own batched buffers
10:56:00 <mjg> so if you have a high traffic you end up in a spot where everyone polls on everyone else
10:57:00 <mjg> this does not scale for shit
10:57:00 <mjg> if i recall correctly i played with it at the scale of 104 threads and alloc/free switched to smr dropped throughput in half
10:58:00 <mjg> with the code to enter the smr section (bumping a cpu-specific counter) blowing up in cost
10:58:00 <mjg> again i tried to explain to the author this is ggoing to happen but the guy is total geezer
10:58:00 <Ermine> yay, got my vm images and lxc containers salvaged. Jackpot
11:03:00 <mjg> anyway the implementation rolls with "smr" anywhere, so i'm confused what's up with "gus" out of a sudden
11:04:00 <nikolapdp> smr might be ungoogleable i don't know
11:14:00 <netbsduser> i suppose that "safe memory reclamation" sounds more like the general class of solutions and not this particular one
11:14:00 <mjg> indeed
11:15:00 <mjg> so maybe gus_* around in the codebase
11:15:00 <mjg> rcu is rcu-ing
11:15:00 <mjg> epoch is epoch-ing
11:17:00 <mjg> this is a nitpick tho, actual criticism was above
11:18:00 <mjg> it is totally fixable but it is also the hard part
11:18:00 <mjg> simplifying the gus thing is epoch + stuff batched in allocator buckets instead of being arbitrary
11:18:00 <mjg> the batching thing is a tradeoff which probably was worth making
11:43:00 <Ermine> is there an alternative to grep to search for stuff in partition file? grep runs out of memory
11:44:00 <mjg> grep?
11:44:00 <mjg> presumably it is looking for a newline?
11:45:00 <mjg> you can probably whip out a short script in any lang to pattern match and tell you the position where it was found
11:46:00 <mjg> if you are merely trying to check if the thing is there i *suspect* you can hack it as follows
11:46:00 <mjg> strings lolfile | grep ...
11:46:00 <mjg> this will filter out any non-ascii
11:46:00 <Ermine> I need an offset as well
11:47:00 <mjg> then write something in python or whatever
11:47:00 <mjg> i don't know the apis
11:47:00 <mjg> but you defo wont need much
11:54:00 <Ermine> got it
13:29:00 <kof673> > I need an offset as well dd(1) skip=N skip N ibs-sized blocks at start of input i mean that is ghetto but how much is really needed?
21:08:00 <mjg> the art of writing good comments
21:08:00 <mjg> /* Handle STATX_DIOALIGN for block devices. */
21:08:00 <mjg> if (request_mask & STATX_DIOALIGN) {
21:08:00 <mjg> noice
21:09:00 <mjg> i'm surprised the flag name still matches, most of the time it does not
21:09:00 <Ermine> DIO !
21:14:00 <nikolapdp> kek
21:53:00 <mjg> bpftrace kurwa
21:53:00 <mjg> bpftrace -e 'kprobe:vfs_readlink { @[((struct dentry *)arg0)->d_inode->i_link != 0] =
21:53:00 <mjg> count(); }'
21:54:00 <mjg> what do you think that says
21:54:00 <mjg> @[0]: 8
21:54:00 <mjg> @[-1]: 12
21:54:00 <mjg> lol af
21:55:00 <mjg> i repeat, geist crank up your vison for a minute, sun made great software in terms end-user usability
21:55:00 <mjg> dtrace, while not perfect, has a lot of useful stuff and kinks worked out despite having less total develpment time than bpftrace
21:56:00 <mjg> basically so far dtrace > bpftrace as far as i know
21:56:00 <mjg> and it showed up like that in 2006 or so?
21:58:00 <mjg> aight mofos here is a quiz
21:58:00 <mjg> cc hello.c, gcc 13
21:58:00 <mjg> what kind of readlink calls are performed
21:59:00 <mjg> i'm gonnna tell you
21:59:00 <mjg> [pid 1350136] readlink("/tmp/-lgcc", 0x7ffd79bb0be0, 1023) = -1 ENOENT (No such file or directory)
21:59:00 <mjg> [pid 1350136] readlink("/tmp/-lgcc_s", 0x7ffd79bb0be0, 1023) = -1 ENOENT (No such file or directory)
21:59:00 <mjg> [pid 1350136] readlink("/tmp/-lc", 0x7ffd79bb0be0, 1023) = -1 ENOENT (No such file or directory)
21:59:00 <mjg> [pid 1350136] readlink("/tmp/-lgcc", 0x7ffd79bb0be0, 1023) = -1 ENOENT (No such file or directory)
21:59:00 <mjg> [pid 1350136] readlink("/tmp/-lgcc_s", 0x7ffd79bb0be0, 1023) = -1 ENOENT (No such file or directory)
22:00:00 <mjg> i like that it bothered with -lc only once, but -lgcc needed a double take
22:00:00 <mjg> ofc this is utter nonsense anyway
22:29:00 <gog> mjg: bpftrace my keyboard
22:40:00 <mjg> gog: u wot mate
22:44:00 <gog> the tracking said it left poland a week ago :(
22:51:00 * vdamewood gives gog a fishy
22:52:00 <vdamewood> gog: New keyboard?
22:52:00 <mjg> gog: is it a usb keyboard
22:52:00 <nikolapdp> pr ps2
22:52:00 <nikolapdp> *or
22:53:00 <mjg> gog: tf are you doing ordering a keyboard from poland anyway
22:53:00 <mjg> by my estimate it already reached .ru
23:28:00 <geist> mjg: okay
23:29:00 <geist> vin: if you're trying to load windows games, i hope you know windows doesn't use ELF
23:29:00 <gog> mjg: a replacement for my laptop
23:30:00 <gog> can't get it from lenovo, so i bought it from a sketchy seller from ebay
23:30:00 <gog> for not very much money but enough to look legit
23:31:00 <vdamewood> Hopefully you get the right layout.
23:32:00 <vdamewood> I'm guessing you want either a US or Icelandic layout. It would suck if it were Turkish instead.
23:33:00 <zid> anything iso is fiine
23:33:00 <zid> just ignore the fact the key says norwegian oslash or whatever, it's not like you'd ever look
23:35:00 <vdamewood> US keyboards aren't ISO.
23:36:00 <vdamewood> Which is nice for me. I can't stand that inverted-L-shaped enter key.
23:36:00 <geist> indeed, that'd take a while to get used to
23:48:00 <zid> meanwhile, ansi is objectively untypeonable and missing loads of keys
23:57:00 <geist> right, it doesn't have a lot of extra symbols that 'murica dont use
23:57:00 <nikolapdp> indeed zid