[dm-devel] [PATCHES] convert dm-thin to use dm-bufio
Mikulas Patocka
mpatocka at redhat.com
Tue Aug 16 22:03:00 UTC 2011
> For me the main attraction to switching to bufio is you don't use
> dm-io.c.
>
> Hopefully Alasdair will allow you to keep the different memory types;
> I was allocating the buffers in bm either via kmalloc, or pages
> depending on size, but he wanted this changing to a kmem_cache in
> order to 'segregate' the memory.
>
> I'm not clear how you ascertain the correct working set size for your
> cache, or choose when and how many blocks to flush. Have you got any
> documentation for this? thinp shouldn't need a big cache and I'm a
> bit worried a 'grab another buffer if there's memory available' policy
> will make it grow too much.
The working set is 2% of memory or 1/4 of vmalloc space (whichever is
smaller). This can be changed in
"/sys/module/dm_bufio/parameters/dm_bufio_cache_size".
Buffers are freed when they are unused for 60 seconds (can be changed in
"/sys/module/dm_bufio/parameters/dm_bufio_max_age").
Total size is divided by the number of active clients using dm-bufio. So
that each client gets a fair share.
Writeback is done on commit. When 3/4 of the cache size is used,
background writeback is started.
Mikulas
> - Joe
>
More information about the dm-devel
mailing list