Re: [PATCH] btrfs compression: reuse recently used workspace

2014-06-26 Thread David Sterba
On Wed, Jun 25, 2014 at 12:00:44AM +0900, Sergey Senozhatsky wrote: > Add compression `workspace' in free_workspace() to > `idle_workspace' list head, instead of tail. So we have > better chances to reuse most recently used `workspace'. > > Signed-off-by: Sergey Senozhatsky Makes sense to me, Re

[PATCH] btrfs compression: reuse recently used workspace

2014-06-24 Thread Sergey Senozhatsky
Add compression `workspace' in free_workspace() to `idle_workspace' list head, instead of tail. So we have better chances to reuse most recently used `workspace'. Signed-off-by: Sergey Senozhatsky --- fs/btrfs/compression.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/b

[PATCH] btrfs compression: reuse recently used workspace

2014-06-24 Thread Sergey Senozhatsky
Hello, Whenever possible, find_workspace() returns the first idle workspace; and free_workspace() puts workspace to idle list tail. Put workspace to head of idle list instead. Hopefully, this will let to reuse most recently used workspace and avoid workspace->mem, ->buf, ->cbuf address translation