[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [dm-devel] [PATCHES] convert dm-thin to use dm-bufio
- From: Mikulas Patocka <mpatocka redhat com>
- To: Joe Thornber <thornber redhat com>
- Cc: dm-devel redhat com, "Alasdair G. Kergon" <agk redhat com>
- Subject: Re: [dm-devel] [PATCHES] convert dm-thin to use dm-bufio
- Date: Tue, 16 Aug 2011 18:03:00 -0400 (EDT)
> 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
>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]