<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kmi/src/uapi/conf.c, branch master</title>
<subtitle>ACTIVE - Kernel with migrating threads as IPC</subtitle>
<id>https://metanimi.dy.fi/cgit/kmi/atom?h=master</id>
<link rel='self' href='https://metanimi.dy.fi/cgit/kmi/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/'/>
<updated>2024-10-29T19:17:31Z</updated>
<entry>
<title>start moving towards threads always being in rpc</title>
<updated>2024-10-29T19:17:31Z</updated>
<author>
<name>Kimplul</name>
<email>kimi.h.kuparinen@gmail.com</email>
</author>
<published>2024-10-29T19:17:31Z</published>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/commit/?id=5976ad390a15726c3ddfacf8c8b282c8350f9554'/>
<id>urn:sha1:5976ad390a15726c3ddfacf8c8b282c8350f9554</id>
<content type='text'>
</content>
</entry>
<entry>
<title>expose max number of concurrent threads to users</title>
<updated>2024-07-14T10:19:10Z</updated>
<author>
<name>Kimplul</name>
<email>kimi.h.kuparinen@gmail.com</email>
</author>
<published>2024-07-14T10:19:10Z</published>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/commit/?id=06cd3ac67f9e039219df21d4bf63bf53b666355a'/>
<id>urn:sha1:06cd3ac67f9e039219df21d4bf63bf53b666355a</id>
<content type='text'>
+ Can be used to build fast hashmaps to speed up ipc
</content>
</entry>
<entry>
<title>start working on tests</title>
<updated>2024-07-09T19:12:27Z</updated>
<author>
<name>Kimplul</name>
<email>kimi.h.kuparinen@gmail.com</email>
</author>
<published>2024-07-09T19:12:27Z</published>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/commit/?id=e8a1df103cc28419dd7d4439c0b1d1739d110f78'/>
<id>urn:sha1:e8a1df103cc28419dd7d4439c0b1d1739d110f78</id>
<content type='text'>
+ Current setup will likely not last long, just a stopgap until I figure
  out how I want to build each testcase etc.

  Probably dir based, but I'll probably add some scripts that generate
  the build rules for each test case (or binary?). Also, should probably
  put ouput files in a build directory and keep the source clean, but
  again, good enough for now.

  Will have to start implementing more extensive tests, and probably
  come up with some way to compare textual output etc.
</content>
</entry>
<entry>
<title>allow mapping null page</title>
<updated>2024-07-09T14:35:56Z</updated>
<author>
<name>Kimplul</name>
<email>kimi.h.kuparinen@gmail.com</email>
</author>
<published>2024-07-09T14:35:56Z</published>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/commit/?id=298636079d912d0936f8156a609fe74b839c547b'/>
<id>urn:sha1:298636079d912d0936f8156a609fe74b839c547b</id>
<content type='text'>
+ User has to 'free' the 0 page before it becomes accessible to mapping.
  Probably worth noting that this is likely VERY niche and mainly
  concerns stuff like certain kinds of emulators that I'm still
  eons from implementing, but still.

  Unbacked pages can also be useful for some kinds of notifications,
  like 'if someone writes to this page, please report it to me with this
  ID' or whatever, I remember seeing some discussion about it somewhere
  but that's also not really relevant for the moment.

  Most significantly, at least with the current design,
  after the null page is freed it becomes available for use to regular req_mem()
  calls, so users should probably using locks around memory requests.
  That's probably a good idea anyway as internally the kernal has to
  lock the virtual memory, and without a scheduler it might cause
  threads to spin for a while in the kernel which is rather bad.
</content>
</entry>
<entry>
<title>fix LLVM</title>
<updated>2024-07-08T15:04:03Z</updated>
<author>
<name>Kimplul</name>
<email>kimi.h.kuparinen@gmail.com</email>
</author>
<published>2024-07-08T14:43:59Z</published>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/commit/?id=e134202611a50b358c147c92bfb8a7f443030b8b'/>
<id>urn:sha1:e134202611a50b358c147c92bfb8a7f443030b8b</id>
<content type='text'>
+ Anything extern is right out as LLVM doesn't produce correct code for
  them. Maybe if I added some extra attributes but I'm skeptical.
  Replaced with static variables and getters/setters.

+ Inline ASM is apparently a bit buggy, so use an assembly stub when jumping to init.

+ Minimize work done in main() to minimize chance of LLVM doing something silly.
  Still not 100% certain that I shouldn't just write the main() as an assembly stub
  in arch/riscv64 to be absolutely sure everything works as intended.

+ Make .kernel.start section SHF_ALLOC, otherwise lld complains about
  pc-relative addressing

Probably some other stuff as well that I'm forgetting right now. But at least with
LLVM14 LTO seems to work, which is pretty cool?
</content>
</entry>
<entry>
<title>add RAM usage counting</title>
<updated>2024-07-06T19:08:50Z</updated>
<author>
<name>Kimplul</name>
<email>kimi.h.kuparinen@gmail.com</email>
</author>
<published>2024-07-06T19:08:50Z</published>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/commit/?id=3528f88fc36df6964c0efed784ae223cfe93544e'/>
<id>urn:sha1:3528f88fc36df6964c0efed784ae223cfe93544e</id>
<content type='text'>
+ Slightly more overhead but will help track down possible memory leaks
  in the future. Could also add in a flag for turning off/on but I don't
  think the difference in performance is that significant.
</content>
</entry>
<entry>
<title>add zombie and orphan threads</title>
<updated>2024-07-04T16:25:12Z</updated>
<author>
<name>Kimplul</name>
<email>kimi.h.kuparinen@gmail.com</email>
</author>
<published>2024-07-04T16:25:12Z</published>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/commit/?id=07c2376702fb3d508d6ffad6b0ce93b83972ad6e'/>
<id>urn:sha1:07c2376702fb3d508d6ffad6b0ce93b83972ad6e</id>
<content type='text'>
+ Should write this down somewhere but the idea is that when a process
  gets killed, it frees all the memory it can, making all threads within
  that process orphans. Orphaned threads are assigned to the init
  process, which will generally call exit() on each one. Zombie threads
  are threads that own some bit of shared data, and whose reference
  count is above zero. They may not be swapped to or called, even though
  they take up space in thread map and reserve their thread ID.
</content>
</entry>
<entry>
<title>enable irqs when we sleep or swap threads</title>
<updated>2024-07-02T18:58:34Z</updated>
<author>
<name>Kimplul</name>
<email>kimi.h.kuparinen@gmail.com</email>
</author>
<published>2024-07-02T18:58:34Z</published>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/commit/?id=e06772a964e269d2d9abcb43a1edd868a62d4610'/>
<id>urn:sha1:e06772a964e269d2d9abcb43a1edd868a62d4610</id>
<content type='text'>
+ Also swap checks if thread is running
</content>
</entry>
<entry>
<title>document sleep</title>
<updated>2024-06-01T13:47:14Z</updated>
<author>
<name>Kimplul</name>
<email>kimi.h.kuparinen@gmail.com</email>
</author>
<published>2024-06-01T13:47:14Z</published>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/commit/?id=2daea019d2869a1a65829a9883701f8e8453e2fe'/>
<id>urn:sha1:2daea019d2869a1a65829a9883701f8e8453e2fe</id>
<content type='text'>
</content>
</entry>
<entry>
<title>add sleep syscall</title>
<updated>2024-06-01T13:42:55Z</updated>
<author>
<name>Kimplul</name>
<email>kimi.h.kuparinen@gmail.com</email>
</author>
<published>2024-06-01T13:42:55Z</published>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/commit/?id=7a1c7ed1b1c30ba4c668194a955fb414e471bade'/>
<id>urn:sha1:7a1c7ed1b1c30ba4c668194a955fb414e471bade</id>
<content type='text'>
+ Sets the current core to sleep
</content>
</entry>
</feed>
