Re: [PATCH 1/3] lib: Introduce copy_from_back()

2020-11-18 Thread Zhaoxiu Zeng
在 2020/11/17 1:24, Christoph Hellwig 写道: >> +#define FAST_COPY_SAFEGUARD_SIZE (sizeof(long) * 2 - 1) >> + >> +#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS >> + >> +/* >> + * The caller must ensure that the output buffer has enough space (len + >> FAST_COPY_SAFEGUARD_SIZE), >> + * so we can write

Re: [PATCH 1/3] lib: Introduce copy_from_back()

2020-11-16 Thread Zhaoxiu Zeng
在 2020/11/17 0:35, Christoph Hellwig 写道: > On Tue, Nov 10, 2020 at 03:16:01AM +0800, zengzhao...@163.com wrote: >> From: Zhaoxiu Zeng >> >> Copying the matched bytes from the back output buffer is the >> key code of the LZ decompression algorithm which used by zlib, lzo, etc. >> >> This patch

Re: [PATCH 1/3] lib: Introduce copy_from_back()

2020-11-16 Thread Christoph Hellwig
> +#define FAST_COPY_SAFEGUARD_SIZE (sizeof(long) * 2 - 1) > + > +#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS > + > +/* > + * The caller must ensure that the output buffer has enough space (len + > FAST_COPY_SAFEGUARD_SIZE), > + * so we can write 2 words per loop without overflowing the output

Re: [PATCH 1/3] lib: Introduce copy_from_back()

2020-11-16 Thread Christoph Hellwig
On Tue, Nov 10, 2020 at 03:16:01AM +0800, zengzhao...@163.com wrote: > From: Zhaoxiu Zeng > > Copying the matched bytes from the back output buffer is the > key code of the LZ decompression algorithm which used by zlib, lzo, etc. > > This patch introduce the optimized copy_from_back function. >

[PATCH 1/3] lib: Introduce copy_from_back()

2020-11-09 Thread zengzhaoxiu
From: Zhaoxiu Zeng Copying the matched bytes from the back output buffer is the key code of the LZ decompression algorithm which used by zlib, lzo, etc. This patch introduce the optimized copy_from_back function. The function will be used by later patches in this series. Optimization for a