Re: [RFC] [-mm] Remove 'unsafe' LZO decompressor

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

 



Hi Markus,

On 5/25/07, Markus F.X.J. Oberhumer <[email protected]> wrote:
Please do _not_ rewrite the LZO implementation just for coding style principles.

The current miniLZO implementation is _extrememly_ well tested, pretty
optimized and quite portable.

I agree that the implementation may look confusing, but you should be able to
make it look much better by removing all the unused #defines and #ifdef code
paths - LZO supports exotic things like 16-bit DOS and CRAY PVP memory models
which obviously are not needed in the kernel and account for quite a number of
abstractions (which are implemented through the preprocessor).

Finally the current version has been tested with a lot of compilers and
contains accumulated knowledge about some hairy things - see
http://gcc.gnu.org/PR25196 for an example, as well as some not-yet identified
aliasing issue.

~Markus

I did not rewrite any part of your code except replacing COPY4() macro
and some open-coded byte-by-byte copying with memcpy(). But this has
resulted in very significant perf. loss (as suggested by results from
Richard's tests) - so will rollback these changes.

Additionally following was done to _greatly_ reduce no. of LOC I had
to retain. These should not affect code correctness and performance:
- Used standard/kernel defined data types equivalent of lzo_* types.
This resulted in removal of huge chunks of #ifdefs:
   lzo_byptep -> unsigned char *
   lzo_uint -> size_t
   lzo_xint -> size_t
   lzo_uintptr_t -> unsigned long
   lzo_uint32p -> uint32_t *
- Removed everything #ifdefed under COPY_DICT  -- from minilzo code I
see that this is not #defined for LZO1X (safe/unsafe) (though I could
not understand meaning behind COPY_DICT).
- Removed everthing #ifdef'ed for LZO1Y, LZO1Z, other variants.


Thanks,
Nitin
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux