mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Bret Towe" <magnade@gmail.com>
To: "Nitin Gupta" <nitingupta910@gmail.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
	linux-mm-cc@laptop.org,
	linuxcompressed-devel@lists.sourceforge.net,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Daniel Hazelton" <dhazelton@enter.net>,
	"Richard Purdie" <richard@openedhand.com>,
	"Satyam Sharma" <satyam.sharma@gmail.com>
Subject: Re: [RFC] LZO de/compression support - take 6
Date: Mon, 28 May 2007 15:58:11 -0700	[thread overview]
Message-ID: <dda83e780705281558p685004a6p69580f49f7020e2f@mail.gmail.com> (raw)
In-Reply-To: <dda83e780705281553s67ace88at60f6ab28b198a832@mail.gmail.com>

On 5/28/07, Bret Towe <magnade@gmail.com> wrote:
> On 5/28/07, Nitin Gupta <nitingupta910@gmail.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

  reply	other threads:[~2007-05-28 22:58 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-28 14:34 Nitin Gupta
2007-05-28 14:40 ` Nitin Gupta
2007-05-28 14:49   ` Daniel Hazelton
2007-05-28 15:06     ` Nitin Gupta
2007-05-28 15:43       ` Adrian Bunk
2007-05-28 16:03         ` Nitin Gupta
2007-05-28 17:11           ` Adrian Bunk
2007-05-28 19:59             ` Daniel Hazelton
2007-05-28 20:18             ` Daniel Hazelton
2007-05-28 20:52               ` Daniel Hazelton
2007-05-29  5:55             ` Nitin Gupta
2007-05-29  8:08             ` Michael-Luke Jones
2007-05-29 11:40               ` Adrian Bunk
2007-05-29 12:03                 ` Nitin Gupta
2007-05-29 13:13                   ` Daniel Hazelton
2007-05-29 21:10             ` Jan Engelhardt
2007-05-29 21:26               ` Adrian Bunk
2007-05-30  5:31                 ` Nitin Gupta
2007-05-30 13:56                   ` Johannes Stezenbach
2007-05-30 14:24                     ` Satyam Sharma
2007-05-28 15:30   ` Adrian Bunk
2007-05-28 15:47     ` Nitin Gupta
2007-05-28 15:55       ` Daniel Hazelton
2007-05-28 17:01         ` Adrian Bunk
2007-05-28 19:51           ` Daniel Hazelton
2007-05-28 15:49     ` Daniel Hazelton
2007-05-28 22:57   ` Bret Towe
2007-05-29  5:48     ` Nitin Gupta
2007-05-29 13:09       ` Daniel Hazelton
2007-05-28 22:53 ` Bret Towe
2007-05-28 22:58   ` Bret Towe [this message]
2007-05-29  5:58   ` Nitin Gupta
2007-05-29 20:14     ` Daniel Hazelton
2007-05-29 20:33       ` Daniel Hazelton
2007-05-29 21:48         ` Daniel Hazelton
2007-05-29 23:32     ` Daniel Hazelton
2007-05-30  5:19       ` Nitin Gupta
2007-05-29  8:17 ` Makefile question (was [RFC] LZO de/compression support - take 6) Michael-Luke Jones
2007-05-29 10:41   ` Satyam Sharma
2007-05-29 10:51     ` Michael-Luke Jones
2007-05-29 11:27       ` Satyam Sharma
2007-05-29 13:33         ` JFFS2 using 'private' zlib header " Michael-Luke Jones
2007-05-29 13:43           ` Daniel Hazelton
2007-05-29 15:15             ` Satyam Sharma
2007-05-29 16:20               ` Daniel Hazelton
2007-05-30  5:31               ` Mark Adler
2007-05-30 13:05                 ` Daniel Hazelton
2007-05-30 13:30                 ` Satyam Sharma
2007-05-30 23:02                   ` Mark Adler
2007-05-30 23:26                     ` Daniel Hazelton
2007-06-01  3:06                     ` Daniel Hazelton
2007-06-01 17:24                       ` Satyam Sharma
2007-05-30 13:41               ` Artem Bityutskiy
2007-05-30 15:46                 ` Artem Bityutskiy
2007-05-30 16:12                   ` Satyam Sharma
2007-05-30 16:43                     ` Artem Bityutskiy
2007-05-29 20:48 ` [RFC] LZO de/compression support - take 6 Jan Engelhardt
2007-05-30  5:54   ` Nitin Gupta
2007-05-30  8:31     ` Jan Engelhardt
2007-05-30 10:47       ` Nitin Gupta
2007-05-31 12:34 ` Nitin Gupta
2007-05-31 18:21   ` Satyam Sharma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dda83e780705281558p685004a6p69580f49f7020e2f@mail.gmail.com \
    --to=magnade@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=dhazelton@enter.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm-cc@laptop.org \
    --cc=linuxcompressed-devel@lists.sourceforge.net \
    --cc=nitingupta910@gmail.com \
    --cc=richard@openedhand.com \
    --cc=satyam.sharma@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®