IRC channel logs

2023-01-06.log

back to list of logs

<rickmasters>Nice to see you here Mikaku!
<Mikaku>hey! :-)
<rickmasters>Everyone, please welcome the author of Fiwix!
<Mikaku>well, it's a pleasure for me to join here
<Mikaku>I'll be glad to answer any question on the Fiwix kernel
<rickmasters>Mikaku: I'm testing your free_vma_pages change right now, by the way.
<Mikaku>ah, perfect
<Mikaku>I've make a massive package build with this change and I don't see any regression
<Mikaku>rickmasters: FYI, I've make some comments about the case 5 in <https://github.com/mikaku/Fiwix/issues/16>
<rickmasters>Well, I'll start with a question - what do you have planned for Fiwix? It looks like you've been focused on PCI lately...
<Mikaku>I'm mainly focused right now to include DMA support for hard disk, as the PIO mode is really slow
<Mikaku>this DMA (UDMA actually) needs the PCI BARs addresses, so I'm including support for the PCI IDE controller
<rickmasters>What kind of machine do you do your work on?
<Mikaku>I mainly use QEMU for development, and then I test the kernel on old PCs here around me
<rickmasters>As I mentioned before I have a lot of outstanding changes pending for Fiwix to support live-bootstrap.
<rickmasters>I spent the last couple of weeks polishing them and creating test cases (for some).
<rickmasters>I just finished that and will be submitting issues but I was going to do that slowly so as not to overwhelm you.
<Mikaku>I thank you to submitting the new changes in a slow pace, this makes me life easier because sometimes I have collisions with my local changes and that takes time to merge
<rickmasters>yeah, I figured I should submit PRs against the latest commit once you are done with the previous one.
<Mikaku>yes, that helps a lot, thanks
<rickmasters>You managed to make over 80 commits since I started so it took me quite a bit of work to rebase my changes but it's all ready to go now.
<rickmasters>You've been quite busy the last couple of months.
<Mikaku>yes, I have been very productive lately
<Mikaku>that always depends on my spare time, of course
<rickmasters>Correct me if I'm wrong, but you've been working on this for over 25 years, so it's incredible that you've maintained motivation.
<Mikaku>you're right, but I've not been working at the same pace all the time (job, life, etc. you know) and regarding the motivation ... I think that this project became like a personal challenge
<rickmasters>Hey, why I have you here, do you remember the reason for this commit?: https://github.com/mikaku/Fiwix/commit/b935b3dfc39d0067c08ac6ac797b8a5aca67cc86
<rickmasters>I was having an intermittent problem with Fiwix that I tracked down to that commit but strangely the problem went away...
<rickmasters>But if it comes back it might help to know what was going on with that change.
<rickmasters>(The problem was running out of process slots, but only when I compiled with tcc for some reason)
<Mikaku>hmm, I think this commit was to make sure that the new running process have full CPU slice time
<rickmasters>Right, it looks like the default time slice is 200ms which is set on the init process and copied to all children.
<Mikaku>(just change the value of NR_PROCS in include/fiwix/config.h)
<rickmasters>Yeah, when the problem was happening it would manifest even with very large NR_PROCS. But I rebooted my machine and the problem stopped happening.
<rickmasters>The machine is an AWS machine so I might have ended up on different hardware for all I know. It's too bad I wasn't able to track it down while I could.
<Mikaku>so did you installed FiwixOS on an AWS machine?
<rickmasters>No, I was running under QEMU
<Mikaku>ah
<Mikaku>keep in mind that the Fiwix kernel has been only tested by me :-), so there are for sure bugs pending to be discovered (and fixed)
<Mikaku>the developer is always the worse tester of its own code
<Mikaku>s/developer/programmer/
<rickmasters>Well live-bootstrap is a solid test of a kernel and I've only found a handful of bugs so it's pretty darn good.
<rickmasters>The vast majority of changes were to support additional system calls.
<Mikaku>25 years ... :-)
<Mikaku>yes, I only have been focused on functionality before efficiency
<Mikaku>now I'm more focused on improving efficiency in some areas
<rickmasters>I haven't noticed any significant difference in performance between Fiwix and Linux
<Mikaku>there is, really, there is
<Mikaku>I/O in Fiwix is really slow, that's why is the first thing I want to fix
<Mikaku>with I/O I mean disk access
<rickmasters>Maybe I haven't noticed because QEMU probably layers over that
<Mikaku>yes, that's probably the reason
<Mikaku>Linux has a lot of hacks in its code to be fastest as possible, it's impossible for Fiwix to have even a similar performance
<Mikaku>these hacks makes Linux code sometimes difficult to follow for an average programmer like me
<Mikaku>I prefer to have a cleaner code even if this means to sacrifice performance
<rickmasters>Well the smaller size and C89 codebase is ideal for bootstrapping.
<Mikaku>I loved to know that we are sharing the same ideas :-)
<rickmasters>Mikaku: Are you aware of, or do you follow any similar projects to Fiwix? Small Linux compatible OS? Have you seen https://github.com/vvaltchev/tilck ?
<Mikaku>yes, I'm aware of this one as it was announced in the OSDev forum
<Mikaku>I tested it some time ago and I saw the developers follows a different path than me
<rickmasters>It is based on C11 and was out of reach for tcc without significant changes so Fiwix was better in that regard. Was other differences did you notice?
<Mikaku>yes, I knew the C11 requirement, the rest were just feelings actually, looks like the developer is more focused on newer versions and syscalls like the sys_rt_sig* family, etc.
<Mikaku>I don't know how to say but sometimes seeing the source code, variable names, structures, layout, etc. just tell me a lot about the project and creates me curiosity or not
<Mikaku>and about following a similar project, I sometimes followed this guy <https://github.com/posnk>
<Mikaku>I use the rest of similar hobby OSes as an alternative to learn how others have programmed specific areas
<rickmasters>Hmm, posnk looks interesting but seems to have stalled since two years ago
<Mikaku>yes
<rickmasters>I ran live-bootstrap to completion (to building linux) with your free_vma_pages change.
<Mikaku>wow, this is good news!
<Mikaku>this means I can submit this change in the next days?
<rickmasters>yes, fine with me. I ran the test ten times simultaneously on different CPUs. I did see one instance of fork failure / procs again, so that's interesting.
<rickmasters>No reason to think that fork problem is related to that change.
<Mikaku>do you only use the console during the build time?
<rickmasters>Hopefully it can reproduce enough for me to track it down.
<rickmasters>Yes, but I'm using serial console
<Mikaku>ah, that's what I wanted to know
<Mikaku>I even redirect the kernel messages to a specific serial console
<Mikaku>this way is easier to see all them
<rickmasters>Yes. By the way, that requires /dev/console to exist in the file system.
<Mikaku>yes, the majority of programs involved in the system boot require /dev/console
<rickmasters>I had to pre-populate that in the boot disk. Live-bootstrap runs "naked" - it can boot Linux without devices like that in the file system.
<Mikaku>ah, so you boots only the kernel, no FiwixOS involed?
<Mikaku>s/boots/boot/
<rickmasters>I don't use anything from FiwixOS
<Mikaku>I see
<Mikaku>so I guess you boot Fiwix using the QEMU parameter -kernel
<rickmasters>Yes
<Mikaku>so, you are using 80x25 all the time
<rickmasters>Yes, I'm running qemu with -nographic
<Mikaku>then you'd like to have one of my last changes (not pushed yet), that is the BGA support
<rickmasters>I'm not familiar with BGA
<Mikaku>Bochs (or QEMU) Graphics Adapter
<Mikaku>this gives you a console on a framebuffer of (1024x768, or 800x600, ...), you can have a console of 128x48
<Mikaku>sometimes it's really useful to have a bigger screen
<rickmasters>I run qemu over an ssh session so if it doesn't work with that I probably wouldn't use it
<Mikaku>ah no, in that case it wouldn't work
<rickmasters>I can run qemu with -vnc but live-bootstrap is currently text / serial oriented so I try to make it work that way.
<Mikaku>sure
<Mikaku>rickmasters> Hopefully it can reproduce enough for me to track it down.
<rickmasters>I'm working on it.
<Mikaku>yes, that would be interesting, although I have never seen it before. Intermittent bugs are really difficult to catch
<rickmasters>Yeah, that's why I run 30 simultaneous tests on a monster AWS bare metal machine. Speeds up the search.
<rickmasters>Unfortunately, this one manifests while building linux, which is the last step after an hour or more of building.
<rickmasters>And when I've tried to start from an intermediate position, it doesn't happen. But if it keeps happening I'll figure it out eventually (I hope)
<Mikaku>rickmasters: remember you can use the Magic SysReq key grab some kernel information about processes
<rickmasters>Please elaborate. I don't know about this.
<Mikaku>'alt-sysrq-t' will give you the current list of processes, here you make an idea if the failure is because there are just zombie processes pending to be rapped by its parent
<Mikaku>it works similar as in Linux <https://en.wikipedia.org/wiki/Magic_SysRq_key>
<Mikaku>currently only two SysRq keys are supported: t and l
<Mikaku>s/supported/implemented/
<rickmasters>ok, thanks, I'll look into that
<Mikaku>of course, the easiest way is using the QEMU monitor (Ctrl-Alt-2) and type 'sendkey alt-sysrq-t'
<Mikaku>but since you are using a remote serial connection, I think you won't be able to send such combination of keys
<Mikaku>rickmasters: ^
<rickmasters>The qemu monitor is available with -nographic so that should work. thanks!
<Mikaku>ah, didn't know that!
<rickmasters>It's ctrl-a then c
<stikonas>Mikaku: Hi, thanks for your work on Fiwix
<Mikaku>stikonas: you're welcome! :-)
<oriansj>Mikaku: It is an honor to have you here :-D
<Mikaku>oriansj: heh, please :-)
<oriansj>Your kernel was such a happy find for us and when we learned what it could do; I honestly celebrated ^_^
<Mikaku>I'm still amazed to see how useful Fiwix is for your project
<Mikaku>this has been a big surprise for me, really
<stikonas[m]>Mikaku: kernel bootstrapping have been a huge problem for us. We managed to do user space some time ago but not kernel
<stikonas[m]>We had nothing until rickmasters joined us half a year ago
<Mikaku>I see
<Mikaku>so Linux was not a choice?
<rickmasters>I was in stealth mode for a while. I started on the builder-hex0 kernel on Feb 28, 2022.
<oriansj>Mikaku: Linux is a very hard bootstrapping problem when you don't have GCC
<rickmasters>I'm hoping to finish the kernel bootstrap builder-hex0 -> Fiwix -> Linux within a year of effort.
<Mikaku>oriansj: ah yes, you are using tcc, right?
<stikonas>Mikaku: indeed
<oriansj>Mikaku: well that is the most advanced C compiler we got running on rickmasters' kernel
<stikonas>I havne't even got to tcc with stage0-uefi
<stikonas>but for now I'm not going to work further on it... mes would probably need a considerable effort if one wants to run it on UEFI, and tcc even more so
<oriansj>and prior to that we only had https://github.com/nanochess/bootOS as a bootstrapping option
<Mikaku>wow, 512 bytes! heh
<oriansj>able to bootstrap itself though
<oriansj>and rickmasters' kernel too
<Mikaku>amazing
<stikonas[m]>Well, bootOS is somewhat external
<stikonas[m]>Not produced by people on this channel
<oriansj>there just are a few details about populating the source code onto the boot disk which still need to be figured out but it is a viable option
<Mikaku>I see
<oriansj>but effectively, once one has the source code on that boot disk and starts rickmasters' kernel, we have everything working up to TCC (Still need to sort out details of building Fiwix) and then we expect to have Fiwix carry us the rest of the way to Linux and any Distro you want
<oriansj>so we are very grateful for your wonderful work and it means so much to us
<rickmasters>Yeah, I was pretty dispirited trying to get an old Linux to build and boot with tcc until fossy said: Hey what about Fiwix?
<Mikaku>I appreciate your words
<Mikaku>heh
<Mikaku>thanks for such a nice chat guys
<Mikaku>talk to you later
<rickmasters>Mikaku: see you later, thanks again!
<oriansj>Mikaku: thank you ^_^