Re: [PATCH 00/15] Remove callback indirections in compression code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 14.10.19 г. 15:22 ч., David Sterba wrote:
> The series removes all per-compression algorithm callbacks and replaces
> them with a switches. Lots of indirections are simplified and while it
> looks nice from design POV, we don't need to over-engineer it as we have
> only fixed known number of the users and not public API.
> 
> The cost of indirect function calls is also higher with enabled
> mitigations of the spectre vulnerability, so they've been incrementally
> removed from the whole kernel and from btrfs as well.
> 
> David Sterba (15):
>   btrfs: export compression and decompression callbacks
>   btrfs: switch compression callbacks to direct calls
>   btrfs: compression: attach workspace manager to the ops
>   btrfs: compression: let workspace manager init take only the type
>   btrfs: compression: inline init_workspace_manager
>   btrfs: compression: let workspace manager cleanup take only the type
>   btrfs: compression: inline cleanup_workspace_manager
>   btrfs: compression: export alloc/free/get/put callbacks of all algos
>   btrfs: compression: inline get_workspace
>   btrfs: compression: inline put_workspace
>   btrfs: compression: pass type to btrfs_get_workspace
>   btrfs: compression: inline alloc_workspace
>   btrfs: compression: pass type to btrfs_put_workspace
>   btrfs: compression: inline free_workspace
>   btrfs: compression: remove ops pointer from workspace_manager
> 
>  fs/btrfs/compression.c | 241 +++++++++++++++++++++++++++++++----------
>  fs/btrfs/compression.h |  39 +------
>  fs/btrfs/lzo.c         |  53 ++-------
>  fs/btrfs/zlib.c        |  52 ++-------
>  fs/btrfs/zstd.c        |  47 +++-----
>  5 files changed, 227 insertions(+), 205 deletions(-)

The whole series look good.

Reviewed-by: Nikolay Borisov <nborisov@xxxxxxxx>

> 



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux