Skip to content
Commit d9187649 authored by Byongho Lee's avatar Byongho Lee Committed by David Sterba
Browse files

btrfs: compress: put variables defined per compress type in struct to make cache friendly



Below variables are defined per compress type.
 - struct list_head comp_idle_workspace[BTRFS_COMPRESS_TYPES]
 - spinlock_t comp_workspace_lock[BTRFS_COMPRESS_TYPES]
 - int comp_num_workspace[BTRFS_COMPRESS_TYPES]
 - atomic_t comp_alloc_workspace[BTRFS_COMPRESS_TYPES]
 - wait_queue_head_t comp_workspace_wait[BTRFS_COMPRESS_TYPES]

BTW, while accessing one compress type of these variables, the next or
before address is other compress types of it.
So this patch puts these variables in a struct to make cache friendly.

Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarByongho Lee <bhlee.kernel@gmail.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 619ed392
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment