<hgoel[m]>
Bit[63:32]: Offset EBh-E8h, high 32-bit address.
trufas has joined #osdev
nyah has quit [Ping timeout: 252 seconds]
<kazinsal>
Ah, yeah. I tend to assume that anything thats logically a 64 bit value that isnt 64 but aligned is not necessarily accessible in a single read/write
<kazinsal>
as for example that might be an illegal unaligned access on some 64-bit platforms
richbridger has quit [Read error: Connection reset by peer]
richbridger has joined #osdev
iorem has joined #osdev
<hgoel[m]>
oh yeah, I didn't notice that it wasn't aligned
freakazoid333 has joined #osdev
isaacwoods has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
gog has quit [Ping timeout: 252 seconds]
iorem has quit [Quit: Connection closed]
<klange>
I've pulled out the paper notebook, that's how you know things are getting serious...
<klange>
I need to rant about my own code for a bit.
<kazinsal>
rant away, friend
<klange>
I want to build new blocking primitives. The ones currently in ToaruOS are not great.
<klange>
Essentially, a lot of stuff is built around "wakeup queues", which at the end of the day are awaitable edge-triggered repeatable events.
<klange>
The exist as literal linked list queues. You want to wait on one? You acquire a spin lock and add your process handle to the queue.
<klange>
When the event "fires", everything in the list will be added to the run queue if it wasn't already in there.
<klange>
They do what they say on the tin, but they're weird, and they have an obvious flaw when SMP comes in: They don't interact with any _conditions_.
<klange>
You have to check the condition first and then sleep_on the relevant event. This has served the OS just fine without SMP, but even with a single core the work involved is cumbersome and it's a pain to add new awaitable conditions with this system.
<Mutabah>
Also, everyone gets woken even if they will just need to sleep again
<klange>
Yeah, it's not great with multiple waiters, either.
<klange>
It's also not great wait with multiple _awaitable events_, so I hacked up something else to implement a select/poll style interface, and the situation there is _even worse_.
<klange>
This is 'fswait', and it was only built for userspace to wait for multiple vfs vnodes... with an optional timeout.
<klange>
The idea is mostly the same, but it's at least somewhat associated with a condition, but not in a way that solves the race above.
<klange>
The 'fswait' process is "go through everything in this list of nodes we got from an fd list from userspace, call the 'check' method, and if anyone says their condition is already 'readable' then we can just return now"
<klange>
"otherwise, go through everything and call the 'wait' method"... and what the wait method does is _entirely up to the vnode_ but is generally the same pattern of "add this process to a wakeup queue".
<klange>
'fswait' does have one useful feature which is the timeouts, in addition to the wakeup queues for the various files you want to poll, you can also be added to the general timed wait queue, which works slightly differently since it's an ordered list with associated timestamp.
<klange>
I really want to unify all these concepts, turn them into objects that aren't a random collection of linked lists and spin locks, and provide a cleaner API that works well for the kernel.
<klange>
Also I want to stype copy-pasting the same check/wait methods between pipes and packet IPC and sockets...
<klange>
Several of these should be a commmon "atomic queue" of stuff. What stuff? Eh, packets typically. Ethernet frames, maybe. Doesn't matter, there's a bunch of stuff that asks "is there data in this list I can pop? no? okay I'll sleep on this other list until someone adds more data"
<bslsk05>
github.com: toaruos/packetfs.c at master · klange/toaruos · GitHub
<klange>
(not to be confused with the implementation of unix pipes; though these used to be exposed to userspace to serve that role... in, like, 2011)
<klange>
Some stuff literally just is one of those, like the keyboard and mouse device files.
<klange>
(_Maybe_ with the ioctl method overridden)
<klange>
And for reasons I don't even remember fully, that whole process is implemented with a whopping three spin locks and two separate lists just for the locking..
<klange>
(Oh, right, it's because everything fswait-able thing that gets waited on adds itself to a list in the process that is waiting on it, for cleanup later when it gets awoken, plus every awaitable thing has _its_ list of things to wake up when its awaitable condition is changed)
<klange>
Suffice to say it's a complicated web of garbage.
piotr_ has joined #osdev
iorem has joined #osdev
<kazinsal>
ooh, neat, if you tell grub to mark a section of RAM as bad it'll just mark it as unusable in the e820 style map it gives you
<clever>
nice!
mahmutov has joined #osdev
elastic_dog has quit [Ping timeout: 244 seconds]
mahmutov has quit [Ping timeout: 264 seconds]
elastic_dog has joined #osdev
sprock has quit [Quit: Lost terminal]
sprock has joined #osdev
chrysanthematic has joined #osdev
freakazoid333 has quit [Read error: Connection reset by peer]
chrysanthematic has quit [Quit: chrysanthematic]
z_is_stimky_ is now known as z_is_stimky
dissident has quit [Ping timeout: 264 seconds]
Giedrius has joined #osdev
Sos has joined #osdev
GeDaMo has joined #osdev
nyah has joined #osdev
vdamewood has quit [Remote host closed the connection]
vdamewood has joined #osdev
Burgundy has joined #osdev
warlock has quit [Ping timeout: 252 seconds]
immibis_ is now known as immibis
Belxjander has joined #osdev
warlock has joined #osdev
gmacd has joined #osdev
dormito has quit [Ping timeout: 268 seconds]
tenshi has joined #osdev
klange-toaru has joined #osdev
piotr_ has quit [Ping timeout: 240 seconds]
<klange-toaru>
Very slow trying to talk to the real world from my laptop
<klange-toaru>
but it works
e4vo3xmpqqa3 has joined #osdev
<GeDaMo>
What's the bottleneck?
<klange-toaru>
Could be all sorts of stuff, but I need to get my desktop in the middle properly to do packet captures to find out
<klange-toaru>
unfortunately there's a smart router instead of a dumb hub between the two right now
dormito has joined #osdev
Oshawott has joined #osdev
archenoth has quit [Ping timeout: 244 seconds]
Arthuria has joined #osdev
amanita_ has joined #osdev
amanita has quit [Ping timeout: 272 seconds]
klange-toaru has quit [Quit: loading new kernel]
<HeTo>
if it were smart enough it would be possible to configure it to send all traffic from/to a certain port to a monitoring port
<clever>
klange: one trick i sometimes use, configure a laptop to bridge the wifi+wired interfaces, and then plug the DUT directly into the laptop
<clever>
it now has access to the entire lan, and you can run wireshark directly against the port its plugged into
gareppa has joined #osdev
<sortie>
I say grep for TODO and fix the well known bugs you didn't think could cause this
gareppa has quit [Remote host closed the connection]
e4vo3xmpqqa3 has quit [Ping timeout: 268 seconds]
ahalaney has joined #osdev
gareppa has joined #osdev
flx has quit [Remote host closed the connection]
flx has joined #osdev
flx has quit [Remote host closed the connection]
flx has joined #osdev
gareppa has quit [Quit: Leaving]
iorem has quit [Quit: Connection closed]
sortie has quit [Quit: Leaving]
X-Scale has quit [Ping timeout: 268 seconds]
isaacwoods has joined #osdev
dennis95 has joined #osdev
srjek_ has joined #osdev
X-Scale` has joined #osdev
mahmutov has joined #osdev
gog has joined #osdev
gareppa has joined #osdev
Arthuria has quit [Ping timeout: 244 seconds]
gareppa has quit [Quit: Leaving]
bradd has quit [Ping timeout: 272 seconds]
andreas303 has joined #osdev
bradd has joined #osdev
Giedrius has quit [Remote host closed the connection]
piotr_ has joined #osdev
bradd has quit [Ping timeout: 268 seconds]
bradd has joined #osdev
mahmutov has quit [Ping timeout: 268 seconds]
andreas31 has joined #osdev
andreas31 has quit [Client Quit]
andreas31 has joined #osdev
andreas31 has quit [Client Quit]
bradd has quit [Ping timeout: 244 seconds]
andreas303 has quit [Remote host closed the connection]
andreas3- has joined #osdev
bradd has joined #osdev
<kc8apf>
kazinsal: Google tested that mechanism pretty well to try mapping out bad sections of DIMMs
nvmd has joined #osdev
andreas3- has quit [Remote host closed the connection]
andreas303 has joined #osdev
bradd has quit [Ping timeout: 264 seconds]
bradd has joined #osdev
divine has quit [Remote host closed the connection]
bradd has quit [Ping timeout: 268 seconds]
bradd has joined #osdev
gog has quit [Ping timeout: 272 seconds]
andreas303 has quit [Remote host closed the connection]
andreas303 has joined #osdev
andreas303 has quit [Remote host closed the connection]
andreas303 has joined #osdev
freakazoid333 has joined #osdev
mctpyt has quit [Ping timeout: 268 seconds]
Arthuria has joined #osdev
freakazoid333 has quit [Read error: Connection reset by peer]
piotr_ has quit [Remote host closed the connection]
piotr_ has joined #osdev
mahmutov has joined #osdev
X-Scale` is now known as X-Scale
freakazoid333 has joined #osdev
ZombieChicken has joined #osdev
ZombieChicken has quit [Client Quit]
dennis95 has quit [Quit: Leaving]
gmacd has quit [Read error: No route to host]
mctpyt has joined #osdev
freakazoid333 has quit [Read error: Connection reset by peer]