Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Feb 2010 22:26:04 +0200
From:      Alex RAY <ray@ddteam.net>
To:        Ivan Voras <ivoras@freebsd.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: GEOM_ULZMA
Message-ID:  <20100219222604.44e50248.ray@ddteam.net>
In-Reply-To: <hlmb66$n0t$1@ger.gmane.org>
References:  <20100219163644.da89e882.ray__27111.9062825621$1266591431$gmane$org@dlink.ua> <hlmb66$n0t$1@ger.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 19 Feb 2010 16:36:40 +0100
Ivan Voras <ivoras@freebsd.org> wrote:

> On 02/19/10 15:36, Alexandr Rybalko wrote:
> > Hi,
> > I wrote a module GEOM_ULZMA (such as GEOM_UZIP, but compression with lzma), in connection with this is an issue best left lzma
> 
> One of the (relatively) unexpected problems with such block-level 
> compression is its efficienty - since you need to compress individual 
> blocks to be seekable (if you are not designing a special algorithm), 
> the compression ratios tend to not increase in a big way as the 
> algorithm improves. It would be interesting to see a comparison of sizes 
> with geom_uzip if you have them.

Simple answer:
-rwxr-xr-x  1 ray  wheel  16299520 Feb 19 20:59 fsimg.iso.64k.lzma
-rwxr-xr-x  1 ray  wheel  20882432 Feb 19 20:57 fsimg.iso.64k.uzip
-rw-r--r--  1 ray  wheel  65472512 Feb 19 20:56 fsimg.iso

How I have, not done, but worked rootfs for embedded router (D-Link DIR-320) 2.4MB of size.

> 
>  > code in the file "geom_ulzma.c" or store lzma library separately. If 
> separately, then where better?
> 
> The code organization depends on what you want to do with it and how you 
> want to update the code in the future, if your lzma library is third party.

LZMA made by Igor Pavlov, and since 4.62 it licensed under Public Domain.
So we can use it, if we need.  

> 
> If you never intend to update the lzma code then I guess it's fine to 
> embed it in a big .c file. For a port, it doesn't matter much since it 
> is your own thing. There are stricter rules on maintainability and style 
> if you want it in the base system.

So, I think right place for lzma library under sys/contrib directory, if I "promise" maintain it?

I also have plane, to use this code for making self-extracting lzma compressed kernel.

> 
> > Maybe in future make lzma and gzip library kernel interface for embedded?
> > Then in one instance of code, userland can use compression via kernel.
> 
> This never happens now (I mean userland calling into the kernel for 
> compression) so you will need to explain the benefits first (kernel code 
> is not magically faster than userland - it runs on the same CPU).

:) No, I don`t think about "magically faster", now I near to release FreeBSD firmware for D-Link DIR-320 router which have only 4MB of flash memory. Maybe in next time I try to make it for some router with only 2MB of flash. In that way, 
I need not copy of any code. 
In ideal embedded systems, if we have code, we must use it everywhere we need it. 


> 
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


-- 
Alex RAY <ray@ddteam.net>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100219222604.44e50248.ray>