<bslsk05>
github.com: stringtest/asm-riscv64.S at master · travisg/stringtest · GitHub
<geist>
caveat: does not handle dissimilarly unaligned source and dest pointers within 8 bytes. that'll invole a bunch of load/shift/or routines which will come next
<geist>
but benchmarks similarly and a bit faster than glibc at the same alignments
wootehfoot has joined #osdev
<moon-child>
didn't you have a routine that handled that reasonably nicely for arm?
<geist>
arm or arm64?
<geist>
i actually wrote darwin's arm32 memcpy routine back when i was at apple that did the unaligned nonsense
<moon-child>
don't remember. And it might not have been you--might be confusing with somebody else, or maybe you jsut linked it
<geist>
but that was back when armv6 was a thing, etc
<moon-child>
oh, no, that is what I was thinking of
dutch has quit [Quit: WeeChat 3.8]
<geist>
armv8 (and arm64) says that unaligned accesses are fine, and ARM actually has the defacto optimized routines for arm64 in a github repo
<geist>
which seem to be what generally folks use
<geist>
there doesn't seem to yet be anything like that for riscv
<moon-child>
could pilfer your arm routine then
<moon-child>
though I guess no shifter changes things
<geist>
wildly different architecture
<geist>
exactly. the barrel shifter on arm was lovely for that sort of thing
<geist>
riscv doesn't even have a proper rotate. i dont know what the damage is going to be
<moon-child>
fuuuuuusionnnnn
<geist>
that being said one of the Zb* extensions adds a rotate, i think
<geist>
Zbb i think
<moon-child>
misaligned access straight up traps, right? So it's not the sort of thing where like it's a few extra cycles but maybe worth it for small inputs?
<geist>
which is about to become more or less standard since it's part of RVA22
<geist>
yah unaligned accesses may straight up trap, so can't use it as an optimization
<geist>
since they may, either you have multiple implementations (long term strategy) or you assume you should't do it (good short/medium term strategy)
<kazinsal>
that level of architectural segmentation is going to be a nightmare if risc-v ever ends up being a notably significant architecture for consumer hardware
<geist>
word.
<moon-child>
tbqh, I feel like the idea of an isa in general is a mistake
<moon-child>
we should target something higher level for portability
<kazinsal>
for the kind of hyper-embedded stuff like eg. western digital using risc-v cores as disk controllers, it's totally fine to be able to say "this core supports RV64IMA only"
<moon-child>
leaving more flexibility for the low level bits
<moon-child>
(NB. this has actually worked out rather well for gpus; there are some hiccups afaict in cases when you need access to lower-level stuff, but I think biasing the other way--approaching it from the other direction--could avoid that and be a monotonic improvement over the current state of affairs)
<kazinsal>
but the fact that you could compile a "generic" linux kernel for eg. RV64GCBVH and then have it not work on half the risc-v boxes out there because some combination of that CBVH doesn't exist on them is a huge problem
<kazinsal>
it'll lead to a lot of architectural workarounds for flagging bits that don't exist like on x86-64 but to a much more critical degree
<geist>
that's why the RVAnn stuff is getting going
<geist>
it's going to try to standardize levels of support for extensions and whatnot
<geist>
kinda sorta like the ARM SBSI stuff
<geist>
though that was more peripheral oriented
<kazinsal>
yeah I'm not really sure why atomic instructions weren't considered part of the G set
<bslsk05>
github.com: riscv-profiles/profiles.adoc at main · riscv/riscv-profiles · GitHub
<geist>
i'm pretty sure they are. rv64gc is the basic rv64imacfd_zicsr stuff
<kazinsal>
neat, I think at one point early on they weren't but I haven't been super deep into the rv rabbit hole
<kazinsal>
mostly because my personal focus on super low level hacking is on networking appliances and nobody's barfed out a risc-v based networking board yet
<geist>
yah
<kazinsal>
eventually I'll return to my "real" osdev project but in the meantime hacking away at the 5150 unix thing is just more fun
<kazinsal>
(my "real" project being a scalable, recoverable routing engine)
<mjg>
april the first
<mjg>
contribute to illumos day
<mjg>
where is heat when you need to offload a patch
<kazinsal>
entirely for fun of course -- my job is being a network engineer and a partner for cisco, juniper, and extreme, so I know on a practical level I'm insanely outclassed at all levels
<mjg>
mate
<kazinsal>
some of the deep internals of a lot of the newer juniper gear is super cool and pretty osdev-level hackery
<kazinsal>
one of the recent service provider platforms we've been working with is this incredible hackjob that involves each socket running an independent kvm host with junos inside that as a virtual machine
Burgundy has joined #osdev
<kazinsal>
with shared memory between the VMs and the whole PCIe bus shared over iommu
<mjg>
:p
<mjg>
as i tried to note, while i don't know the specific internals, i would be deeply shocked more than 10% of any of this was any good
<kazinsal>
oh it's very terrifying from the perspective of someone who knows how this kind of stuff works at a low level
<mjg>
this is not lcaiming there is know-how in respective companies
bliminse has quit [Ping timeout: 250 seconds]
<kazinsal>
but we're mostly successfully building a metropolitan service provider on it so
<mjg>
rather the teypical case is that they coded themselves into a corner one day
<mjg>
and now can't get out
<kazinsal>
clearly the software works!
<mjg>
"ultimately delivers the result you expect in your test" is the usual standard, innit
<mjg>
not to be confused with being sensible
<kazinsal>
acceptance test plan passes? ship it
<mjg>
no rm -rf after 30 minuteS? ship
<kazinsal>
the platform has some bugs but it's super rad and we're turning up a whole metro fibre provider for otttawa-gatineau with it
<mjg>
you are just a glorified IT guy!
<kazinsal>
I'm our main datacenter wizard
<mjg>
what's a derogatory english term for people who set up cabling in buildings
<mjg>
ethernet 'n shit
<kazinsal>
I do most of my company's compute and storage work
<kazinsal>
networking is my original field and a point of expertise but I usually just consult as an individual contributor on that kind of thing in projects
<mjg>
sorry mate, i'm in the mood for a certain conversation but there is clearly a mismatch here
<kazinsal>
for projects I lead I'm the "make VMs and storage work" guy
<kazinsal>
the only thing I won't admit to is being competent at telephony/voice/unified communications
<mjg>
i don't know how much junos is still freebsd + mips, but there is the funny bit where freebsd *droppped* mips
<mjg>
so those suckers can't be rebased
<mjg>
and i know a guy who is still bugfixing them, poor sap
<kazinsal>
junos is still entirely freebsd for all the actual junos bits, the only technical change is that on the resilient platforms it runs inside a kvm VM
<moon-child>
oh maaaan haha
<mjg>
kazinsal: what cpu? that can't be mips, can it?
<kazinsal>
mostly x86 these days
<mjg>
kazinsal: is it amd64 all the down?
<mjg>
y
<mjg>
kazinsal: can you uname -a that sucker
<mjg>
they used to be based on stable/12 but i think there is mvement to bump that
<kazinsal>
sure, gimme a min to remember all my VPN creds
<mjg>
believe it or not juniper actively upstream a lot of their hackery
<mjg>
upstreams
<kazinsal>
our hardware for this one is hyper segmented out from our main lab so I need to log into our corp VPN, then into the staging VPN from within a VM
<kazinsal>
then SSH to the hardware, then log into the vmhost console
<mjg>
i could not be arsed ngl
<mjg>
even to do real work
<mjg>
:]
<kazinsal>
I've had enough beers at 3am to be arsed
<mjg>
what's your local time
<kazinsal>
0310 PDT
<kazinsal>
UTC-7 right now
<mjg>
noon here
<mjg>
ye doing shitty work while intoxicated == $$
<mjg>
ngaf state
<kazinsal>
my team lead is the architect on this deployment so I've been painfully aware of a lot of it
<kazinsal>
but also I didn't really know too much juniper stuff before it started and now I'm fairly confident about the platform
<mjg>
my only handson experience with juniper is my manager asking me wtf is up with negative free space
<mjg>
13 years ago
<mjg>
:]
goliath has joined #osdev
<kazinsal>
my main contribution to this build was doing the nutanix environment
<mjg>
[for interested, by default there is a an artificial limit below capacity so that unpriv users get ENOSPACE while root can keep writing for a time]
<mjg>
btw what's sysctl hw.ncpu on those suckers
<mjg>
freebsd does *NOT* have locking support for kvm
<mjg>
and i would be surprised if juniper wrote it
<moon-child>
geist: for your misalignment handling, I would consider either 1) get rid of the branch checking if the dst is aligned (ie write 1-8 bytes rather than 0-7); or 2) have a separate branch for every power of two
<mjg>
kazinsal: sysctl hw.ncpu
<moon-child>
(by 2 I mean: check if have to write 1 byte; then check if have to write 2 bytes; then check if have to write 4 bytes)
<kazinsal>
hw.ncpu: 6
<mjg>
do you know how this relates to core count on real hw
<kazinsal>
I'm a bit confused actually, because last time I was on this router it was a different hardware model
<mjg>
or rather, how many vcpus are in there vs how many are really present
<mjg>
to put it differenty; are they overscubscribing it
<kazinsal>
but based on my understanding this is in fact a 6/12 c/t cPU
<kazinsal>
one socket per routing engine, two routing engines per chassis
<mjg>
sysctl machdep.hyperthreading_allowed
<kazinsal>
1
<mjg>
well then it would be 12 :p
<kazinsal>
this is an MX10003 fwiw
<mjg>
i don't speak juniper models
<mjg>
my knowledge almost ends at being aware the shitters exist ;)
<kazinsal>
3RU chassis with two independently survivable x86-64 blades doing the compute stuff and four blades doing the ASIC stuff
Brnocrist has quit [Ping timeout: 255 seconds]
nyah has joined #osdev
aktaboot_ has joined #osdev
pmaz has quit [Ping timeout: 276 seconds]
aktaboot_ has quit [Quit: Leaving]
crankslider has quit [Ping timeout: 268 seconds]
bliminse has joined #osdev
leon has quit [Ping timeout: 240 seconds]
IRChatter7 has joined #osdev
IRChatter has quit [Ping timeout: 268 seconds]
IRChatter7 is now known as IRChatter
DanDan has joined #osdev
leon has joined #osdev
Jari--- has quit [Ping timeout: 268 seconds]
leon has quit [Quit: see you later, alligator]
leon has joined #osdev
Jari--- has joined #osdev
sortiecat has joined #osdev
wootehfoot has quit [Read error: Connection reset by peer]
Left_Turn has joined #osdev
oo has joined #osdev
oo has quit [Remote host closed the connection]
Arthuria has joined #osdev
oo has joined #osdev
dutch has joined #osdev
bnchs has quit [Remote host closed the connection]
Arthuria has quit [Remote host closed the connection]
oo has quit [Remote host closed the connection]
oo has joined #osdev
oo has quit [Remote host closed the connection]
[itchyjunk] has joined #osdev
<gog>
hi
oo has joined #osdev
<sakasama>
Narf.
<sham1>
Woof
sortiecat has quit [Remote host closed the connection]
wootehfoot has joined #osdev
oo2 has joined #osdev
oo has quit [Ping timeout: 276 seconds]
oo2 is now known as oo
<gog>
meow
* nikolar
pets gog
<Ermine>
gog: may I pet you
wgrant has quit [Ping timeout: 246 seconds]
wgrant has joined #osdev
slidercrank has joined #osdev
vdamewood has quit [Ping timeout: 260 seconds]
vdamewood has joined #osdev
bgs has joined #osdev
jjuran_ has joined #osdev
jjuran has quit [Ping timeout: 246 seconds]
jjuran_ is now known as jjuran
FreeFull has joined #osdev
<gog>
Ermine: yes
* gog
prr
* Ermine
pets gog
<Ermine>
prr again
* gog
prr again
dayimproper has quit [Quit: WeeChat 3.7.1]
linear_cannon has quit [Remote host closed the connection]
oo3 has joined #osdev
oo has quit [Ping timeout: 246 seconds]
frkazoid333 has quit [Ping timeout: 250 seconds]
oo has joined #osdev
frkazoid333 has joined #osdev
oo3 has quit [Ping timeout: 250 seconds]
<sortie>
PSA: Now that Libera is moving to Discord, anyone still wanting to use the legacy IRC technology can migrate to irc.sortix.org #osdev
<mjg>
but discord is moving to irc
<Ermine>
discord plugin for weechat when
oo has quit [Remote host closed the connection]
<geist>
now that irc is moving to snail mail
<slidercrank>
sortie, do you mean they want to abolish IRC?
<slidercrank>
I dislike Discord. you automatically join all the channels a server provides. Even those you don't need and there is no way of unjoining them. Libra has tens of thousands channel, I guess. How will it look on Discord?
<geist>
sortie is just trying to sow discord. hehe
Brnocrist has joined #osdev
linear_cannon has joined #osdev
heat has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
<heat>
mjg, showing negative space is totally bizarre
<heat>
is this something on df's part or is freebsd statfs weird?
<sakasama>
slidercrank: They'll have to band together into different servers, as moderators wouldn't be per-room anymore. You'd select which servers to join based on who you want to ban you. It's really quite logical, when you think about it.
<bslsk05>
'The Beatles - Back In The U.S.S.R. (2018 Mix / Lyric Video)' by TheBeatlesVEVO (00:02:45)
wootehfoot has quit [Quit: Leaving]
freysteinn has quit [Remote host closed the connection]
antranigv has quit [Ping timeout: 248 seconds]
antranigv_ has joined #osdev
warlock has quit [Quit: Lost terminal]
dh` has joined #osdev
<zxrom>
Ermine, Read the UN Charter, there is no Russian Federation and Ukraine, there is the USSR. If the USSR did not exist de jure, then the charter would have already been changed.
<bslsk05>
'Microsha 89 - Soviet Union (Микроша 89)' by Microsha89 (00:02:15)
<zxrom>
;-)
<sakasama>
... but my mother says Hitler was a Russian imposter. If they were still the USSR then, he would have to have been a Soviet instead. Are you calling my mother a liar?!
<bslsk05>
'Complete History Of The Soviet Union, Arranged To The Melody Of Tetris' by pigwiththefaceofaboy (00:06:48)
<zxrom>
sakasama, Your mother was wrong. Hitler was appointed by the British to destroy Stalin. Since Stalin broke the global communist revolution initiated by Britain. Stalin began to build a new Russian empire.
<sakasama>
zxrom: You'll have to debate this with my mother in person; expect to be eaten.
<Ermine>
lol
<zxrom>
sakasama, Thank you for the offer, but I refuse! I was only voicing an opinion and this channel will not allow further discussion of this topic.
<Ermine>
As if UN charter was the only treaty in the world
<bslsk05>
'Welcome to Russia 🇷🇺' by Крестьянское подворье Дим Димыча (00:00:22)
<sakasama>
[zid](https://matrix.to/#/@zid:libera.chat): Finland is as real as I am.
<bslsk05>
matrix.to: You're invited to talk on Matrix
<zxrom>
If you studied the issue of the destruction of the USSR in terms of legal documents, you would be very surprised. Even I, having a Belarusian passport with the inscription "Passport of a citizen of the Republic of Belarus", I did not go through the naturalization procedure, so most likely de jure I am still a citizen of the USSR. Moreover, I have a birth certificate with the coat of arms of the USSR.
<sakasama>
Interesting. I've discovered a markdown horror.
<zid`>
all markdown is horror
<sakasama>
s/markdown/reality/ but now it's not specific enough to be interesting.