GSOC 2013 project " Kernel Size Reduction for Embedded System "

Jilles Tjoelker jilles at stack.nl
Mon Apr 8 22:44:26 UTC 2013


On Mon, Apr 08, 2013 at 08:28:04PM +0000, Amit Rawat wrote:
> GSOC posted the list of selected organization for GSOC 2013 and I am
> highly happy that FreeBSD is among the selected organization.

> I am a third year student interested to work in the field of embedded
> system. I applied last year and the title of my project was " Kernel
> Size Reduction for Embedded System". The link to my last year proposal
> is
> https://www.google-melange.com/gsoc/proposal/review/google/gsoc2012/amitrawat10/1#c8001

> But due to some flaws it doesn't get selected. I am looking to improve my
> proposal for this year and apply again. I explain some portion of my
> project pictorially on my blog

> https://amit10rawat.wordpress.com/2013/02/26/kernel-size-reduction-for-embedded-system/

> I am looking for suggestion and new ideas by which I can reduce the
> size of kernel.

It looks like the overlay idea could be implemented more simply by
taking advantage of the VM system: make part of the kernel code
pageable. Memory formerly occupied by rarely used kernel code can then
be used by userland applications. You will need some sort of backing
store where the kernel code can be read after booting; this is not
normally available.

However, almost no kernel code is safe in a situation where an
instruction fetch may fault. Reading or writing the secondary storage
can easily cause a deadlock. It causes the thread to sleep, which is not
allowed while holding a mutex. It would help if you could wire down
pieces which will need to be used in the near future from a place where
a fault is safe, but this may also be very slow even if the code is
already in memory.

Some other ideas for kernel size reduction:

* Find pieces of code that are required but seem big for what they do
  for you, and try to make them smaller. The proposal should list
  concrete parts.

* Find variables and functions that are required only during kernel
  initialization, place them in a special section and add this section
  to the free memory pool after kernel initialization.

-- 
Jilles Tjoelker


More information about the freebsd-hackers mailing list