diff options
author | Sergey Senozhatsky <sergey.senozhatsky@gmail.com> | 2014-06-24 19:00:44 +0400 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-06-29 00:48:46 +0400 |
commit | c39aa7056f50fa7b49265ea35c0f3eddb7c7be68 (patch) | |
tree | 4cd62c181256ed48e5a733978f08fb547970352d /fs | |
parent | 5588383ece6127909df5b9d601d562fe5b9fe38a (diff) | |
download | linux-c39aa7056f50fa7b49265ea35c0f3eddb7c7be68.tar.xz |
btrfs compression: reuse recently used workspace
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 <sergey.senozhatsky@gmail.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/compression.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index 92371c414228..1daea0b47187 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c @@ -821,7 +821,7 @@ static void free_workspace(int type, struct list_head *workspace) spin_lock(workspace_lock); if (*num_workspace < num_online_cpus()) { - list_add_tail(workspace, idle_workspace); + list_add(workspace, idle_workspace); (*num_workspace)++; spin_unlock(workspace_lock); goto wake; |