mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
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>
This commit is contained in:
parent
5588383ece
commit
c39aa7056f
1 changed files with 1 additions and 1 deletions
|
@ -821,7 +821,7 @@ static void free_workspace(int type, struct list_head *workspace)
|
||||||
|
|
||||||
spin_lock(workspace_lock);
|
spin_lock(workspace_lock);
|
||||||
if (*num_workspace < num_online_cpus()) {
|
if (*num_workspace < num_online_cpus()) {
|
||||||
list_add_tail(workspace, idle_workspace);
|
list_add(workspace, idle_workspace);
|
||||||
(*num_workspace)++;
|
(*num_workspace)++;
|
||||||
spin_unlock(workspace_lock);
|
spin_unlock(workspace_lock);
|
||||||
goto wake;
|
goto wake;
|
||||||
|
|
Loading…
Reference in a new issue