#Astral

1 messages · Page 32 of 1

bronze nexus
#

If you have steam you should in theory have most of chromium in the bag too since it uses chrome embedded

hardy vine
#

yea guys what is the x86_64 archetecture?

#

never heard of it

#

probably some weird and niche arch i mean x86_64 is so weird

fleet osprey
#

yeah everybody knows that PowerPC achieved world dominance already ultrameme

hardy vine
#

true

#

x86_64 is so random man, its probbably not supported anywhere

bronze nexus
#

Also current image run in qemu as is just page faults before doing anything

grand shadow
#

💀

#

I need to update that stuff

#

When I work on the wine blog post Im likely gonna update a bunch of stuff

grand shadow
#

I have been trying to get steam to run for at almost 2 weeks now, maybe at some point I should just raise the white flag

#

so close yet so far

#

there is an EXTREMELY annoying bug where the unix syscall dispatch will be called with a zero rcx

#

and trying to get the dll from just the return rip has gotten me nowhere because I think it applied non-logged relocations

grand shadow
#

yeah I think I am just gonna take a small break from trying to get steam to run, see what other cool stuff I can try running and write a blog post and push whatever I have already

grand shadow
#

I mean more as in wine stuff

#

I'm gonna probably try:
baldis cuz unity game - DEFERRED because unity bs might take too long
spooky jumpscare mansion - works, very slow
factorio - window opens, does not load
scp cb - no worky :(
ftl - works!

split lance
#

spooky! poggers

grand shadow
#

baldis seems to be doing some bullshit

#

ok I think baldi is going to take an eternity to do that so not gonna test that today

#

ftl seems to be booting up

#

spooky's jumpscare mansion seems to be loading

worthy mica
grand shadow
#

this is so slow 😭

#

oh lord this is laggy

#

it reaaally doesn't like to respond huh

#

I think it wants a loopback tcp connection which is kind of broken on astral

#

anyways thats enough for me today

#

if anyone has any cool and reasonable game ideas for me to try, lmk

viscid flame
#

hoi4

grand shadow
#

hoi4 would probably run at like

#

1 hour per hour

#

real time ww2

viscid flame
#

ill play hoi4 on astral

viscid flame
prime mulch
#

@grand shadow diversion: look into xnu's "zone cache" its their implementation of slabs and magazines its quaint

stone oracle
#

"maga zone cache". 😁

fierce forge
#

you don't get it if you're under 21

#

wait

prime mulch
#

is this trump's plan for managing the strait of heap-uz

gritty shore
#

is it described in the book? I haven't gotten that far yet, I should continue it

prime mulch
#

honestly im not sure its unique actually

#

but like

#

they have a region of virtual address space where the slabs go

#

and they have an array of descriptors elsewhere which they index with the relative page number inside that region and they grow it as needed by adding more page frames to it

gritty shore
#

One thing that freebsd does different for example is having two different magazine types, one alloc and one free

prime mulch
#

is that different isnt that just how it works

gritty shore
#

the classic bonwick one doesn't do that

grand shadow
split lance
fleet osprey
grand shadow
#

Tbf it was like 1 core on a slow hobby os with questionable code quality

fleet osprey
#

sure that may be contributing

#

but it does actually suck, this is not entirely your fault kekw

mild sentinel
#

I don’t know any other DRM free games on steam

#

That would work well

grand shadow
viscid flame
#

0 fps gaming

grand shadow
#

finally pushed everything I had locally

#

18 commits

hearty fulcrum
grand shadow
#

slooow

#

really needs optimizations

cyan junco
analog berry
#

I wonder what your main bottleneck is

marsh sparrow
#

CPU rendering

analog berry
#

u cant say without knowing the linux numbers on a similar vm

#

also its a pixel game lol

mild sentinel
opal lotus
gritty shore
#

Probably not one thing in particular but a combination tbh

mild sentinel
#

Syscalls using cr2 as a temp mmLol
And probably other things too
And don’t say talk is cheap send patches because I can’t even compile astral to make the patches which I would try to wahhgone

gritty shore
#

Software rendering should be plenty fast

opal lotus
#

yeah

mild sentinel
gritty shore
#

ah

opal lotus
#

💀

mild sentinel
#

I don’t expect the worlds largest speedup

#

It it certainly can’t hurt to patch it

#

💀

opal lotus
#

maybe fbdev is an issue?

#

tho it shouldn't be terribly slow

#

actually it shouldn't really matter because plainfb is similar enough to fbdev

mild sentinel
#

Is there even an easy way to speed up fbdev? Idk how mode setting works though I know it’s in the middle of a full GPU driver and the GOP/VGA?

gritty shore
#

Like I said, I doubt the cpu rendering is the issue

#

People ran doom on 486s

opal lotus
#

plainfb is whatever you get from the firmware

formal patio
#

local man is baiting me to continue working on lil

mild sentinel
bronze nexus
#

fbdev is an interface

mild sentinel
#

Yeah

viscid flame
willow rapids
formal patio
#

LVDS output on Sandy Bridge/Ivy Bridge is in the works

grand shadow
#

Something something profiling is needed

mild sentinel
#

🗣️ 🔥

grand shadow
#

And now I use 8 more bytes of memory per cpu grrr

mild sentinel
#

damn

analog berry
#

Should've done a tss scratch space like Linux

mild sentinel
#

or should more kernels be using CR2

grand shadow
viscid flame
grand shadow
#

Ive got the blog post almost drafted down on my notes, then Ill pass to my computer and do a second pass

fleet osprey
fleet osprey
fleet osprey
#

especially on weak hardware

#

I actively see it as low as 5FPS on weaker hw

#

if you have absolutely baller hardware to toss an entire fast as hell CPU at it then it can pull off some somewhat decent framerates

#

but for everybody with average hardware, and especially who isn't going to dedicate their entire system to it (only running the VM with a subset of their hw) then it very much does and will run like crap, because it's just slow

#

even for "simple" stuff like basic GTK apps it's still not that great

formal patio
#

funny how you're shitting on llvmpipe despite multiple people here running it to great success, with surprisingly decent perf

#

on managarm, normal desktop (weston) use with a few GTK apps is easily in the hundreds of fps

#

and supertuxkart is still getting 40-60 iirc

fleet osprey
#

so you all have stupidly fast CPUs then kekw

#

I'm talking about average CPUs like Math's 10300H

#

even the worst code will still appear to run fast if you just throw infinite compute at it meme

formal patio
#

it won't be great on some low-power CPU starved for clock and power obv, but that doesn't justify shitting on LLVMpipe, that's just a limitation of the hw

#

it's like having a slow-ass GPU and blaming the driver for low fps

fleet osprey
#

it's not a hardware limitation, those CPUs are still plenty fast, and if llvmpipe was actually efficient it would be able to achieve far more competent fps on such CPUs

formal patio
#

[citation needed]

#

the point is that LLVMpipe is very optimized, and to get something better is either very, very hard or might not even be meaningfully possible

#

compare it to softpipe for instance, LLVM is quite the perf uplift

fleet osprey
#

go boot up like Debian 5 and compare glxgears perf against Debian 13

#

it's clear as day

mild sentinel
#

ive had LLVM pipe run a 2d vulkan 1.2 unoptimized af game engine at a reasonable FPS on a 900MHz laptop Pentium
i dont think LLVM pipe is the issue here mmLol

formal patio
fleet osprey
#

nah, I'm not even talking about wayland anything here

#

anyways I need to go catch the bus in a few minutes so I gtg
but yeah it's really simple if you just benchmark them lol, the pre-gallium software rendering used to be at least semi-efficient, but llvmpipe is awful, and softpipe is even worse

#

the regression in perf was like 4x from my testing

#

though that was on weaker hw

#

would be curious to see how faster hw stacks up, to see if that influences my opinion any, since I don't really have any to test

sharp carbon
#

you really need to test with the only difference being the renderer

fleet osprey
#

I know I built my own Linux kernel for both, because I was testing it on niche hardware

#

(Nintendo Wii U ultrameme)

#

so that couldn't be a difference

fleet osprey
#

though I don't recall exactly, I just woke up and am getting ready for school lmao

formal patio
#

that got nuked from mesa a long time ago for being old and slow

#

swrast basically interpreted OpenGL state with little optimization, while LLVMpipe is a JIT

#

that goes to great optmization lengths

fleet osprey
#

well it was significantly faster than both softpipe and llvmpipe on all hardware I've tested

#

¯_(ツ)_/¯

fleet osprey
#

just much less extensive testing

#

don't have hard numbers for any of those off the top of my head

formal patio
#

the problem with that statement is that it doesn't line up with either mechanistic logic, or people's experiences, making some issue in your testing plainly the likeliest scenario

fleet osprey
#

¯_(ツ)_/¯

#

I may check it again once I get back home

mild sentinel
#

Or the Nintendo WiiU just has strange ass hardware

fleet osprey
#

but this was my actual experience across multiple devices, so that's what I based my opinion on

mild sentinel
#

Ah

fleet osprey
#

that's just where I remember that 4x number from

fleet osprey
#

though it's very bus constrained, all cores share a single 248MHz bus

#

however I do low level development for it and the other PPC consoles on a daily basis so I have become somewhat normalized to it meme

gritty shore
#

I have written a faster renderer in the past but that was stupidly well optimized and not as generic

fleet osprey
#

not worth repeating myself when I need to leave in 2m lol

#

read the above

willow rapids
#

i didn't even see that yall were taking about gpu stuff i just saw that message

opal lotus
marsh sparrow
#

It's possible that llvmpipe sucks on wii hardware

formal patio
#

that wasn't the claim though

marsh sparrow
#

I could imagine that llvm output is worse than hand optimized swrast for ppc

#

Especially for stuff like old school fixed function pipelines

grand shadow
#

I am curious how many other hobby OSes implement this compatibility mode stuff

analog berry
#

pmos

grand shadow
#

blog post underway™ I hope to have it written by tomorrow

grand shadow
#

@prime juniper remember that managarm clock picture with like 3-4 different clock applications?

#

I have a new suggestion to add to it

#

wine clock.exe

#

I'm looking at the wine builtins and theres some cool shit here

#

4kb/4kb 99% cpu usage

neon crane
#

Wine task manager with whatever WM's window decorations

#

Also you should try running my fireworks test on astral

grand shadow
#

I should add a lua interpreter into the kernel

mild sentinel
grand shadow
mild sentinel
#

Huh Thats interesting

#

So you can like make drivers via Lua?

#

Like a USB driver for a controller etc?

grand shadow
#

Idk what I will do with it other than its cool

mild sentinel
#

I’d presume it would be good for HID shit like drivers for PS3 controllers etc

#

I know Linux’s driver for that is really fucking nasty to bootleg controllers so being able to tweak it in lua to work is nice etc

neon crane
#

My fireworks test runs each particle in an individual thread

#

Xfireworks probably just runs one thread entirely

grand shadow
#

True

proper meteor
upper dragon
#

age_checker.lua 🙃

spare sky
#

🇧🇷 💪

grand shadow
#

It is more so a solution looking for a problem atm but it is a very cool solution

grand shadow
#

alright so

#

I won't have a whole lot of time this week cuz exams and all

#

but I might try to get some bugfixes done, especially some things that pitust raised

fleet osprey
#

Astral has been brought up in the ReactOS discord server btw kekw

grand shadow
#

interesting

grand shadow
fleet osprey
#

nah that's all 😭

#

just dropped the link

#

no discussion about it

grand shadow
#

damn

fleet osprey
#

just thought it was funny that it was mentioned at all lol

grand shadow
#

clearly you need to necro it to say how good astral is /j

fleet osprey
#

lol

obsidian pivot
#

does astral print "LDT INIT... OK"

#

for its LDT syscalls

#

@grand shadow

flint condor
grand shadow
viscid flame
grand shadow
flint condor
grand shadow
#

BUMP INIT... OK

flint condor
#

keyboard interrupt enable kekeke

#

lol bump alloc

#

I am currently brainstorming a basic debugger that can freeze the rest of the system and selectively step through just the one program

fleet osprey
flint condor
#

basically hijacks the scheduler

flint condor
#

wait....I'm roasting myself

fleet osprey
flint condor
#

console output: fa
<TRIPLE FAULT, REBOOTED>

fleet osprey
grand shadow
#

Kerneç init... FAIL

flint condor
#

loading kernel... kernel not found

fleet osprey
#

loading kerneç... FAIL - kerneç not found

willow rapids
#

Kerneç long mode init... FAIL - falling back to 16-bit kerneç

fleet osprey
#

AS-DOS trl

grand shadow
#

larp larp larp larp larp sahur

grand shadow
#

finally stopped being lazy and implemented this

#

so nice to get a backtrace through interrupts instead of manually backtracing

grand shadow
#

I have been slowly working towards something very nice today: a real init system
so far openrc starts up, does its stuff and then starts an agetty on console and com0
one small problem there seems to be: something seems to be HAMMERING the cpu which does not really sound good

#

I really need to add a way to list all the processes and their system load

#

theres still a lot of failures during openrc init I still need to fix/patch to do something astral specific

#

also I'll need to hook it up to astral's power infrastructure etc

grand shadow
#

gigabrain programming?

hearty fulcrum
#

No mail.

winged basin
#

which reminds me that keyronex needs service management

robust geyser
#

systemd? 👀

winged basin
grand shadow
#

The cpu being hammered was likely init just spinning on polling the cmd fifo

#

Because of a misimplemented nonblocking open

winged basin
#

but that might be the right way to go about it anyway

prime juniper
#

Of course

#

Also with systemd 259 and newer there’s a bit more libc is not glibc support so upgrading components (if you’re going the InitWare route)

grand shadow
#

So far it mostly works but still doesnt power off etc

#

I also have to fix up many service scripts

prime juniper
#

Just port systemd lol

grand shadow
#

Keep yapping sir

mild sentinel
prime juniper
grand shadow
#

Tomorrow I think one of the things I will work towards is making my mount utility better i.e. adding fstab support

flint condor
mild sentinel
#

My servers run alpine Linux

grand shadow
#

Based

#

Openrc <3

#

Time to switch to portage as well for the gentoo larp

mild sentinel
#

I’ve used the build system a little and hosted a repo for a bit privately and it was pretty nice

#

Become alpine larp

grand shadow
#

Gentoo larp is better cause if I compile all my packages in my os thats a big flex troll

mild sentinel
#

True

#

Wait wtf

#

Did I just see

#

Did

#

That Ben jammis person

#

Really do that

#

To this gif

#

😭

errant zephyr
#

wtf i looked at astrals pushlock code

#

wtf is this lmao

#

thats not how atomics work

#

a compiler could soundly do a lot of wild shit here im pretty sure

fierce forge
#

If it works it works trl

errant zephyr
analog berry
#

What's your pass

errant zephyr
#

well if you do a nonatomic access, then nothing which does synchronization, then atomics, then the atomic can be turned into a nonatomic access

analog berry
#

Make a pr

errant zephyr
#

the combination of [nonatomic load, atomic store] constrains you into having no other thread which accesses the value

errant zephyr
fierce forge
#

ask a clanker to do it KEKW

errant zephyr
#

its also not that easy to prove because you also have to make sure the value you loaded is noundef

analog berry
errant zephyr
analog berry
#

fix every ub in astral

errant zephyr
#

fix all bugs in the current folder make no mistakes

grand shadow
#

So stop vagueposting and share your wisdom /hj

errant zephyr
#

its a nonatomic load lmao

grand shadow
#

Do I just have to __atomic_load(relaxed) instead?

#

I think I do it in my local tree

errant zephyr
#

i like using a struct wrapper over all the atomics to make sure you cannot fuck it up

grand shadow
#

I see

#

Thanks

grand shadow
#

implemented fstab support in mount and now openrc mounts all the shi I tell it to

mild sentinel
#

🔥

grand shadow
#

next thing up is add netd to it and properly daemonize netd (or at least add an autodetection to it)

mild sentinel
#

What’s your plan for that?

grand shadow
# mild sentinel What’s your plan for that?

disable gentoo newnet services -> add service for netd -> write device autodetection (probably just if_getindex() and find the first non loopback) -> properly daemonize it in the end with a TODO of sending keepalives

#

and ofc allow configuration for it in /etc/conf.d

grand shadow
#

well that was simple

#

I should also remove that netmount script since yknow

#

no network filesystem support yet

#

maybe the swap one as well

hearty fulcrum
grand shadow
#

do not have the patience to debug another "absurd 1 line fix bug that takes a week to track down"

hearty fulcrum
#

cloud plz fix all bugs make no mistakes

grand shadow
#

root

#

root

#

BRUH

#

lmfaoi

hearty fulcrum
#

groot

grand shadow
#

wrong window

hearty fulcrum
#

clear

grand shadow
#

next thing I gotta do is get the hostname command working

grand shadow
#

hostname is up!

fleet osprey
#

Astral for world's best server OS 2026 trust

#

Linux doesn't stand a chance ultrameme

flint condor
#

Linux? just some little European hobby os lol 😂

grand shadow
#

Next thing is getting it to shutdown properlu

sage locust
#

awesome!

grand shadow
#

just gotta patch it to actually shut the system down

formal patio
#

astral is just suckless managarm /s

grand shadow
#

reboot also works

grand shadow
#

I think this just leaves cleaning up some of these error messages and writing service scripts for things like sshd

hearty fulcrum
grand shadow
#

I dont think its actually syncing there I think its just general slowdown

#

Idk why it happens, its random and depends on how happy wsl is

mild sentinel
#

I hope they accept the patches

grand shadow
mild sentinel
#

I know managarm is upstreamed on bash

#

It’s worth a shot

grand shadow
#

I mean it is also managarm

mild sentinel
#

Especially if everything is working properly

grand shadow
#

It has a whole team of people vs random ass astral made by one dev

mild sentinel
#

Fair but astral is a pretty fucking good kerneç

grand shadow
#

Kerneç init...
Ok

bronze nexus
#

Where did the Kerneç thing come from anyway

#

Is it a typo that became a joke

grand shadow
#

Yeah lmao

bronze nexus
#

lol

#

Just like BACKRTACE

#

except more famous

mild sentinel
bronze nexus
mild sentinel
#

i could have sworn it was due to that?

obsidian pivot
#

no

#

it was a typo

mild sentinel
#

damn

tall bluff
bronze nexus
#

probably alt on some non-us keyboard layout or smth

#

lolwut

#

why is your kernel in tree with the distro

mild sentinel
#

mine is too. its called a monorepo

bronze nexus
#

yea but

#

why do this

grand shadow
#

Makes it easier to work on the kernel and distro at the same time

bronze nexus
#

perhaps

#

The only disadvantage I can see to my way of two split repos is dedicated commits just for updating the kernel, though

#

Like it doesn't seem to make much of a difference in terms of that

gritty shore
#

you probably have

#

its a banger

grand shadow
gritty shore
#

it's a very famous brazilian movie

#

so I thought you would have watched it

grand shadow
#

find complaining about EBADF standard output
look in syscalllog
no syscall returns EBADF

#

@prime juniper next time you in linux mlibc, can you try out find /usr/bin -name klhgdfhjdsoihfsdjhfdihfsdjfsdkgsfdjgs to see if its an mlibc issue or astral issue

#

I don't think that error is a big issue anyways so go go gadget //

#

just gotta write service scripts for like sshd now

analog berry
mild sentinel
#

astral is lowkey close to being daily driveable

#

I’d honestly replace my windows install with it at some point

grand shadow
#

(local tcp is kinda borked rn tho)

#

I also need to figure out why it seems to randonmly take a while when exiting a process

#

alright, I think this is it

#

tomorrow I'm gonna work on upstreaming it

#

o7 trusty old init that lasted 3 years

mild sentinel
grand shadow
prime juniper
grand shadow
quartz granite
#

Astral got signed 8 bit overflow

pure thunder
grand shadow
#

for some reason running poweroff with smp completely breaks the next boot, need to figure out why

fierce forge
#

Are you using uACPI? trl

grand shadow
#

yeah, mostly talking about the openrc side

#

it gets to openrc but it seems to skip the runlevels, not sure whyt

bronze nexus
#

wouldn't the hardware powering off reset the CPUs to their default states on next boot?

bronze nexus
#

AH

#

I see

#

That makes sense

neon crane
# grand shadow

maybe syncing disks should come after terminating all processes dont you think?

grand shadow
neon crane
#

consider doing another sync after every process is killed

#

what if you have mmapped data that hasn't been flushed correctly

grand shadow
#

Yeah it could be it

grand shadow
#

lmfao I think I found why it randomly slows down then exiting from a process

#

peak astral code

#

if the exiting thread is lower priority... lol lmao xd

#

it has to wait until the waitpider gets its own priority lowered by running

grand shadow
#

Anyhow, fixed this and the openrc thing

#

Maybe I can look into doing some smp perf work tomorrow

#

Ive also done some more fixing on the things pitust had pointed out

#

The biggest issue right now for smp is on multithreaded applications I think

#

Because of tlb shootdowns related to how I handle anonymous mappings

grand shadow
#

Another thing I might look into is prefaulting already in core program pages on an elf_load

grand shadow
#

Speaking of vmm optimizations,

#

@prime mulch I remember you mentioning windows still has a zero page thread, do you think this is something worth doing?

prime mulch
#

i would use nontemporal writes to bypass cache and avoid obliterating the cache of the core the zero thread is running on

#

at that point you run the risk of causing massive bus contention

#

so you also want to throttle it to like

#

probably not more than a megabyte or two of zeroes per second

#

maybe you can do more if you know the whole system is largely idle

#

and less if you know its busy

grand shadow
#

I see, thanks!

gritty shore
prime mulch
#

so it is contested

analog berry
#

they found out its beneficial to zero the page on the faulting thread

errant zephyr
#

so even if its beneficial, its not worth the complexity

prime mulch
#

its pretty self contained

prime mulch
#

they condemned it based on lackluster implementations that hadnt been updated since the early 90s

grand shadow
#

I also wanna profile things like configure scripts

#

And gcc

#

I think my goal now is gonna be self hosting

#

Aka stability and perf work meme

fleet osprey
marsh sparrow
#

did you get all relevant drivers to work for the machine that you needed to run astral on?

flint condor
#

do you create a dummy interface for it that forwards outbound packets back again

grand shadow
grand shadow
viscid flame
grand shadow
#

@robust geyser how much effort do you think it would be to rebase it

robust geyser
#

probably negative

robust geyser
#

yeah just do it bro

#

should work just fine

fleet osprey
hearty fulcrum
#

16-bit support when

fleet osprey
#

8-bit support when

flint condor
#

I just do this in my outbound packet handler


    if (ip_is_loopback(dst_ip)) {
        ip_scratch_sel ^= 1;

        uint16_t pkt_len = ntohs(packet->length);
        unlock_spinlock_irq(&tcp_send_spinlock, flags);

        ip_handle_packet(packet, pkt_len);
        return;
    }
#

ip_scratch_sel just flips between two dedicated static buffers for shuttling localhost packets, probably not how you want to do it yourself

robust geyser
#

lol

flint condor
#

I copy packets when they go into the inbound packet queue as it makes it easier for me to store them to deal with fragmentation

grand shadow
#

Maybe theres something in astral packets that astral doesnt like

flint condor
#

too much astral in your astral stream

grand shadow
#

glxgears

#

with 4 cores

#

the flamegraph is also quite interesting

#

like fuck you mean you spend like 10% of the kernel time in pushlock_acquire meme

#

the kernel spends 50x more time on pushlock_acquire function than doing shootdowns lmfaoooooo

#

this shit is FUUUUUCKED

grand shadow
#

since this only tracks tsc cycles so running time

grand shadow
#

minecraft is 34.63% kernel time and 65.37% userspace time on max settings on the other hand

grand shadow
#

uhmm

#

what the fuuuck bro

#

this is the mc flamegraph

#

😭

#

me when half of kernel execution time is spent in pushlock

#

the pushlock implementation I have in my tree is different from the one upstream, I wonder if it is this one which is fucking shit u

#

p

#

or if its a general problem

opal lotus
#

just make a better one

grand shadow
#

old pushlocks makes it even slower

#

yeah this shit is fuuucked bro

#

I think I am somehow hammering pushlocks somewhere

gritty shore
#

why are you using pushlocks even

grand shadow
gritty shore
#

why pushlocks

grand shadow
#

also I think I found the issue and you guessed it, it is extremely retarded inneficient code from 2023

grand shadow
grand shadow
# grand shadow also I think I found the issue and you guessed it, it is extremely retarded inne...
static vmmrange_t *allocrange() {
        vmmcache_t *cache = cachelist;
        vmmrange_t *range = NULL;
        while (cache) {
                MUTEX_ACQUIRE(&cache->header.lock);
                if (cache->header.freecount > 0) {
                        --cache->header.freecount;
                        uintmax_t r = getentrynumber(cache);
                        cache->header.firstfree = r + 1;
                        range = &cache->ranges[r];
                        range->size = -1; // set as allocated temporarily
                        MUTEX_RELEASE(&cache->header.lock);
                        break;
                } else if (cache->header.next == NULL)
                        cache->header.next = newcache();

                vmmcache_t *next = cache->header.next;
                MUTEX_RELEASE(&cache->header.lock);
                cache = next;
        }

        return range;
}
#

you get a paperclip if you can see why this code sucks ass

#

what the fuck was I even thinking bro

#

I hate my past self

gritty shore
grand shadow
#

like I did this in the most inneficient way possible

grand shadow
gritty shore
#

then implement DPCs and IRQLs (VMS but whatever)

#

and cool async io

grand shadow
#

I have dpcs and irql (even if my irql implementation seems kinda questionable)

#

async io is way too not unixy for a unix clone tho halfmemeleft

gritty shore
#

not really

#

you can always implement sync on top of async

grand shadow
#

yeah

#

but then I am just managarm halfmemeright

grand shadow
#

anyways I am going to replace that entire inneficient system with just a slab object cache

#

atomic bomb vs coughing baby

grand shadow
#

much better

#

(new glxgears flamegraph)

#

a lot of time is just spent copying data around

#

and I think it was like a 75% userspace-25%kernel split

#

I can kinda feel a perf improvement in mc!!!

#

time to profile mc

#

and then try out the new stuff multicore

#

now mc is 72% userspace time and 27% kernel time

#

most of the mc kernel time just seems to be spent in the vmm

gritty shore
#

how many fps are you getting now

grand shadow
gritty shore
#

that's pretty good

grand shadow
#

for the first time I actually get a higher fps on multicore

#

though I think now the place to focus optimizations on is probably userspace side

#

which means profiling mlibc

gritty shore
#

is mlibc built as release?

#

try that first

fleet osprey
#

Build everything with -Ofast

gritty shore
#

yes unironically

grand shadow
fleet osprey
#

(It breaks so much shit and can actually make stuff slower due to that, 0/10 would not recommend)

grand shadow
#

I should try to do another gcc compilation run on astral again to see if its still stable enough to do it

#

esp. with smp on

#

but first I'll do gnu hello and then mlibc

prime juniper
marsh sparrow
#

that sounds like baseless speculation?

#

what operation in mlibc are you thinking of that would be slow?

opal lotus
#

i.e. compiler flags

marsh sparrow
#

debugoptimized vs release doesn't change perf

opal lotus
#

is debugoptimized the default?

marsh sparrow
#

debug is the default if you pass nothing but you should basically always pass debugoptimized

opal lotus
#

hm

#

i mean astral also uses a 4 month old mlibc

neon crane
marsh sparrow
#

yes but asserts are usually cheap

analog berry
#

btw @grand shadow kvm has paravirt helpers for tlb invalidation and ipis etc

#

if u implement it u could gain a lot of unfair advantage over managarm meme

grand shadow
analog berry
#

ipis work via a hypercall + bitmask

#

tlb flushing is a bit more funny, it's not actually assisted, but u can walk over all vcpus and check if they're currently preempted by host, and if they are just tell kvm to flush the tlb on resume, and clear them from the actual dst mask

grand shadow
#

pushed from astral for max aura farming

bronze nexus
#

nice

grand shadow
#

built from astral

#

including git clone, downloading and extracting the linux tarball, installing linux headers, etc

analog berry
#

Self hosting done?

grand shadow
#

big W for self hosting

grand shadow
#

only after I get a minimal distro from within astral

analog berry
#

Whats missing atm?

grand shadow
#

and speed

#

other than that I think I have everything

#

I fixed one of the annoying bugs that happened when compiling gcc/doing heavy disk work

#

so it should be smooth sailing.... after I profile it a bit meme

analog berry
#

So like, u can compile the entire thing and run it now?

#

Well also kde is missing ofc chad

grand shadow
#

realistically it'd probably take too long and probably crash on the way

hearty fulcrum
#

I read that somewhere

grand shadow
#

who said I would use jinx to do it lol

#

I will do it like a real man smh

#

configure make make install

marsh sparrow
#

How long does mlibc take to build on astral?

fleet osprey
#

perf would suck as you've mentioned

#

but maybe it could do a small embedded buildroot image or something

#

would be a neat test

grand shadow
#

I didn't really time it

grand shadow
#

I am gonna try to do a gcc build

#

full wget -> patch -> autoconf -> configure -> make -> make install

grand shadow
#

A cpu thats a bit betrer than mine at home on short render distance

analog berry
#

did it like crash in the background lol?

grand shadow
analog berry
#

did something segfault

grand shadow
#

I should figure out a way to silence the non fatal ketnel prints when running xorg

grand shadow
analog berry
#

lol

grand shadow
#

Something something segfault handling

analog berry
#

ohh

deft oak
#

how was it not annoying until now

grand shadow
#

Realistically it only happens when a program segfaults

analog berry
fleet osprey
#

I've made one trl

#

it's also sigill-driven

viscid flame
fleet osprey
analog berry
fleet osprey
grand shadow
#

Java and wine seem to like to take segfaults

#

Qemu too I think

analog berry
#

Jits do that in general I guess

formal patio
#

yeah there's a few uses for that

#

I once used it for tracing nvidia's userspace library calls to the kernel driver

grand shadow
#

Got the clanker to write a stub clock_getres and FIONBIO for sockets for me, now meson subprojects download works

#

Which also means I should maybe be able to run mlibc tests wink wink

analog berry
grand shadow
#

When astral on openslopware repo

opal lotus
#

i cant believe you've done this

viscid flame
#

with astral

#

now you are cancelled

analog berry
grand shadow
#

ccplover0 is claudes greatest soldier

viscid flame
#

wrong im gemini user

mild sentinel
#

Then openslopware can go onto openslopware

#

And it will implode

viscid flame
#

it was joke 🙏

grand shadow
marsh sparrow
#

use claude to enumerate all lists on gh with CLAUDE.md and auto submit them to openslopware

winged basin
#

betrayed....

grand shadow
#

😔

grand shadow
#

Added support for smap/smep

grand shadow
#

Im mostly gonna use it for static analysis and some pieces of code I dont care much about

#

The core of the stuff will still be written by me

opal lotus
grand shadow
#

It already found a typo for me which is nice

fierce forge
#

It's such a slippery slope

analog berry
#

that doesnt make your code slop and u get a lot of bugs spotted for free

#

like just ask it to review (not make any edits)

#

it may spot fake/bullshit bugs as well but sometimes its useful

grand shadow
#

just remembered I never really profiled wine

#

maybe I should do that and find out what was causing shit to be extremely slow

#

still not really sure if I want to keep trying to tackle that GetAdapterAddresses() bug because damn that fucking sucks

#

maybe I can leave the clanker trying to see what that is about

mild sentinel
grand shadow
#

autom4ate just fucking segfaults for some reason

#

💀

#

I really need to get some sort of userspace debugger going

#

go go gadget ptrace

#

oh hell naw perl bug

#

its a very silly context dump as well, I think perl is casting some pointer to int

#

0x000000001002e38d <+1853>: movslq %eax,%rdi
0x000000001002e390 <+1856>: add $0x1,%rdi
0x000000001002e394 <+1860>: test %eax,%eax
0x000000001002e396 <+1862>: cmove %rbx,%rdi
0x000000001002e39a <+1866>: call 0x10017010 strcmp@plt

#

spin the wheel, perl bug or gcc bug

#

(the reason why this did not happen before is because I recently changed the default base mmap to be somewhere in high 64-bit space)

#

((and for some ungodly reason this code wants uses a 32-bit pointer

#

congratulations

#

I think its because my_memrchr is not being defined

viscid flame
grand shadow
#

not my problem, they can just hint it to be at some lower memory troll

#

"abandon all hope, ye who enter here"

#

theres code from 1991 here, damn

viscid flame
grand shadow
#

Anyways missing -D_GNU_SOURCE award for my perl recipe

#

autoconf should work on gcc now... Hopefully....

#

Cant try until layer

#

Later

grand shadow
#

Yay xbps install from tmpfs is fixed

viscid flame
#

try to run ultrakill on astral

#

with wine

grand shadow
#

Local tcp is also fixed now

grand shadow
versed terrace
#

h

opal lotus
#

h

obsidian pivot
#

h

wraith surge
#

h

bright knoll
#

h

mild sentinel
#

h

bronze nexus
#

h

spare sky
#

h

grand shadow
#

h

fleet osprey
#

h

dim arrow
#

h

fierce forge
#

h

tall bluff
#

h

bright knoll
#

h

split lance
#

h

grand shadow
#

things I actually need to look into doing:

  • continue iretq's xhci work
  • profile gcc build (maybe I'll start by profiling an mlibc build)
  • profile wine
#

I have a gcc build going rn

#

did wget -> untar -> patch -> autoconf -> configure and its now in make -j2

bright knoll
#

Really weird way to spell “h” but alright

viscid flame
#

h

hardy vine
#

h

grand shadow
#

yay I left gcc building overnight and it did

#

and if the stat is not lying to me, the last thing it did was around 4:48 am

  File: x86_64-astral/libstdc++-v3/src/.libs/libstdc++convenience.a
  Size: 39957322        Blocks: 9756       IO Block: 4096   regular file
Device: 7,1     Inode: 210496      Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2026-04-25 04:48:49.000000000 -0300
Modify: 2026-04-25 04:49:06.000000000 -0300
Change: 2026-04-25 04:48:49.000000000 -0300
 Birth: -```
#

which is, comparing with confure.log, a ~4h50m build

#

a MUCH bigger improvement than the olden over 24h

#

and this was with only a single core

#

Huge step in the right direction with this

#

Still could do better

#

With perl now I dont think youd even need to like patch the makefile for maie install anymore

#

yup, with perl it now installs in a single shot

#

so astral was able to do the full "download tarball -> untar -> patch -> autoconf -> configure -> make -> make install" process with gcc

#

astralbros we are so back

bronze nexus
#

yoooooooo

#

nice

grand shadow
#

broke: mount a real disk device or nothing
woke:

sharp carbon
#

dev zero on root??

opal lotus
sharp carbon
#

you can see this on linux too. if you do mount -t tmpfs none dir you'll see none mounted on dir in df

opal lotus
#

well then ig all my fses are called something

sharp carbon
#

the "convention" for fses where source is meaningless is to make it the same as the type

#

or just some other descriptor for that matter

opal lotus
#

how does it get the list of fses? fstab?

sharp carbon
#

/etc/mtab iirc

#

which on linux is a symlink to /proc/self/mount or something along those lines

opal lotus
#

/mounts but yes

grand shadow
grand shadow
#

I need to make some virtual packages like "base" and "x11-base"

grand shadow
#

Ive already merged some of iretq's work and Im gonna start on finishing his evdev work

hardy vine
#

h

grand shadow
#

evdev merging progress: have gotten xorg server to enumerate and detect event* files

#

this neede some bullshit xorg-server detection code

#

but at least now theres no need for annoying /etc/xorg.conf

#

I think now its just a matter of doing a final review pass of the code and then committing it

marsh sparrow
#

it's not udev, right? It's changing the programs to work w/o it

#

which is a possible route to get it working

grand shadow
#

Yeah its not udev

opal lotus
#

though you totally could do that thinkong

grand shadow
opal lotus
#

managarm kicks dogs

grand shadow
#

evdev support by @robust geyser is merged after some bugfixing!

#

cc @viscid flame

hardy vine
#

does selfhosting for you means being able to build and run astral on astral or being able to uninstall linux and use astral as the daily driver

grand shadow
#

just being enough of self replicating ig

hardy vine
#

ah

grand shadow
#

I've always followd the later as my definition of self hosting but people often mean it as just compiling the kernel

#

which is boooooring

hardy vine
grand shadow
#

Hmm do I work on xhci merging today or do I profile gcc

mild sentinel
viscid flame
#

xhci

#

more important

native pollen
#

XHCI for me too

#

Also how can I see the first post of this thread

#

I’m trying to read the project description but it doesn’t let me see it

elfin turtle
#

there is an up arrow button (top right on desktop)

native pollen
#

I’m on mobile and there isn’t

#

I can’t use desktop discord

elfin turtle
#

discord is fucking stupid

#

here you go

native pollen
#

thank you

grand shadow
#

damn old astral is close to new astral but still so different

spark sentinel
# native pollen

on ios you can always press on the clock or the top bar basically and it will take you to the topmost thing

#

like everywhere

spark sentinel
#

it‘s very annoying most of the time when you accidentally activate that feature and it scrolls all the way back

grand shadow
#

astral is pretty close to 500 stars on github

#

where do I have to shill it to get to 500

native pollen
#

r/osdev

#

you might get mogged by Shrek though trl

opal lotus
bronze nexus
grand shadow
#

didn't sam altman post some bullshit about opertaing systems a few days ago

#

I should shill it to openai and get a job there

bronze nexus
#

oh god

#

my god, LinkedIn has so much AI slop posting on it

grand shadow
#

I should port startx

#

so I don't rely on this

#

stupid ass startwm script

#

thats more so a hack from before I even had signals

opal lotus
#

port wayland

hearty fulcrum
#

doesn't wine have desktop mode

#

use that

grand shadow
#

running startx causes the entire kernel to implode for some reason

#

actual insanity

grand shadow
#

ok I am going to start on the xhci stuff soon but like

#

first I gotta

#

noita

#

on astral

#

to see how faster it got

grand shadow
#

bruh

#

82% userspace hits

#

17% kernel hits

#

hell naw

#

maybe it is some bullshit in mlibc or whatever

mild sentinel
analog berry
#

u really need to port glibc just for performance comparison i swear

grand shadow
#

the kernel time seems reasonable

#

like the stuff thats happening during kernel time

grand shadow
analog berry
#

wouldnt it be faster to port glibc just to confirm that its an mlibc problem trl

grand shadow
#

I don't care who gloire sends I am not porting glibc

#

it would also help if I updated mlibc

#

I am currently on uh

#

4 month old mlibc

bright knoll
mild sentinel
bronze nexus
#

Just make a custom libc, duh

hearty fulcrum
#

libc is for the weak
real men use raw syscalls

mild sentinel
#

Implement Syscalls via page faulting at a canary address for a true challenge

bronze nexus
#

lmao

bright knoll
#

and not in the boring oh canary + 1 = syscall 1

#

no make it random

mild sentinel
#

SASLR

marsh sparrow
wraith surge
opal lotus
#

good thing we don't do that cringe around here

sharp carbon
marsh sparrow
#

Interesting

#

I wonder where this comes from

#

Can you test other programs as well?

sharp carbon
#

sure, what do you want me to test?

marsh sparrow
#

Maybe gcc

sharp carbon
#

what would be a good benchmark for that

marsh sparrow
#

Maybe compile something like gnu hello

#

Or mlibc itself

grand shadow
#

Seems like I should stop procrastinating and start profiling already

#

Ill keep saying this and keep procrastinating pls like scream at me if I dont

marsh sparrow
#

I wonder how we can profile mlibc

analog berry
marsh sparrow
#

Ideally we'd use something like perf but iirc that is a pain to compile

grand shadow
#

Oh nvm thats gprof

#

Or gperf

sharp carbon
marsh sparrow
#

And just compiling mlibc with gprof enabled probably won't work without massive do-not-instrument annotations

#

Yeah i agree, it's unlikely that llvm improved perf by a huge factor

#

within one release

#

Unless it's something like the mlibc version not using the same SIMD instruction set

gritty shore
#

valgrind meme

sharp carbon
gritty shore
#

id say get perf working tbh

#

it's worth it

marsh sparrow
#

I wonder if there is a more lightweight sampling based profiler than perf

#

Maybe i can vibe code a statically linked one in rust halfmemeleft

gritty shore
#

couldnt you try statically linking/compiling perf on your machine?

marsh sparrow
#

Probably if you can get the linux kernel build system to do that :^)

errant zephyr
#

you can get perf built against musl i think anyway

marsh sparrow
#

It is built as part of the linux kernel's build system and iirc doesn't support cross compilation

gritty shore
#

id be curious to see musl vs mlibc performance as well

grand shadow
#

LD_PRELOAD in something that sets up SIGPROF to run every once in a while meme

errant zephyr
#

the go way

#

(go's profiler does that)

grand shadow
gritty shore
#

valgrind would probably be good enough to get a broad overview no?

#

instead of perf

#

I know it doesnt paint the whole picture because its an emulator

errant zephyr
grand shadow
#

Interesting

errant zephyr
errant zephyr
#

which may or may not work for you and which is written in rust and doesnt need to be built in tree

marsh sparrow
#

samply looks interesting

errant zephyr
#

anyway here is a statically linked build of perf for aarch64

#
make -f Makefile.perf --no-print-directory -j8 O=  CC='zig cc -target aarch64-linux-musl -Wno-gnu-variable-sized-type-not-at-end -Wno-uninitialized -fno-sanitize=undefined' CXX='zig c++ -target aarch64-linux-musl -Wno-gnu-variable-sized-type-not-at-end -fno-sanitize=undefined' all NO_LIBTRACEEVENT=1 NO_LIBELF=1 NO_BACKTRACE=1 perf```
#

and a patch

marsh sparrow
#
$ ./target/debug/vibeperf /usr/bin/ls
Cargo.lock  Cargo.toml    src  target  test  vibeperf.out
$ cat vibeperf.out 
/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 0x15844
/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 0x14317
/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 0x22f22
/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 0x7af2
/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 0xe130
/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 0x9272
/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 0xa094
/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 0x1f4ad
/usr/lib/x86_64-linux-gnu/libc.so.6 0x28020
/usr/lib/x86_64-linux-gnu/libc.so.6 0x1669ae
/usr/lib/x86_64-linux-gnu/libc.so.6 0x164426
/usr/lib/x86_64-linux-gnu/libc.so.6 0xa33c8
errant zephyr
marsh sparrow
#

:^)

errant zephyr
#

obv missing debuginfo etc but like

marsh sparrow
#

yeah, proper perf is obviously better

#

why are you using zig to compile lol

#

doesn't clang work?

errant zephyr
errant zephyr
errant zephyr
#

so that you get a static binary? idk whats so complicated about that

#

zig cc is the easiest way to do that

gritty shore
#

ah because it ships musl?

robust geyser
#

"why use a good cross compiler?"

marsh sparrow
#

the code quality is definitely a bit questionable, particularly around the use of unsafe :^)

formal patio
#

one obv bottleneck is printf/scanf code in mlibc I'd guess

#

I think the shader emitting/parsing could be sped up with some work

#

but I'd rather focus on getting it to be entirely correct + building out our testsuite to validate that first

sharp carbon
#

as in -O0

#

i recompiled it with -O2 and now it's 1.6k FPS

#

so still a big difference but not as big as before

marsh sparrow
#

CC @prime juniper

analog berry
sharp carbon
#
[493/498] Linking target ld-linux-mlibc.so
FAILED: ld-linux-mlibc.so 
x86_64-linux-mlibc-g++  -o ld-linux-mlibc.so ld-linux-mlibc.so.p/options_internal_gcc_stack_protector.cpp.o ld-linux-mlibc.so.p/options_internal_gcc_guard-abi.cpp.o ld-linux-mlibc.so.p/options_internal_generic_allocator.cpp.o ld-linux-mlibc.so.p/options_internal_generic_debug.cpp.o ld-linux-mlibc.so.p/options_internal_generic_ensure.cpp.o ld-linux-mlibc.so.p/options_internal_generic_essential.cpp.o ld-linux-mlibc.so.p/options_internal_generic_inline-emitter.cpp.o ld-linux-mlibc.so.p/options_internal_generic_frigg.cpp.o ld-linux-mlibc.so.p/options_internal_generic_ubsan.cpp.o ld-linux-mlibc.so.p/options_rtld_generic_main.cpp.o ld-linux-mlibc.so.p/options_rtld_generic_linker.cpp.o ld-linux-mlibc.so.p/options_rtld_x86_64_runtime.S.o ld-linux-mlibc.so.p/sysdeps_linux_x86_64_arch-syscall.cpp.o ld-linux-mlibc.so.p/sysdeps_linux_generic_sysdeps.cpp.o ld-linux-mlibc.so.p/options_rtld_x86_64_entry.S.o -flto -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -shared -fPIC -Wl,-soname,ld-linux-mlibc.so -nostdlib /var/lib/managarm-buildenv/build/tools/bootstrap-system-gcc/lib/gcc/x86_64-linux-mlibc/14.2.0/libgcc.a
/var/lib/managarm-buildenv/build/tools/bootstrap-system-gcc/lib/gcc/x86_64-linux-mlibc/14.2.0/../../../../x86_64-linux-mlibc/bin/ld: /tmp/ccgZv29Z.ltrans0.ltrans.o: in function `allocateTcb()':
<artificial>:(.text+0x2f69): undefined reference to `memset'
collect2: error: ld returned 1 exit status```
#

lto doesn't like libraries that define mem* ime

analog berry
#

damn

errant zephyr
#

wtf

grand shadow