28.08.2015 Views

The Design and Implementation of the Anykernel and Rump Kernels

1F3KDce

1F3KDce

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

101<br />

rump kernel memory limit<br />

relative performance<br />

0.5MB 50%<br />

1MB 90%<br />

3MB 100%<br />

unlimited (host container limit) 100%<br />

Table 3.2: File system I/O performance vs. available memory. If memory<br />

is extremely tight, <strong>the</strong> performance <strong>of</strong> <strong>the</strong> I/O system suffers. A few megabytes <strong>of</strong><br />

rump kernel memory was enough to allow file I/O processing at full media speed.<br />

from secondary is not included. Our view is that paging anonymous memory<br />

should be h<strong>and</strong>led by <strong>the</strong> host. What is left is <strong>the</strong> vnode pager, i.e. moving<br />

file contents between <strong>the</strong> memory cache <strong>and</strong> <strong>the</strong> file system.<br />

• Wired memory is non-pageable, i.e. it is always present <strong>and</strong> mapped. Still,<br />

it is critical to note that <strong>the</strong> host can page memory which is wired in <strong>the</strong> rump<br />

kernel barring precautions such as a mlock() hypercall. Most wired memory<br />

in NetBSD is in one form or ano<strong>the</strong>r allocated from a pool as was described<br />

in Section 3.4.2. During memory shortage, <strong>the</strong> pagedaemon requests <strong>the</strong><br />

allocators to return unused pages back to <strong>the</strong> system.<br />

<strong>The</strong> pagedaemon is implemented in <strong>the</strong> uvm_pageout() routine in <strong>the</strong> source file<br />

sys/rump/librump/rumpkern/vm.c. As mentioned earlier, it is invoked whenever<br />

90% <strong>of</strong> <strong>the</strong> memory limit has been allocated from <strong>the</strong> host, or when a memory<br />

allocation hypercall fails. <strong>The</strong> pagedaemon releases memory in stages, from <strong>the</strong><br />

ones most likely to bring benefit to <strong>the</strong> least likely. <strong>The</strong> use case <strong>the</strong> pagedaemon<br />

was developed against was <strong>the</strong> ability to run file systems with a rump kernel with<br />

limited memory. Measurements showing how memory capacity affects file system<br />

performance are presented in Table 3.2.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!