All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] doc: Mention OE routine for setting BB_NUMBER_THREADS
@ 2021-03-17 10:34 Robert P. J. Day
  2021-03-17 15:25 ` [bitbake-devel] " Khem Raj
  0 siblings, 1 reply; 5+ messages in thread
From: Robert P. J. Day @ 2021-03-17 10:34 UTC (permalink / raw)
  To: BitBake developer list

Given the discussion of BB_NUMBER_THREADS, what it means and how to
set it, it seems only fair to mention that it's probably already set.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>

---

diff --git a/doc/bitbake-user-manual/bitbake-user-manual-execution.rst b/doc/bitbake-user-manual/bitbake-user-manual-execution.rst
index d74e768f..a2003997 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-execution.rst
+++ b/doc/bitbake-user-manual/bitbake-user-manual-execution.rst
@@ -45,6 +45,13 @@ the BitBake command and its options, see ":ref:`The BitBake Command
    A possibly simpler solution is that some Linux distributions (e.g.
    Debian and Ubuntu) provide the ``ncpus`` command.

+   If you're using a relatively recent version of Poky or Openembedded,
+   the provided ``bitbake.conf`` file already comes with a call to an OE
+   utility routine that does this calculation for you::
+
+     # Default to setting automatically based on cpu count
+     BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}"
+
 Parsing the Base Configuration Metadata
 =======================================


-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                         http://crashcourse.ca

LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [bitbake-devel] [PATCH] doc: Mention OE routine for setting BB_NUMBER_THREADS
  2021-03-17 10:34 [PATCH] doc: Mention OE routine for setting BB_NUMBER_THREADS Robert P. J. Day
@ 2021-03-17 15:25 ` Khem Raj
  2021-03-17 15:56   ` Robert P. J. Day
  0 siblings, 1 reply; 5+ messages in thread
From: Khem Raj @ 2021-03-17 15:25 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: BitBake developer list

On Wed, Mar 17, 2021 at 3:34 AM Robert P. J. Day <rpjday@crashcourse.ca> wrote:
>
> Given the discussion of BB_NUMBER_THREADS, what it means and how to
> set it, it seems only fair to mention that it's probably already set.
>
> Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
>
> ---
>
> diff --git a/doc/bitbake-user-manual/bitbake-user-manual-execution.rst b/doc/bitbake-user-manual/bitbake-user-manual-execution.rst
> index d74e768f..a2003997 100644
> --- a/doc/bitbake-user-manual/bitbake-user-manual-execution.rst
> +++ b/doc/bitbake-user-manual/bitbake-user-manual-execution.rst
> @@ -45,6 +45,13 @@ the BitBake command and its options, see ":ref:`The BitBake Command
>     A possibly simpler solution is that some Linux distributions (e.g.
>     Debian and Ubuntu) provide the ``ncpus`` command.
>
> +   If you're using a relatively recent version of Poky or Openembedded,

I think it would be better to avoid distro names in generic documentation

> +   the provided ``bitbake.conf`` file already comes with a call to an OE
> +   utility routine that does this calculation for you::
> +
> +     # Default to setting automatically based on cpu count
> +     BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}"
> +
>  Parsing the Base Configuration Metadata
>  =======================================
>
>
> --
>
> ========================================================================
> Robert P. J. Day                                 Ottawa, Ontario, CANADA
>                          http://crashcourse.ca
>
> LinkedIn:                               http://ca.linkedin.com/in/rpjday
> ========================================================================
>
> 
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [bitbake-devel] [PATCH] doc: Mention OE routine for setting BB_NUMBER_THREADS
  2021-03-17 15:25 ` [bitbake-devel] " Khem Raj
@ 2021-03-17 15:56   ` Robert P. J. Day
  2021-03-17 20:35     ` Khem Raj
  0 siblings, 1 reply; 5+ messages in thread
From: Robert P. J. Day @ 2021-03-17 15:56 UTC (permalink / raw)
  To: Khem Raj; +Cc: BitBake developer list

On Wed, 17 Mar 2021, Khem Raj wrote:

> On Wed, Mar 17, 2021 at 3:34 AM Robert P. J. Day <rpjday@crashcourse.ca> wrote:
> >
> > Given the discussion of BB_NUMBER_THREADS, what it means and how to
> > set it, it seems only fair to mention that it's probably already set.
> >
> > Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
> >
> > ---
> >
> > diff --git a/doc/bitbake-user-manual/bitbake-user-manual-execution.rst b/doc/bitbake-user-manual/bitbake-user-manual-execution.rst
> > index d74e768f..a2003997 100644
> > --- a/doc/bitbake-user-manual/bitbake-user-manual-execution.rst
> > +++ b/doc/bitbake-user-manual/bitbake-user-manual-execution.rst
> > @@ -45,6 +45,13 @@ the BitBake command and its options, see ":ref:`The BitBake Command
> >     A possibly simpler solution is that some Linux distributions (e.g.
> >     Debian and Ubuntu) provide the ``ncpus`` command.
> >
> > +   If you're using a relatively recent version of Poky or Openembedded,
>
> I think it would be better to avoid distro names in generic documentation

... snip ...

  normally, i'd agree, but given that 99.4237 per cent of bitbake
