Changeset cacc6c5


Ignore:
Timestamp:
11/15/2023 05:24:22 PM (6 months ago)
Author:
Pierre Labastie <pierre.labastie@…>
Branches:
ablfs-more, trunk
Children:
640cd57
Parents:
63190e6
git-author:
Pierre Labastie <pierre.labastie@…> (11/15/2023 05:19:14 PM)
git-committer:
Pierre Labastie <pierre.labastie@…> (11/15/2023 05:24:22 PM)
Message:

Allow users to pass a cpuset

If using a new book, MAKEFLAGS is set to -j$(nproc), so that if
we want to easure timings with 4 processors and our computer has
more than that, we need to restrict the number of processors.
Jhalfs allows to do that using th cpuset cgroup controller, so that
it only restrits the make job and not the whole machine. For that
use a small scripts written by Xi Ruoyao that restarts make this
the cpuset set.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • LFS/master.sh

    r63190e6 rcacc6c5  
    303303  done
    304304
     305  # If CPUSET is defined and not equal to "all", then we define a first target
     306  # that calls a script which re-enters make calling target all
     307  if [ -n "$CPUSET" ] && [ "$CPUSET" != all ]; then
     308(
     309    cat << EOF
     310
     311all-with-cpuset:
     312        @CPUSPEC="\$(CPUSET)" ./run-in-cgroup \$(MAKE) all
     313EOF
     314) >> $MKFILE
     315  fi
    305316  # Drop in the main target 'all:' and the chapter targets with each sub-target
    306317  # as a dependency. Also prevent running targets in parallel.
  • common/libs/func_wrt_Makefile

    r63190e6 rcacc6c5  
    4545PKGMNGT          = $PKGMNGT
    4646WRAP_INSTALL     = $WRAP_INSTALL
     47CPUSET           = $CPUSET
    4748
    4849
  • jhalfs

    r63190e6 rcacc6c5  
    324324
    325325# Copy common helper files
    326   cp "$COMMON_DIR"/{makefile-functions,progress_bar.sh} "$JHALFSDIR/"
     326  cp "$COMMON_DIR"/{makefile-functions,progress_bar.sh,run-in-cgroup.sh} "$JHALFSDIR/"
    327327
    328328# Copy needed stylesheets
Note: See TracChangeset for help on using the changeset viewer.