All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Richard Purdie" <richard.purdie@linuxfoundation.org>
To: zhangyifan46@huawei.com, poky@lists.yoctoproject.org
Subject: Re: [poky] about when poky check sstate_cache #yocto
Date: Wed, 27 May 2020 09:00:17 +0100	[thread overview]
Message-ID: <622f7d6b61d769259883ec89b815c2966ac6c5d0.camel@linuxfoundation.org> (raw)
In-Reply-To: <GPG8.1590560968516047795.1WrB@lists.yoctoproject.org>

On Tue, 2020-05-26 at 23:29 -0700, zhangyifan46@huawei.com wrote:
> I read the codes about sstate_cache. Let me briefly talk about how it
> work . I am not sure if it is right.
> Example,we have setscene tasks A_setsscene, B_setcene.
> and Task C ,D are not setscene task.
> After we bitbake something, runqueue started,and it check A , B to
> see if the sstate_caache exists and if exist, the poky does unpacking
> the cache and then ,ordinary build process starts and it will skip A
> and B.
> So checking the existence and validation of sstate_cache is before
> ordinary build process instead of right before execcuting A and B(for
> example, we have a dependency tree, A,depend on X ,checking is before
> X instead of between X and A)
> that's the result of my reading codes.

This is correct. Its because if A depends on B and A is present in the
cache, we can skip B entirely in some cases. This means the checking
has to happen at the start of the build.

>  And i did a small experienment that, in the middle of a clean
> bitbake project, i copied  all sstae_caches to the sstate_cache
> directory and it seemed the bitbake skips no task and unpacking did
> not happen.

Correct.

> Finally, i have a question. Can we move the checking and unpacking
> to, like the example above, right before executing A ,between X and
> A. it means a lot to me. Cause the sharing of sstate_cache may be
> helpful to a more efficent parallel make(instead of just parallel
> make gcc jobs)

You can share the sstate cache directory amongst multiple machines over
NFS. The dependency cannot be moved just before A though for the reason
I mention above.

Cheers,

Richard


      reply	other threads:[~2020-05-27  8:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-27  6:29 about when poky check sstate_cache #yocto zhangyifan46
2020-05-27  8:00 ` Richard Purdie [this message]

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=622f7d6b61d769259883ec89b815c2966ac6c5d0.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=poky@lists.yoctoproject.org \
    --cc=zhangyifan46@huawei.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.