All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre McCurdy <armccurdy@gmail.com>
To: Khem Raj <raj.khem@gmail.com>
Cc: OE Core mailing list <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] pxz: Add recipe and use it for xz image type
Date: Fri, 25 Sep 2015 11:24:12 -0700	[thread overview]
Message-ID: <CAJ86T=Uvexcw7kOt6i8L4NwL8jJe9-VBStw2DOT9v9Hw-sd_Rg@mail.gmail.com> (raw)
In-Reply-To: <1443157157-33969-3-git-send-email-raj.khem@gmail.com>

On Thu, Sep 24, 2015 at 9:59 PM, Khem Raj <raj.khem@gmail.com> wrote:
> pxz results in significant time saving when generating xz filetypes for
> images due to parallelization support

It looks like the version of xz utils already packaged in oe-core
supports multiple threads via the -T option. See XZ_THREADS in
image_types.bbclass.

> a simple test on ubuntu build host with 16 CPUs
>
> time xz -M 50% -f -k -c -e -9 --check=crc32 CX041AEI_PROD_default_20150610000105sdy-dbg.rootfs.cpio >CX041AEI_PROD_default_20150610000105sdy-dbg.rootfs.cpio.xz
>
> real
> 23m42.299s
> user 23m36.947s
> sys 0m5.101s
>
> time pxz -M 50% -f -k -c -e -9 --check=crc32 CX041AEI_PROD_default_20150610000105sdy-dbg.rootfs.cpio >CX041AEI_PROD_default_20150610000105sdy-dbg.rootfs.cpio.xz
>
> real2m59.666s
> user 24m38.529s
> sys 0m10.056s
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com
> ---
>  meta/classes/image_types.bbclass     |  4 ++--
>  meta/recipes-extended/pxz/pxz_git.bb | 31 +++++++++++++++++++++++++++++++
>  2 files changed, 33 insertions(+), 2 deletions(-)
>  create mode 100644 meta/recipes-extended/pxz/pxz_git.bb
>
> diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
> index 306403e..d766cd2 100644
> --- a/meta/classes/image_types.bbclass
> +++ b/meta/classes/image_types.bbclass
> @@ -233,13 +233,13 @@ COMPRESSIONTYPES = "gz bz2 lzma xz lz4 sum"
>  COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}"
>  COMPRESS_CMD_gz = "gzip -f -9 -c ${IMAGE_NAME}.rootfs.${type} > ${IMAGE_NAME}.rootfs.${type}.gz"
>  COMPRESS_CMD_bz2 = "pbzip2 -f -k ${IMAGE_NAME}.rootfs.${type}"
> -COMPRESS_CMD_xz = "xz -f -k -c ${XZ_COMPRESSION_LEVEL} ${XZ_THREADS} --check=${XZ_INTEGRITY_CHECK} ${IMAGE_NAME}.rootfs.${type} > ${IMAGE_NAME}.rootfs.${type}.xz"
> +COMPRESS_CMD_xz = "pxz -f -k -c ${XZ_COMPRESSION_LEVEL} ${XZ_THREADS} --check=${XZ_INTEGRITY_CHECK} ${IMAGE_NAME}.rootfs.${type} > ${IMAGE_NAME}.rootfs.${type}.xz"
>  COMPRESS_CMD_lz4 = "lz4c -9 -c ${IMAGE_NAME}.rootfs.${type} > ${IMAGE_NAME}.rootfs.${type}.lz4"
>  COMPRESS_CMD_sum = "sumtool -i ${IMAGE_NAME}.rootfs.${type} -o ${IMAGE_NAME}.rootfs.${type}.sum ${JFFS2_SUM_EXTRA_ARGS}"
>  COMPRESS_DEPENDS_lzma = "xz-native"
>  COMPRESS_DEPENDS_gz = ""
>  COMPRESS_DEPENDS_bz2 = "pbzip2-native"
> -COMPRESS_DEPENDS_xz = "xz-native"
> +COMPRESS_DEPENDS_xz = "pxz-native"
>  COMPRESS_DEPENDS_lz4 = "lz4-native"
>  COMPRESS_DEPENDS_sum = "mtd-utils-native"
>
> diff --git a/meta/recipes-extended/pxz/pxz_git.bb b/meta/recipes-extended/pxz/pxz_git.bb
> new file mode 100644
> index 0000000..fe21be6
> --- /dev/null
> +++ b/meta/recipes-extended/pxz/pxz_git.bb
> @@ -0,0 +1,31 @@
> +# Copyright (C) 2015 Khem Raj <raj.khem@gmail.com>
> +# Released under the MIT license (see COPYING.MIT for the terms)
> +
> +SUMMARY = "Parallel LZMA compressor compatible with XZ"
> +DESCRIPTION = "Parallel XZ is a compression utility that takes advantage of running LZMA compression of different parts of an input file on multiple cores and processors simultaneously. Its primary goal is to utilize all resources to speed up compression time with minimal possible influence on compression ratio"
> +HOMEPAGE = "https://jnovy.fedorapeople.org/pxz/"
> +LICENSE = "GPL-2.0+"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
> +SECTION = "console/utils"
> +DEPENDS = "xz"
> +
> +SRCREV = "ae808463c2950edfdedb8fb49f95006db0a18667"
> +PV = "4.999.9beta+git${SRCPV}"
> +SRC_URI = "git://github.com/jnovy/pxz.git"
> +
> +S = "${WORKDIR}/git"
> +
> +CFLAGS_append = " -fopenmp -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
> +LDFLAGS_append = " -llzma"
> +
> +do_compile ()  {
> +       oe_runmake
> +}
> +
> +do_install ()  {
> +       oe_runmake DESTDIR=${D} INSTALL="install -p"
> +}
> +
> +deltask do_configure
> +
> +BBCLASSEXTEND = "native"
> --
> 2.5.3
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


  parent reply	other threads:[~2015-09-25 18:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-25  4:59 [PATCH V2] busybox: Use CC instead of bare LD to be the Linker Khem Raj
2015-09-25  4:59 ` [PATCH 1/4] powertop: Include right headers for timval struct Khem Raj
2015-09-25  9:28   ` Burton, Ross
2015-09-25  4:59 ` [PATCH] pxz: Add recipe and use it for xz image type Khem Raj
2015-09-25  5:01   ` Khem Raj
2015-09-25 11:22   ` Gary Thomas
2015-09-25 13:25     ` Khem Raj
2015-09-25 13:32       ` Gary Thomas
2015-09-25 18:24   ` Andre McCurdy [this message]
2015-09-25 18:34     ` Khem Raj
2015-09-25 20:18       ` Andre McCurdy
2015-09-25  4:59 ` [PATCH 2/4] dhcp: Include sys/types.h for u_int* defs Khem Raj
2015-09-25  4:59 ` [PATCH 3/4] blktrace: Include <sys/types.h for dev_t Khem Raj
2015-09-25  9:29   ` Burton, Ross
2015-09-25  4:59 ` [PATCH 4/4] waffle: Fix build with musl Khem Raj
2015-09-25  5:06 ` [PATCH V2] busybox: Use CC instead of bare LD to be the Linker Khem Raj
2015-09-25  9:33   ` Burton, Ross

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='CAJ86T=Uvexcw7kOt6i8L4NwL8jJe9-VBStw2DOT9v9Hw-sd_Rg@mail.gmail.com' \
    --to=armccurdy@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=raj.khem@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.