<bslsk05>
man7.org: adjtimex(2) - Linux manual page
<nikolar>
How many months of those are we going to get
<heat>
300 of those
<heat>
we're doing a countdown top 300 syscalls of all time
<nikolar>
Kek
<heat>
seriously though time makes me feel stupid
<heat>
as if i needed any help!
<nikolar>
Yeah time sucks
<heat>
and i'll need to tackle it soon now that i realized i have a huge time drift at boot
<heat>
average 1.5s drift from an ntp server
<nikolar>
Oh that's a lot
<heat>
yeah i mean, the RTC sucks so there you have like [-1; 1] possible drift just from sampling it once
<nikolar>
Yeah fair enough
<heat>
i'm basically a clock_settime away from having ntp/sntp fixing this, but if i revisit this problem i might as well do it properly
Halofreak1990 has joined #osdev
<Halofreak1990>
sortie, yesterday you mentioned you struggled with preemption using one kernel stack per CPU. Could you elaborate on that? What were things you ran into?
<sortie>
Blocking system calls and preemption in particular
<sortie>
To block, I would need to manually save the state somewhere and let the system call resume later
<clever>
heat: something of note, i believe the syscalls your dealing with, adjust the rate the clock counts at, so you can fine-tune for things like the PIT being fast/slow
<sortie>
And also arrange for a wakeup
<clever>
ive setup graphs of that rate adjustment before, and have a measured change in the rate, when the furnace died
<heat>
clever, yes they adjust things smoothly
<sortie>
Meanwhile preemption was basically impossible and had to be done at well known blocking points, which is where I had these issues
<heat>
instead of dropping or skipping a second or two
<sortie>
So my kernel system calls were more like coroutines
<clever>
but it will also finish on a rate that isnt 1, because your crystal isnt perfect
Lucretia-backup has joined #osdev
<Halofreak1990>
I see
<sortie>
The concept never got far before I realizes how bad this whole approach was
Lucretia has quit [Killed (NickServ (GHOST command used by Lucretia-backup))]
Lucretia-backup is now known as Lucretia
<heat>
note that kernel stacks are usually really small compared to userspace
<sortie>
It _was_ possible but it wasn't a good approach and very hard
<heat>
negligible overhead except if you're google
<sortie>
My big realization was that the saved state of a thread was just its stack
<sortie>
So I might as well embrace that and have a small kernel stack and go 1:1 threading
<sortie>
I did it and it was wunderbar
<heat>
how small are your stacks sortie?
<sortie>
My kernel stacks are 8 KiB at the moment
<sortie>
No data for how much they actually use in practice
<heat>
ah yes that's nice
<heat>
i do 16KB because i might as well
<sortie>
I might be able to get away with 4 KiB instead if I check for some big stack allocations here and there
<heat>
4K is really tricky and linux moved away from it a decade or so ago
<heat>
good warning for you (and everyone else): -Wframe-larger-than=<bytes>
<heat>
warns if a function's stack frame is larger
<sortie>
Indeed
<sortie>
It's tech like that I would like to use
<heat>
sometimes i use too much stack if i think the callstack will never be deep at that point
<heat>
it's definitely a problem onyx has, particularly on nameidata which is a pretty big struct
<clever>
there is also the stack-usage flags
oberrow has joined #osdev
<Halofreak1990>
the way I'm currently thinking of, as I'm just doing a basic printf syscall and exit(1) to get the basics sorted out, is to have syscalls be atomic. They'll be interruptible by hardware interrupts, but otherwise run from start to end in one go
<Halofreak1990>
s/printf/puts
frkazoid333 has quit [Ping timeout: 260 seconds]
<clever>
if you compile with -fstack-usage then gcc will generate .su files for each .o
<clever>
that reports the stack frame size for every function
<clever>
you could then automatically dig up the call-chains (but beware of function ptrs in structs), and add frames together
<clever>
and alert if a chain exeeds some defined limit
<heat>
Halofreak1990, obviously that doesn't work for most non-trivial syscalls
netbsduser`` has joined #osdev
ryoskzypu has quit [Ping timeout: 264 seconds]
ryoskzypu has joined #osdev
oberrow has quit [Quit: Konversation terminated!]
oberrow has joined #osdev
oberrow has quit [Client Quit]
gog has joined #osdev
<cloudowind>
goodays osdev , goodays gog
<gog>
ih
<heat>
IH
<GeDaMo>
ıɥ
* Ermine
gives gog a piece of cheese
<Ermine>
heat: are you on big endian machine
<heat>
gog is
<Ermine>
yeah
<gog>
i am not
<gog>
i have ryzen
* gog
is fascinated
<heat>
KERNEL UP
<gog>
KERNEL DOWN
<Ermine>
whats up
<gog>
it's kernel up it's the worst show on television
<heat>
upkernel
<sbalmos>
sidecar
<sbalmos>
neither big nor little
<gog>
bi-endian
<gog>
that's not real pick an endiannesss
<gog>
byte order 2 3 1 4
<heat>
THERE ARE ONLY 2 ENDIANNESSES
<sbalmos>
every multibyte symbol should have a Byte Order Marker byte
<GeDaMo>
upside down-ian
<Ermine>
everyone picks little on such archs
<Ermine>
heat: based
<gog>
this joke is doing psychic damage to me i'm tappin gout
<sbalmos>
If the next bit is 0, the next 64 bits are little. If it's 1, then big. 65-bit arch.
<heat>
sorry gog
<gog>
it's ok i started it
<sbalmos>
gog: As long as we're not causing Emotional Damage(tm)
<gog>
i have so much of that it's hard to tell sometimes
<gog>
wow a youtube video about 3d printing just being a way to sell more plastic
<gog>
an opinion i already had
<gog>
well not just but it is a bonus
<Ermine>
do you have a 3d printer
<gog>
no
<gog>
i don't have a use for one
<gog>
i don't even have a 2d printer i just print things at work
<heat>
2d printers suck
<gog>
wake me up when there's a 4d printer
<heat>
but 3d printers might be kinda cool
<Ermine>
2d printers suck indeed
hwpplayer1 has quit [Quit: Thanks talk to you later]
<Ermine>
I believe cups is not great either
<gog>
i prefer mugs
<zid`>
3D printers still kind of suck still
<zid`>
They're a lot better than they were
<zid`>
but they still make horrible things with a bad finish that aren't very strong
<zid`>
can't really get good long polymers when you're just melting a thing and hoping it sticks together
netbsduser`` has quit [Ping timeout: 252 seconds]
<gog>
resin UV printing
netbsduser`` has joined #osdev
<cloudowind>
mmm resin yumm
<FireFly>
please don't eat the resin
<cloudowind>
ok:)
<pog>
tasty
<cloudowind>
it does but didnt wanna wake up about which resin i am talking about :/ nice of him that he has warned me :)
<cloudowind>
they are printing weapons with those 3d printers here , governemnt looking ways to prevent it , dont know how they gonna do it
<sortie>
I accidentally ported ruby
<sortie>
Took an afternoon :)
foudfou_ has quit [Remote host closed the connection]
zenmov has quit [Changing host]
zenmov has joined #osdev
<cloudowind>
sounds like a good thing sortie well done
<sortie>
Thank you :)
netbsduser`` has quit [Ping timeout: 252 seconds]
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
foudfou has joined #osdev
<gog>
neat
<heat>
heat
<gog>
cool
muffin_ has joined #osdev
<cloudowind>
you need a time printer for 4d printer dont you , how cool it would be , by the way sortie giving me great motivation to complete stuff , time to shut up and do some work , later beauties
<sortie>
uh what
<heat>
three dimensions plus the t axis
<heat>
space-time would be a 4D thing wouldn't it
<zid`>
I have to fill my printer with tea too now? fucking hell
<zid`>
You know they'll DRM the tea cartridges and make them unrefillable
<heat>
or if you're into string theory you'd have like 400 dimensions or whatever it is they do
<zid`>
string theory is (was) funny as hell
<zid`>
"What if we just... kept adding terms until the math worked out!?"
<heat>
i too enjoy making shit up
<zid`>
"Is any of it, you know, realistic?" "Not in the least"
<zid`>
"perfect"
<zid`>
It's thankfully, now, largely out of fashion
<zid`>
and people still into it are basically just kooks
netbsduser`` has joined #osdev
<zid`>
was mainly a way for physistics to make money lol, doing book tours
<zid`>
without having to go full michiao kaku, just make shit up constantly about everything, even if you know nothing about it
<heat>
imagine getting funding for being literally insane and making shit up with no basis in reality
<heat>
that would be so fucking cool
<heat>
academia grift
<zid`>
They didn't get *much* funding, but it got them some jobs as faculty at universities for a few years
<zid`>
and then they wrote crappy books
<zid`>
they grifted, but it was mainly random plebs they grifted, not academia
<heat>
you know, i found some nice interesting open physics books i've been planning to go through Eventually
<heat>
after i figure out IR^2 calculus, which i never did
<heat>
not sure if i even really need it or if regular IR calculus just kind of works
<gog>
eee i'm beauty
* gog
sparkle
<heat>
but after having physics half assed to me for so many years i'd like to finally understand it
<heat>
like, properly
<nikolar>
what's an IR^2 calculus
<heat>
ℝ^2
<heat>
there, here's some unicode
<zid`>
what's a unicode
<nikolar>
so multivariable calculus?
<heat>
yes
<nikolar>
just say that then
<heat>
it's not necessarily multivariable though
<heat>
f(x) = (x, x*x) is not multivariable but still ℝ^2
<heat>
AIUI, that is
<nikolar>
right
<zid`>
as implied, udder inability
<nikolar>
you just get two independent components, i don't see what's special about it
<zid`>
"I've never done recursion before" "You just write a function that calls itself, I don't see what's special"
<nikolar>
zid`: you can just treat this like two separate functions
<nikolar>
unless i am misunderstanding something
<zid`>
missing my point :P
<zid`>
Yes it's simple, if you know the rules, and have been explained it
<zid`>
but if you haven't, it isn't
<Ermine>
multivariables? wut?
<nikolar>
hello Ermine
<nikolar>
this is a math channel now
<nikolar>
and physics
<Ermine>
I'm fine with it, but I never heard of it on math major...
<heat>
what
<nikolar>
what
<heat>
do you mean the term
<Ermine>
of multibariables*
<nikolar>
it's an adjective
<heat>
or in soviet russia calculus is just done in ℝ
<nikolar>
multibariable calculus
<Ermine>
Ah, this one
<Ermine>
we call that just calculus
<nikolar>
well you've got calculus with f(x) and then f(x, y)
<nikolar>
and the second one gets a lot more complicated
<nikolar>
so it makes sense to name it
<Ermine>
not enough
<nikolar>
meh
<Ermine>
when you get arbitrary manifolds, it becomes fun enough to have its own name (differential geometry)
<nikolar>
still y
<Ermine>
or when you add probabilities, and you get stochastic calculus
<the_oz_>
f(x) where x is f(x, y, z)
<the_oz_>
endless stairs
bauen1 has quit [Ping timeout: 252 seconds]
sonny has joined #osdev
xenos1984 has quit [Read error: Connection reset by peer]
netbsduser`` has quit [Ping timeout: 265 seconds]
sonny has left #osdev [ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.4)]
xenos1984 has joined #osdev
netbsduser`` has joined #osdev
eddof13 has quit [Quit: eddof13]
edr has quit [Quit: Leaving]
netbsduser`` has quit [Ping timeout: 248 seconds]
Lucretia has quit [Remote host closed the connection]
Halofreak1990 has quit [Ping timeout: 265 seconds]