usage is in the context of OE or YP, if you're going to tell people
about BB_NUMBER_THREADS, it is not out of line to point out that they
almost certainly have that value calculated for them automatically
already.

rday

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [bitbake-devel] [PATCH] doc: Mention OE routine for setting BB_NUMBER_THREADS
  2021-03-17 15:56   ` Robert P. J. Day
@ 2021-03-17 20:35     ` Khem Raj
  2021-03-17 20:37       ` Robert P. J. Day
  0 siblings, 1 reply; 5+ messages in thread
From: Khem Raj @ 2021-03-17 20:35 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: BitBake developer list

On Wed, Mar 17, 2021 at 8:56 AM Robert P. J. Day <rpjday@crashcourse.ca> wrote:
>
> On Wed, 17 Mar 2021, Khem Raj wrote:
>
> > On Wed, Mar 17, 2021 at 3:34 AM Robert P. J. Day <rpjday@crashcourse.ca> wrote:
> > >
> > > Given the discussion of BB_NUMBER_THREADS, what it means and how to
> > > set it, it seems only fair to mention that it's probably already set.
> > >
> > > Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
> > >
> > > ---
> > >
> > > diff --git a/doc/bitbake-user-manual/bitbake-user-manual-execution.rst b/doc/bitbake-user-manual/bitbake-user-manual-execution.rst
> > > index d74e768f..a2003997 100644
> > > --- a/doc/bitbake-user-manual/bitbake-user-manual-execution.rst
> > > +++ b/doc/bitbake-user-manual/bitbake-user-manual-execution.rst
> > > @@ -45,6 +45,13 @@ the BitBake command and its options, see ":ref:`The BitBake Command
> > >     A possibly simpler solution is that some Linux distributions (e.g.
> > >     Debian and Ubuntu) provide the ``ncpus`` command.
> > >
> > > +   If you're using a relatively recent version of Poky or Openembedded,
> >
> > I think it would be better to avoid distro names in generic documentation
>
> ... snip ...
>
>   normally, i'd agree, but given that 99.4237 per cent of bitbake
> usage is in the context of OE or YP, if you're going to tell people
> about BB_NUMBER_THREADS, it is not out of line to point out that they
> almost certainly have that value calculated for them automatically
> already.

OpenEmbedded is perhaps more appropriate here, since its the build
system and would tend to cover all
OE based distributions including poky

>
> rday

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [bitbake-devel] [PATCH] doc: Mention OE routine for setting BB_NUMBER_THREADS
  2021-03-17 20:35     ` Khem Raj
@ 2021-03-17 20:37       ` Robert P. J. Day
  0 siblings, 0 replies; 5+ messages in thread
From: Robert P. J. Day @ 2021-03-17 20:37 UTC (permalink / raw)
  To: Khem Raj; +Cc: BitBake developer list

On Wed, 17 Mar 2021, Khem Raj wrote:

> On Wed, Mar 17, 2021 at 8:56 AM Robert P. J. Day <rpjday@crashcourse.ca> wrote:
> >
> > On Wed, 17 Mar 2021, Khem Raj wrote:
> >
> > > On Wed, Mar 17, 2021 at 3:34 AM Robert P. J. Day <rpjday@crashcourse.ca> wrote:
> > > >
> > > > Given the discussion of BB_NUMBER_THREADS, what it means and how to
> > > > set it, it seems only fair to mention that it's probably already set.
> > > >
> > > > Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
> > > >
> > > > ---
> > > >
> > > > diff --git a/doc/bitbake-user-manual/bitbake-user-manual-execution.rst b/doc/bitbake-user-manual/bitbake-user-manual-execution.rst
> > > > index d74e768f..a2003997 100644
> > > > --- a/doc/bitbake-user-manual/bitbake-user-manual-execution.rst
> > > > +++ b/doc/bitbake-user-manual/bitbake-user-manual-execution.rst
> > > > @@ -45,6 +45,13 @@ the BitBake command and its options, see ":ref:`The BitBake Command
> > > >     A possibly simpler solution is that some Linux distributions (e.g.
> > > >     Debian and Ubuntu) provide the ``ncpus`` command.
> > > >
> > > > +   If you're using a relatively recent version of Poky or Openembedded,
> > >
> > > I think it would be better to avoid distro names in generic documentation
> >
> > ... snip ...
> >
> >   normally, i'd agree, but given that 99.4237 per cent of bitbake
> > usage is in the context of OE or YP, if you're going to tell people
> > about BB_NUMBER_THREADS, it is not out of line to point out that they
> > almost certainly have that value calculated for them automatically
> > already.
>
> OpenEmbedded is perhaps more appropriate here, since its the build
> system and would tend to cover all
> OE based distributions including poky

  i'm good with that, will re-submit.

rday

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-03-17 20:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-17 10:34 [PATCH] doc: Mention OE routine for setting BB_NUMBER_THREADS Robert P. J. Day
2021-03-17 15:25 ` [bitbake-devel] " Khem Raj
2021-03-17 15:56   ` Robert P. J. Day
2021-03-17 20:35     ` Khem Raj
2021-03-17 20:37       ` Robert P. J. Day

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.