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
beomus has joined #osdev
beomus has quit [Quit: Leaving]
beomus has joined #osdev
kucha has quit [Ping timeout: 256 seconds]
beomus has quit [Ping timeout: 240 seconds]
Bonstra has quit [Quit: Pouf c'est tout !]
Bonstra has joined #osdev
beomus has joined #osdev
beomus has quit [Quit: Leaving]
gog has quit [Quit: byee]
netbsduser has quit [Ping timeout: 256 seconds]
gbowne1 has quit [Remote host closed the connection]
gbowne1 has joined #osdev
goliath has quit [Quit: SIGSEGV]
ramenu has quit [Remote host closed the connection]
ramenu has joined #osdev
<zid> guys, how did they print the HOLLYWOOD sign, my microsoft word doesn't have 62000pt fonts
<heat> wordart
<moon-child> they used libreoffice
<heat> nuh uh
<heat> they used openoffice
<kof123> well it is 3d, so while there are some fonts ...ulead cool studio pro or whatever those programs were </1997>
<kof123> dear young people...in the early days of the web, there were programs...just to texture graphics made of fonts......
<kof123> +lighting shadow etc.
<zid> that's an obvious lie
<zid> nobody uses openoffice
<kof123> and spit out a gif :D
<heat> wdym
<heat> openoffice is a great replacement for microsoft word
<heat> the same way GIMP is a perfect replacement for photoshop
<zid> someone just
<heat> have i told you how open source software is great and can replace all proprietary software
<zid> ported photoshop cs2 to a web app
<zid> instantly better than gimp
<kof123> > StarOffice is a discontinued proprietary office suite. Its source code continues today in derived open-source office suites Collabora Online and LibreOffice
<kof123> unity of opposites young heat :D
experemental has quit [Ping timeout: 252 seconds]
navi has quit [Quit: WeeChat 4.0.4]
bitoff has quit [Read error: Connection reset by peer]
thaumavorio has quit [Ping timeout: 245 seconds]
bitoff_ has joined #osdev
thaumavorio has joined #osdev
<geist> oh huh, i always thought it was just an open source thing from the get go
<geist> didn't realize it was acquired by sun and then open sourced
<clever> same
<clever> still recovering from a gpu crash
<zid> I only use lotus notes
edr has quit [Quit: Leaving]
<zid> My prebuilt in the 90s came with lotus 1-2-3, it was pretty useful ngl
moon-child is now known as Mondenkind
gorgonical has joined #osdev
wgrant has quit [Read error: Connection reset by peer]
ramenu has quit [Ping timeout: 276 seconds]
<heat> i found the buggggggggggggggggg
<heat> my amap split was splitting (radix tree) [1, 2] into [1], [0, 2] where i wanted [1], [2]
<heat> this took a good while
<heat> something something unit tests
<zid> something something you clearly never tested it in the first place
<zid> much less via units
<heat> oh, i tested it
<zid> apparently not
<heat> it just seemed to work
<zid> "It didn't segfault when I did add(3); del(3); add(4); add(5); del(4); del(5);" doesn't count as properly testing it sorry :P
<heat> it required the perfect combination of splitting an mmap region that had un-CoW'd before and a posterior fault to a page that had been CoW'd again (so, fork)
<heat> and it seems like i don't have fork heavy programs in my testing
<heat> this probably explains the GNU make faults i had a few days ago and never properly debugged
<zid> "ofc I tested my renderer, that it crashes if you try to use red pixels was totally beyond all reasonable forethought and planning" --heat, 2024
<heat> yes, i should've considered and tested all possible combinations of my 153 syscalls and their flags
<heat> how could i ever miss something
<zid> nah just the splitting
wgrant has joined #osdev
<geist> zid: yeah i generally used lotus notes and 123 in high school, sicne that's what my dad's work used so had a copy of it
<geist> er word pro, didn't really use notes
<zid> old ass terminal version, or modern windows 95 one?
<heat> >modern windows 95 one
<zid> That is modern
<zid> we've progressed backwards since most win95 UIs
<heat> this particular sequence of words should be banned in 2024
<\Test_User> futuristic windows 95 one
<geist> win 3.1 one. actually probably was still called ami pro at the time, which rings a bell
<geist> dont remember what i used in college, honestly
<heat> \Test_User, i can barely wait for windows 98!
<bslsk05> ​winworldpc.com: WinWorld: Lotus SmartSuite 3.x
<zid> might have been what I had
<zid> yeaaa
<zid> the 97 versin's splash looks familiar
<geist> wikipedia says that they bought ami pro and called it word pro
<zid> and then got bought by IBM, then sold to some random indian firm
heat has quit [Ping timeout: 240 seconds]
gbowne1 has quit [Read error: Connection reset by peer]
rpnx has joined #osdev
rpnx has quit [Client Quit]
elderK has joined #osdev
<epony> are you reading up on StarOffice? ;-)
<epony> CP/M heh
<epony> I remember it from that period on DOS and CP/M
<epony> and the then "word art" suite Banner Mania too ;-)
<epony> remember that too?
<epony> check this out too, it was popular then as well
<epony> that's where "the star" in "star division"-s legacy name comes from, competitive marketing
<epony> what we really used was "program editor" PE, PE2 and PE3 ;-)
<epony> and some spread sheet applications like microplan etc
<epony> the *plan and *calc were popular marketing terms too for calculus documents (spreadsheets)
<epony> or simply "tables"
<epony> the office suites were not really popular as "bundling" up until graphical systems and were slow adoption
<epony> the really nice work was going on text editors and compilers and IDEs ;-)
<epony> as usual
<epony> documents were mostly text files as on UNIX systems, which CP/M adapts to become DOS later
<epony> so it was a bit of a "suffering" period on the 8bit 6502 and 16bit 8086-80186 machinery, that is why Z80 was used as a second co-processor and multi-tasking enablement add-on expansion card
<epony> hence the CP/M popularity with it
<epony> which comes from DRI of one Gary Kildall
<epony> so, more capable and specialised systems could use both, less capable, just DOS ;-)
<epony> and even more capable ran UNIX in BSD on PDPs around here, and later HP9K workstations
<epony> VAX, no thanks ;-) you vvax it
<epony> with the 1996 launch of the Pentium-MMX (p55c) the end of the RISC workstations was sealed
<epony> and the return of UNIX to computers made it in Linux distributions for GNU and BSD distributions in rapid succession.
<epony> it's the 32bit computers that made it possible, as that is what UNIX ran on after the 1975-1985 period, only 32bit machines were expensive and less accessible, and the RISC workstations failed to have a longterm stay due to exorbitant costs for consumers
<epony> so 1991-1996 is the "porting UNIX to 32bit PCs in i386 and 80486 later"
<epony> 80586 and the Pentium-MMX caught up and the RISC window of opportunity of 10 years head start closed
<epony> that in turn changed office suites too as they are "children of the GUI" for the mass market
<epony> and IDEs as well
<epony> so DOS and Win1-2 disappeared, the last Win3-3.11 and WFW holdouts declined to WinNT3.5-4 with Novell networking which also decomposed
<epony> and Windows95 made its debut targeting 586 and shortly it was replaced by Linux and BSD systems where performance and reliablity were needed for servers
<epony> which was a period where the office suties market started to consolidate and many companies and products collapsed
agent314 has joined #osdev
<epony> with the pressure of MS Office95-97 being very strong and the decline and rapid disappearance of RISC workstations and the general failure of MIPS and Alpha on general programmable computers
experemental has joined #osdev
<epony> which made such *star companies shriek and sqeal like the Nazgul eggings, and.. they became defunct and declining, leading to purchases from consolidation investment comanies of speculation like Sun and others
agent314 has quit [Remote host closed the connection]
<epony> looking to buy and "own" their thing to compete with Microsoft, so they opened it up to "bang" the MSFT dominant position
<epony> and failed miserably as it was TOO HUNGRY on RAM and CPU and was slow, in the 1999-2001 period, as it was not reusing components from Windows like the very targeted MSFT Office was
<epony> the same old story as with the browsers, the platform owner undercuts, and the competitor opens up to "penetrate" with market share
<epony> that's about it, from then on Sun went into a spiralling decline stallwarthy fall
<epony> investments did NOT follow Java, and the finance and appliance markets did not rely on Windows
<epony> AND each corporation wanted to have their own competitor to Java and the JVM for its independence and own eco-system of vertical integration
<epony> so Sun decomposed and its CPU designs and servers went into Oracle and stagnated at the IBM competitor scale in smaller deployments for finance and telco
<epony> in short: RISC hit the fan and that percolated and propagated massively as losses everywhere
<epony> and CISC continued its leading generic programmable computing, because a register-register machine is harder to program and write compilers for efficiently, and overal RISC has limitations that software does not cope with
<epony> that's about it
<epony> no matter how you twist and turn and how you feel about it personally, your opinion does not matter and it would not change anything, machines have architectures and fundamental principles and organisation, and it eventually continues as the optimal machine implementations can get to reach their intended usage and deployment systems
<epony> that, and Rpi's are like 8bit PCs with no storage ;-) and weak programmability
<epony> and also, most CPU producers have ranges of CPUs of multiple architectures and class of computing machines from micro-controllers and memory controllers to entire SoCs and specialised ASICs and various prototypes
<clever> epony: have you seen the number of turing complete cores in an rpi? lol
<epony> so it's not about brands
<epony> and it's not about personal aesthetics and preference as "personality expression" adherence to pseudo-culture of no-ideology other than "sexuality" and hair style
<geist> clever: oh that reminds me, i have a rpi5 on order now. shipped, should get here next week
<geist> the 8GB version
<epony> yes, I like all computers and hardware ;-)
<epony> but I don't like forced software and dominant businesses profiteering and abusing relations to extort money
<epony> in that regard, the browser model of compute is rejected
<clever> geist: nice
<epony> and since many many consumers depend on it, it's important that browser authoring "big tech" spammers get to see the machine capacity and utilise it well for general compute for office and such, as independent and reliable software
<epony> so far, I think the "big tech" spamvertising financial and leasing software vendoring companies are useless and hollow
<clever> geist: ive been wanting to port LK to the pi5
<epony> but I'd have liked cheaper and better RISC workstations if that was possible in the second half of the 90ies.. it went defunct
<epony> so there is one sustainable CISC track from PDP to 6502 to 8086 and many other RISC tracks, and other CISC too
<epony> they all get their "adoption rates" and benefits etc, but some machine premises are inevitable and software is to blame for not utilising it correctly and efficiently
<epony> which is where "big tech" fails
<epony> and lies to people it's the hardware so they get cheated and screwed, but someone else is to blame, typically something they don't control or sell allegedly
<epony> while it's a generally regulated and segmented market and industrial procurement of government project fundind and organisation from R&D into commercial implementers on top of industrial producers, EXACTLY in the best organisation of a "planned economy" ;-)
<epony> so it's well predictable and trivial
<clever> geist: but i need to get that debug uart adapter first
<geist> ah
<clever> but there is good news for avoiding the pci mess
<geist> i'm watching a guy build a wankel
<epony> from this side of the Iron Curtain, we knew it all, don't know how you guys don't see it all and know it all ;-) maybe you were being lied to and deceited by software vendoring bundlers
<clever> > By default, the PCIe X4 interface is reset before loading the kernel so that the PCIe RC is in a clean state. For bare metal / bringup you can add pciex4_reset=0 to config.txt because writing a bare metal PCIe RC driver probably isn't everyone's cup of tea 
<clever> geist: if you set this, then the pcie is left online and fully mapped, so you can skip directly to poking RP1 peripherals
<epony> but we all share a common special interest, high demand for reliable and sustainable computers and communications
<epony> and utility in that
<geist> kk
<epony> so standardisation is paramount ;-)
<epony> and big tech is a lie of spam
<clever> i'm not sure where the CAM's will map things, but you at least can temporarily skip that step
<clever> the debug uart between the hdmi ports, is on the soc itself, so it works without pcie
<clever> oh, and the debug port can also switch to SWD mode, and debug the main arm complex
<geist> it's probalby just got a reserved MMIO region where the CAMs are and where all the devices can be mapped
<geist> generally how it works there
<geist> is it a single bus or more than one?
epony has quit [Remote host closed the connection]
<clever> geist: 3 pcie masters, a 1x, 1x, and 4x
<clever> a 1x goes to the flat-flex header for user use
<clever> the 4x goes to the RP1, and handles all the usb2/usb3/ethernet/dsi/csi/gpio
<clever> and a 1x goes unrouted
<geist> each has their own cam?
<geist> so probably 3 segments?
<clever> the RP1 is a single-function device
<clever> let me grab its lspci
epony has joined #osdev
<clever> 01:00.0 Ethernet controller: Device 1de4:0001
<clever> Memory at 1f00410000 (32-bit, non-prefetchable) [size=16K]
<clever> Memory at 1f00000000 (32-bit, non-prefetchable) [virtual] [size=4M]
<clever> Memory at 1f00400000 (32-bit, non-prefetchable) [size=64K]
<clever> /proc/iomem says
<clever> 1f00100000-1f00103fff : 1f00100000.ethernet ethernet@100000
* geist nods
<clever> so the bulk of the peripherals are in the 4mb window
<clever> a partial datasheet for the RP1
<clever> it mentions 64kb of shared sram, that fits the 3rd CAM perfectly
<clever> page 7 has the layout of the entire bus routing
<geist> cool, will have to take a look once it shows up
<clever> page 11 says the ethernet is at 0x4010_0000
<geist> also reminds me i should probalby try to find a case for it since i suspect it overheats
<clever> so i think the mmio at 0x4000_0000, is where the 2nd CAM maps
<clever> if i hit it with an all-core load, the cpu does throttle in open air
<clever> the official rpi5 case comes with its own fan and ducting
GeDaMo has joined #osdev
<geist> yeah that was unavailable on adafruit when i bought this
<clever> ive also got some details on using the cortex-m3 from the RP1
<clever> https://github.com/G33KatWork/RP1-Reverse-Engineering this guy had figured out half of it, and then i got him on irc and we worked out a lot more
<bslsk05> ​G33KatWork/RP1-Reverse-Engineering - Experiments on the RP1 (0 forks/30 stargazers)
<clever> the RP1 wont even enumerate over pcie, until it loads firmware
<clever> the bootrom supports SPI and i2c-slave for that
<clever> you can write the initial pc and sp, for both cores, to some watchdog scratch registers, and then trigger the watchdog
<clever> and it will execute whatever you left in sram on reboot
<clever> but pcie only works if you load the official blob to core0
<clever> i believe you can load a custom blob to core1, and then you have a weird 3 headed beast
<clever> (2712, and the 2 rp1 cores)
<clever> but the pcie link will bounce when you load that core1 blob
<clever> and linux gets very upset if you so much as `rmmod` the wrong driver, full hotplug is a ways out
<clever> but i did help G33KatWork with a work-around, just disable the RP1 in device-tree, bounce it, then enable it in DT at runtime
<clever> if your baremetal, then that will be less of an issue
<clever> the RP1 shared a lot of design elements with the RP2(040)
<clever> let me double-check my memory map notes
agent314 has joined #osdev
<clever> geist: oh right, now that EL1-EL3 must be aarch64, they have ditched the old shoving mmio into the <4gig area, there is an entire 4gig window now, dedicated just to the legacy VPU bus
<clever> much like high peripheral mode on the bcm2711
<clever> low-peri mode, was more of a hold-over, to let 32bit nommu and non-lpae stuff into mmio
gog has joined #osdev
<clever> oh, and gpio on the RP1 is a massive departure from the bcm soc's
<clever> input and output are no longer seperate modes
<clever> there is just a "registered io" option, and a completely seperate peripheral
<clever> so its more like a big bank of pinmux, and the cpu controlled io is just another input to the pinmux
agent314 has quit [Ping timeout: 276 seconds]
agent314 has joined #osdev
<vai> I am having beer
<vai> JTMOS uptime 400 hours around
<gog> hi
<gog> i am not having beer i am at work and it's 10am
<gog> i am debating calling it a day already though i don't feel great
<zid> I broke my foot so you win
<epony> have a beer so you break your brain too
<zid> Want to see 100% legitimate professional recreation of what I did?
<epony> just be careful with the other leg
<epony> as then things get much more difficult
<epony> the terminator was able to chase a car by grabbing metal arm bent pincers on the trung, but you might have a harder time with that
<epony> "trunK"ing it
<kof123> > but I don't like forced software and dominant businesses profiteering and abusing relations to extort money
<kof123> i am going to bed and do not wish to discuss, but to clarify, i don't disagree with you so much pony...that to me is just "business people" "wall street" i don't see how that is tech-specific :D
<kof123> the reason is right there: money
<kof123> if that is achieved, from their POV, it was a success
* kof123 zzzzzzzzzz
elastic_dog has quit [Ping timeout: 260 seconds]
elderK has quit [Quit: Connection closed for inactivity]
agent314 has quit [Read error: Connection reset by peer]
<epony> yes, commerce is not computing, it's profiteering
<epony> computing and communications is engineering, that's technical and academic
elastic_dog has joined #osdev
<gog> love to take a lowest-priority bug report for an annoying UI problem and discover a mystery (or probably an unfinished feature)
<epony> automate ticket submission and make idiots cry on the job ;-)
<epony> boss vs used
[_] has joined #osdev
[itchyjunk] has quit [Ping timeout: 245 seconds]
netbsduser has joined #osdev
<gog> my boss is going to be replaced with an AI
<zid> upgrade or downgrade?
<gog> lateral move
<gog> the AI probably isn't as good at programming but will be equally effective at saying "thank you gog, nice job gog"
<gog> or "gog wtf"
<epony> more likely you are going to be replaced by a 5 year younger same level skill different person
<zid> It will then pat you on the back with its 18 fingers
<gog> they won't replace me, i'm one of only 3 people who has even a basic understanding of the mess
<gog> i will make the code worse for job security
<epony> your career lasted a good 5 years, bye and thanks for all the fishy
<gog> :o fishy
* gog meow for fishy
* kazinsal tosses gog a fishy
<epony> "sell ur trailer, settle inn" --roach motel mgmt, inc
<epony> the 2004-2024 variant of "you're fired" from big tech: "parking permit rewoked"
Left_Turn has joined #osdev
<epony> and then, why are kids into mobile donglification of useless low quality compute and comms for the tent and dorm.. because, no housing, Obama your mama
<epony> it's all good
<epony> let's call that the "love my arm generation"
<Ermine> heat: thank you for the fix
* gog chomp fishy
foudfou has quit [Ping timeout: 240 seconds]
<Ermine> heat: if you don't have posix_spawn, you can also try s6, it also uses fork
roper has joined #osdev
kucha has joined #osdev
tommybomb has quit [Write error: Connection reset by peer]
sm2n has quit [Read error: Connection reset by peer]
rselim has quit [Read error: Connection reset by peer]
noeontheend has quit [Write error: Connection reset by peer]
staceee has quit [Read error: Connection reset by peer]
exec64 has quit [Read error: Connection reset by peer]
yuiyukihira has quit [Write error: Connection reset by peer]
patwid has quit [Read error: Connection reset by peer]
pitust has quit [Write error: Connection reset by peer]
gjn has quit [Write error: Connection reset by peer]
jleightcap has quit [Write error: Connection reset by peer]
vismie has quit [Write error: Connection reset by peer]
hanemile has quit [Write error: Connection reset by peer]
tom5760 has quit [Write error: Connection reset by peer]
alecjonathon has quit [Write error: Connection reset by peer]
ddevault has quit [Write error: Connection reset by peer]
alethkit has quit [Write error: Connection reset by peer]
asymptotically has quit [Write error: Connection reset by peer]
whereiseveryone has quit [Write error: Connection reset by peer]
yuiyukihira has joined #osdev
listentolist has joined #osdev
gjn has joined #osdev
alecjonathon has joined #osdev
whereiseveryone has joined #osdev
staceee has joined #osdev
hanemile has joined #osdev
patwid has joined #osdev
noeontheend has joined #osdev
tom5760 has joined #osdev
exec64 has joined #osdev
ddevault has joined #osdev
sm2n has joined #osdev
lh has joined #osdev
pitust has joined #osdev
asymptotically has joined #osdev
jleightcap has joined #osdev
tommybomb has joined #osdev
vismie has joined #osdev
rselim has joined #osdev
alethkit has joined #osdev
navi has joined #osdev
goliath has joined #osdev
gildasio has quit [Quit: WeeChat 4.1.2]
Cindy has quit [Remote host closed the connection]
bnchs has joined #osdev
edr has joined #osdev
bnchs is now known as Cindy
gildasio has joined #osdev
gorgonical has quit [Ping timeout: 252 seconds]
experemental has quit [Remote host closed the connection]
wereii has quit [Quit: ZNC - https://znc.in]
wereii has joined #osdev
ramenu has joined #osdev
experemental has joined #osdev
gabi-250_ has joined #osdev
gabi-250 has quit [Remote host closed the connection]
frkazoid333 has quit [Ping timeout: 260 seconds]
kucha has quit [Quit: 73!]
kucha has joined #osdev
epony has quit [Remote host closed the connection]
epony has joined #osdev
Left_Turn has quit [Ping timeout: 240 seconds]
gildasio has quit [Remote host closed the connection]
gildasio has joined #osdev
Left_Turn has joined #osdev
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 255 seconds]
ramenu has quit [Ping timeout: 252 seconds]
Yoofie2 has joined #osdev
ramenu has joined #osdev
Yoofie has quit [Ping timeout: 252 seconds]
Yoofie2 is now known as Yoofie
frkzoid has joined #osdev
ramenu has quit [Ping timeout: 260 seconds]
gog has quit [Quit: Konversation terminated!]
gildasio has quit [Remote host closed the connection]
heat has joined #osdev
<heat> Ermine, thanks for the bug report :p
<heat> i do have posix_spawn
<heat> even though ATM it uses fork
<heat> like, doing fork() + exec() isn't going to show this bug, you'd need fork() + some non-trivial work that touches memory
<Ermine> heat: also, tests do not build due to missing SYS_mpagemap. I've added #define __NR_mpagemap 153 to musl/arch/x86_64/bits/syscall.h.in and that fixed the build
<heat> i know
<heat> i screwed up the commit
<heat> i'll fix it up now and force push, pls rebase
<Ermine> ok
<heat> i kinda forgot musl is a submodule
<mcrod> hi
<heat> Ermine, ok, fixed and force pushed onto master, sorry for the grief
<heat> "i don't need to create a new branch, these commits are fine and will totally pass CI" - my last words
<Ermine> no worries
gog has joined #osdev
<heat> gog i fucked it i broke master
<heat> are you proud of me
<gog> yes
<Ermine> Now, can I have a toolchain in root image?
<heat> wdym
<Ermine> Also, I don't know much about submodules, but now git status on my branch (rebased) shows 'modified: musl (new commits)'. How can I remove that thing, so I don't accidentally overwrite anything?
<Ermine> re toolchain: I want to write and compile test programs. Is it possible to do right in onyx?
<heat> git submodule update --remote I think
<heat> yes, it's possible
<heat> but you'll need to build your own, i don't distribute packages (because 1) I don't have a package format beyond a tarball and 2) i don't have somewhere to host them, nor any real need)
<heat> there's this repo (https://github.com/heatd/onyx-package-tree) which has all the packages and build scripts, then you use the main repo's buildpkg/build_sys.py to build them
<bslsk05> ​heatd/onyx-package-tree - Onyx packages (0 forks/0 stargazers)
<heat> something like buildpkg/build_sys.py $ONYX_PACKAGE_TREE_PATH . gcc should work
<Ermine> No, I mean my own programs, to e.g. test pipe readv
<Ermine> ah i see
<heat> oh, out-of-onyx?
<heat> yes that's possible
<heat> i'm keeping most tests in usystem/tests/kernel_api_tests using gtest
<heat> usystem/tests/regtests has a bunch of one-off tests that were either never written in the gtest way, or don't make much sense to be integrated into kernel_api_tests
<heat> note that you could also use the kernel's kunit and test these things in-kernel, both pipes and AF_UNIX use it extensively
ramenu has joined #osdev
xenos1984 has quit [Ping timeout: 246 seconds]
qubasa has quit [Remote host closed the connection]
xenos1984 has joined #osdev
qubasa has joined #osdev
<Ermine> Ugh, git submodule update --remote broke something regarding stat...
<heat> what musl commit did that leave you in?
<heat> should be c8931f2
<Ermine> well, another git submodule update fixed everything. Now musl is at specified commit
<Ermine> pipe::read_iter seems to work !!!!!1111!!!
<heat> sweet, how are you testing it?
<Ermine> I wrote a small program which readvs(2 bytes, 2 bytes) from a pipe
<Ermine> echo -n 1111 | pipetest -> reads 4 bytes
<Ermine> echo -n 11 | pipetest -> reads 2 bytes
kucha has left #osdev [73!]
<heat> nice
<heat> adding a test in pipe.cpp for it should be pretty simple, just write 2 bytes to a pipe and assert that ->read_iter(O_NONBLOCK, [2 bytes, 2 bytes]) returns 2 bytes
xenos1984 has quit [Ping timeout: 246 seconds]
<Ermine> I guess I need IOVEC_KERNEL iovec_iter for this?
xenos1984 has joined #osdev
<heat> yep
<Ermine> How do I run tests?
<heat> CONFIG_KUNIT=y
<heat> it'll run them at startup, you'll see the message
<Ermine> meanwhile tried executing kernel_api_tests
theruran has joined #osdev
<Ermine> Ok, test passed
<Ermine> if I run it through kernel_api_tests, it fails at assertion that there are pipe buffers
<Ermine> with KUNIT that test passes
<heat> hrm? can you show me your test?
skipwich has quit [Remote host closed the connection]
skipwich has joined #osdev
<bslsk05> ​github.com: pipe: implement readv · petershh/Onyx@0b80b0c · GitHub
<heat> oh i wanted to see the test you added to kernel_api_tests
<heat> because that didn't make much sense to me
<Ermine> I didn't add anything there
<heat> so what assertion is failing?
kof123 has left #osdev [#osdev]
<Ermine> !list_is_empty(&pipe_buffers) , at line 701
<Ermine> So I broke another test
<heat> oh, that's not a test but a runtime check
jimbzy has joined #osdev
<heat> Ermine, for context, a bunch of kernel_api_tests abuse pipes for IPC
<heat> what i assume is happening is that the pipe's accounting of the buffer's size != the actual buffers
<heat> so it asserts
<Ermine> Will look at that once I'm done with write_iter
<heat> if this helps, here's the kernel_api_tests's pipe code: https://github.com/heatd/Onyx/blob/master/usystem/tests/kernel_api_tests/include/waiter.h
<bslsk05> ​github.com: Onyx/usystem/tests/kernel_api_tests/include/waiter.h at master · heatd/Onyx · GitHub
comrade has left #osdev [#osdev]
<Ermine> Well, Waiter doesn't seem to use readv/writev
<heat> read() calls read_iter, write() calls write_iter
<bslsk05> ​github.com: Onyx/kernel/kernel/fs/vfs.cpp at 296beaf0a5545037022926d43c5a41a9dc12ea9b · heatd/Onyx · GitHub
<Ermine> So, pipe::read can be removed actually?
<heat> yeah once this lands and KUNIT tests are converted
<Ermine> Also, is there printk or something?
<heat> yeah
<heat> just be careful not to use it while holding a spinlock
<Ermine> does pipe_lock count?
<Ermine> it's mutex though
<heat> pipe_lock is a mutex, not a spinlock
<heat> i really should write a better printk one of these days
<heat> i have printk which prints to the screen, printf which prints to the log. none of them work particularly well, pretty much you can't print while holding a spinlock or preempt off or irqs off
<heat> the log is also an unstructured mess, just a shitty ring-buffer that's not particularly ring-buffery
<heat> in any case, i haven't figured out how a good printk is supposed to work
<heat> ideally something that would let you printk without many restrictions to the dmesg, and schedule out some future writing to the actual console if need be
<epony> misread that as "drink without many restrictions"..
<epony> why did you call that printk?
<epony> it's a syslog
<epony> oh, we designed it as a general printi toolkit from lines of text and echo to printers to system logging and file sending remotely
<Ermine> Well, that was enough to find the bug
<Ermine> forgor continue in if(!can_read()) { ... }
netbsduser has quit [Ping timeout: 268 seconds]
IslandSparky has joined #osdev
IslandSparky has quit [Client Quit]
IslandSparky has joined #osdev
<Ermine> On write_iter: on the one hand, I want to use pipe::append, since it handles pipe buffers. On the other hand, I want to use copy_from_iter, since it distinguishes properly between kernelspace and userspace
<heat> you should be able to use copy_from_iter() in append()
<heat> well, in a separate append_iov() function or something. at least until ::read() and ::write() get axed
<Ermine> got it
Cindy has quit [Remote host closed the connection]
netbsduser has joined #osdev
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
kof123 has joined #osdev
vdamewood has joined #osdev
sbalmos has quit [Ping timeout: 246 seconds]
sbalmos has joined #osdev
vdamewood has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ThinkT510> nice to see all the onyx action in here
ramenu has quit [Remote host closed the connection]
ramenu has joined #osdev
<sham1> It's too bloody cold in here
gog has quit [Ping timeout: 260 seconds]
<zid> agreed
<zid> set something on fire
* kof123 gives sham1 SICP book with salamanda-lambda on cover, pre-javascript version
<kof123> *mander
TheCatCollective has quit [Quit: Meow Meow Meow Meow Meow Meow Meow Meow]
[itchyjunk] has joined #osdev
[_] has quit [Ping timeout: 260 seconds]
gbowne1 has joined #osdev
roper has quit [Quit: leaving]
<netbsduser> muslibc
mahk has quit [Ping timeout: 260 seconds]
<sham1> musl!
<heat> dns
<sham1> SRV record
vinc has joined #osdev
<Ermine> heat: I guess each pipe buffer occupies one page?
<heat> yes
<sham1> Always read in multiples of 4096
<sham1> AAAAAA
dennisschagt has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
<geist> 0x41414141
dennisschagt has joined #osdev
heat has quit [Ping timeout: 256 seconds]
heat has joined #osdev
<sham1> That's no multiple of 4096
<heat> truncation and writeback aren't interacting too well :/
gog has joined #osdev
<kof123> "always read in multiples of..." so "records" then ? :D
elderK has joined #osdev
<zid> 41414141 is a multiple of 4096 in base.. something or other!
<sham1> kof123: not really records either,
<sham1> They're still just bags of bytes like always with pipes
<sham1> It's more akin to having frames of data. You might even call them pages
<heat> a lot of what linux does is page-measured
<geist> 0x41414141 is 'AAAA'
<heat> like, for instance: mincore() does PAGE_SIZE pages at a time
<sham1> Oh right. I don't remember codepoints like that
<zid> 41 is A is the one I do remember
<zid> have you never crashed anything before sham
<sham1> No. My
<heat> sham writes java
<sham1> My code
<sham1> It's perfect
<zid> "I wonder if this has a buffer overflow?AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" is very common practice, gives you a crash at rsp/rip=0x414141414141414141..
<zid> also nicely lets you figure out all alphabet code points nicely too
<zid> +32 to chage case
<heat> yeah i've seen that when people are trying out stack smashing
<sham1> Never have I ever brought down a server with an OOM and sloppy code. Nope, never. Couldn't be me
<geist> yah i've seen 0x20 enough to know that it's ' '
<heat> 0x4141414141 is a recognizable pattern and easy to spray with python ('A' * 10000000000)
<mjg> lmao genz
<geist> and the lowercases start at 0x21, uppercase at 0x41. useful to know
<mjg> perl -e 'print "A" x 255'
<mjg> kids today!
<sham1> Now do it in r
<heat> >perl
<heat> boomer alert
<mjg> :(
<sham1> Raku
<geist> for patterns of stuff i tend to use '0x99'
<heat> mjg have you updated your gnuplot
<mjg> back when i was still in the game i had never seen anyone roll with anything but the perl
<heat> they released a new version
<geist> since it is unaligned, has a nice bit pattern (10011001) and if you interpret it as an address it's non canonical
<mjg> do resources today show python?
<geist> and sticks out, rarely comes up
<klange> i only use bespoke lanugages no one has heard of
<heat> it has all sorts of features except easily plotting histograms
<heat> mjg, yep
<mjg> :O
<mjg> aight
<sham1> klange: ah yes, the pain of all proglangdev
<kof123> yes i am just punning but : > You might even call them pages this is to say...what would you call such a construct on disk instead of RAM
<sham1> But of course, you need to eat your own dog food, otherwise you don't know if your semantics are good
<sham1> 4096 bytes on disk? A sector
<heat> kof123, blocks
<kof123> ok, fair :D
<heat> openvms? more like poopy vms
<heat> files are streams of bytes
<sham1> Or 8 sectors, depending on if you're in boomer mode and doing things in 512 bytes
<heat> deal with it davec
<sham1> Or hm, maybe s/sector/block
<geist> heat: fite
<heat> file*
<sham1> ActiveRecord
<sham1> Just make your file system into an object store
<sham1> Ez
<sham1> Have all your data in JSON/XML/YAML/Whatever you dislike the most
<kof123> http://www.vaxination.ca/vms/shark/history.html They never stop. * They will take on (eat) anything and continue to operate. * They operate in packs/clusters. * And although they will never be cute they are the most efficient and effective machines in their environments.
<bslsk05> ​www.vaxination.ca: VMS Mascot
<heat> >XML
<heat> fuck
<sham1> At least XML has a way to specify a schema. Several, in fact
experemental has quit [Read error: error:0A000119:SSL routines::decryption failed or bad record mac]
<heat> mjg, mofo do you want to see my flamegraphen on make -j4 for my kernel
<geist> as a side note i converted one of my nvmes (western digital blue) to 4K and of course noticed no change in performance
<geist> *except* it used less host ram, since presumably the wear levelling table is 4x as small
<geist> sadly none of my samsung nvmes support anything but 512
<heat> the storage people are really pushing for > 4K block size
<geist> but maybe makes sense if you have on board dram to hold the table, there's really no point going smaller
IslandSparky has quit [Quit: Client closed]
<clever> i saw some performance graphs for an nvme on the pi5 recently, and it included numbers for different block sizes, i assume it was just the number of bytes per IO operation, not actual block size
<clever> and of course, it did go up some with larger blocks, just due to fewer round trips and more bytes/command
<clever> but you can get the same effect by just having a larger cluster size in your FS
<heat> depends on the graphs honestly
<heat> linux will plug that shit right up
<geist> yeah somewhat as expected if you're just doing IO in units of 4K anyway presumably there's little difference
<clever> my nas had been performing poorly for years, 1 drive was always the bottleneck, and it wasnt merging requests the same way
<clever> 2 months ago, i figured out why, the sata controller was in pata mode
<clever> so features like NCQ where just disabled
<geist> in some ways the nvme has more opportunities for wear levcelling, and may actually end up with a teensy bit less internal write amplification with 512b blocks
<epony> you mean no AHCI
<heat> i.e if you do writeback on an inode it'll plug the whole ->writepages operation, so even individual ->writepage()'s will be merged together if possible
<clever> the biggest hint, is that the problem drive changed
<mjg> heat: i'm going to sleep
<clever> i had noted down the serial# of the problem, and it moved
<mjg> my boomer ass is tired
<heat> thats what you get for using perl
<geist> man tell me about it, i've been hecka tired the last few weeks
<epony> py.el
<geist> trying to get my butt back into a good sleep schedule and it just makes me tired
<epony> confusius says: sleepy rear, no stoplights for you
Turn_Left has quit [Read error: Connection reset by peer]
yo0O0o has joined #osdev
vinc has quit [Read error: Connection reset by peer]