lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 28 May 2007 15:58:11 -0700
From:	"Bret Towe" <magnade@...il.com>
To:	"Nitin Gupta" <nitingupta910@...il.com>
Cc:	lkml <linux-kernel@...r.kernel.org>, linux-mm-cc@...top.org,
	linuxcompressed-devel@...ts.sourceforge.net,
	"Andrew Morton" <akpm@...ux-foundation.org>,
	"Daniel Hazelton" <dhazelton@...er.net>,
	"Richard Purdie" <richard@...nedhand.com>,
	"Satyam Sharma" <satyam.sharma@...il.com>
Subject: Re: [RFC] LZO de/compression support - take 6

On 5/28/07, Bret Towe <magnade@...il.com> wrote:
> On 5/28/07, Nitin Gupta <nitingupta910@...il.com> wrote:
> > Hi,
> >
> > This is kernel port of LZO1X-1 compressor and LZO1X decompressor (safe
> > version only).
> >
> > * Changes since 'take 5' (Full Changelog after this):
> > - Added compressor and decomrpesssor as separate and hidden config
> > options (default: n)
> > - Cleanups: removed LZO_CHECK_MPOS_NON_DET macro
> > - removed PTR* macros.
> >
> > * Benchmarks: (system: P4 3GHz, 1G RAM)
> > (Using tester program from Daniel)
> >
> > Following compares this kernel port ('take 6') vs original miniLZO code:
> >
> > 'TinyLZO' refers to this kernel port.
> >
> > 10000 run averages:
> > 'Tiny LZO':
> >        Combined: 61.2223 usec
> >        Compression: 41.8412 usec
> >        Decompression: 19.3811 usec
> > 'miniLZO':
> >        Combined: 66.0444 usec
> >        Compression: 46.6323 usec
> >        Decompression: 19.4121 usec
> >
> > Result:
> > Overall: TinyLZO is 7.3% faster
> > Compressor: TinyLZO is 10.2% faster
> > Decompressor: TinyLZO is 0.15% faster
> >
> > TODO: test 'take 6' port on archs other than x86(_32)
> >
> > * Changelog vs. original LZO:
> > 1) Used standard/kernel defined data types: (this eliminated _huge_
> > #ifdef chunks)
> >   lzo_bytep -> unsigned char *
> >   lzo_uint -> size_t
> >   lzo_xint -> size_t
> >   lzo_uint32p -> u32 *
> >   lzo_uintptr_t  -> unsigned long
> > 2) Removed everything #ifdef'ed under COPY_DICT (this is not set for
> > LZO1X, so removed corres. parts).
> > 3) Removed code #ifdef'ed for LZO1Y, LZO1Z, other variants.
> > 4) Reformatted the code to match general kernel style.
> > 5) The only code change: (as suggested by Andrey)
> > -#if defined(__LITTLE_ENDIAN)
> > -                             m_pos = op - 1;
> > -                             m_pos -= (*(const unsigned short *)ip) >> 2;
> > -#else
> > -                             m_pos = op - 1;
> > -                             m_pos -= (ip[0] >> 2) + (ip[1] << 6);
> > -#endif
> >
> > + m_pos = op - 1 - (cpu_to_le16(*(const u16 *)ip) >> 2);
> >
> > (Andrey suggested le16_to_cpu for above but I think it should be cpu_to_le16).
> > *** Need testing on big endian machine ***
> >
> > Similarly:
> > -#if defined(__LITTLE_ENDIAN)
> > -                             m_pos -= (*(const unsigned short *)ip) >> 2;
> > -#else
> > -                             m_pos -= (ip[0] >> 2) + (ip[1] << 6);
> > -#endif
> >
> > + m_pos -= cpu_to_le16(*(const u16 *)ip) >> 2;
> >
> > 6) Get rid of LZO_CHECK_MPOS_NON_DET macro and PTR* macros.
> >
> >
> > I think it's now ready for mainline inclusion.
> >
> >
> >  include/linux/lzo1x.h        |   66 +++++++++++
> >  lib/Kconfig                  |    6 +
> >  lib/Makefile                 |    2 +
> >  lib/lzo1x/Makefile           |    2 +
> >  lib/lzo1x/lzo1x_compress.c   |  259
>
> tested this on ppc and its still good
> is there any reason to bother with a test on amd64?
> if there is I might be able to get to it tonight
>

forgot to mention that it would make life easier if you would put the
version of the patch
in the .bz2 files you attach since you poping out new takes so quick
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