Skip to contentSkip to conversation

Packaged Staging Improvements]

Fwd: Richard Purdie 3 participants 4 messages Jun 11, 2009

lore
Share & tools
lore
#0 lore raw

Forwarding this as there is problem some interest here too...

When packaged staging was written there was a performance bottleneck introduced which I always wanted to fix at some point. I've just started the ball rolling with this commit in Poky:

http://git.pokylinux.org/cgit.cgi/poky/commit/?id=5a4c688958a7dc1258575c0f6c3bd1af165b2585

and related commits from about that time.

The idea is that instead of do_stage looking like:

1. Take staging lock
2. Take snapshot of staging files
3. Run real staging function
4. Take snapshot of staging files, see what changed
5. Save changed files for staging package
6. Release staging lock

It looks like:

1. Run real staging function to a DESTDIR
2. Take staging lock
3. Install files into staging from DESTDIR
4. Save files from DESTDIR for staging package
5. Release staging lock

which removes the need for the snapshot and reduces the time the lock is held. This speedup currently only works for packages which have a do_stage just calling autotools_stage_all so an aim would be to increase the number of packages we have using this function only.

I noticed one thing stopping this from happening in many cases which was "inherit pkgconfig" which changes do_stage. The do_stage_append from pkgconfig.bbclass shouldn't be needed for any sane package using uses autotools_stage_all. I also noticed that:

* pkgconfig.bbclass does an "inherit base" which is totally pointless as base is *always* inherited
* After the sysroot support addition to pkgconfig, the do_install mangling in pkgconfig.bbclass in OE shouldn't be needed. If it is, code should be patched. Poky doesn't have this but I'll mention to the OE people.

Patches improving the do_stage functions welcome and hopefully this will give a significant speedup to builds which people can enjoy.

Cheers,

Richard

Signature · 1 line
To unsubscribe send a mail to [email protected]
#1 lore raw
Quoted 1 line · On Thursday 11 June 2009 17:12:56 Richard Purdie wrote:

Forwarding this as there is problem some interest here too...

Sounds cool, will any of this also fix the deploy-area-out-of-tmpdir issue which makes packaged staging completely not working for the typical usecase of removing tmpdir and then expecting packages to be filled up from staging area on rebuild?

:M:

#2 lore raw
Quoted 7 lines · Michael 'Mickey' Lauer
Quoted 1 line · On Thursday 11 June 2009 17:12:56 Richard Purdie wrote:

Forwarding this as there is problem some interest here too...

Sounds cool, will any of this also fix the deploy-area-out-of-tmpdir issue which makes packaged staging completely not working for the typical usecase of removing tmpdir and then expecting packages to be filled up from staging area on rebuild?

You can use pstage for that use case without moving the entire deploy area out of tmp, with a minor tweak, at least thats what I do here. Change the PSTAGE_PKG assignment to ?= in packaged-staging.bbclass, then set PSTAGE_PKG=${TOPDIR}/prebuilt/${PSTAGE_PKGNAME} or so.

Signature · 5 lines
Chris Larson
Software Engineer
MontaVista Software, Inc.
Email: clarson AT mvista DOT com
Email: clarson AT kergoth DOT com
#3 lore raw
Quoted 13 lines · Christopher Larson
Quoted 10 lines · Michael 'Mickey' Lauer
Quoted 1 line · On Thursday 11 June 2009 17:12:56 Richard Purdie wrote:

Forwarding this as there is problem some interest here too...

Sounds cool, will any of this also fix the deploy-area-out-of-tmpdir issue
which makes packaged staging completely not working for the typical usecase of
removing tmpdir and then expecting packages to be filled up from staging area
on rebuild?

Quoted 4 lines

You can use pstage for that use case without moving the entire deploy area out of tmp, with a minor tweak, at least thats what I do here. Change the PSTAGE_PKG assignment to ?= in packaged-staging.bbclass, then set PSTAGE_PKG=${TOPDIR}/prebuilt/${PSTAGE_PKGNAME} or so.

Right, as Chris says, you just override the path. I'm surprised its not a ?= in there already...

I'm certainly happy to use a better default. Personally, I just remove directories except tmp/deploy/pstage or change DEPLOY_DIR itself outside TMPDIR...

Cheers,

Richard