Changeset 74601a7


Ignore:
Timestamp:
09/11/2023 05:22:13 PM (10 months ago)
Author:
Pierre Labastie <pierre.labastie@…>
Branches:
ablfs-more, trunk
Children:
1352172
Parents:
1b02a9a
Message:

Separate parallelization from optimization

Also, add cpu set choice and the possibility to use nproc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Config.in

    r1b02a9a r74601a7  
     1# Check for "nproc" presence:
     2config HAVE_NPROC
     3    def_bool $(shell,if nproc &>/dev/null; then echo y; else echo n; fi)
     4
     5# Check for "cpuset controller in cgroup v2" presence:
     6config HAVE_CGROUP
     7    def_bool $(shell,if grep -q cpuset /sys/fs/cgroup/cgroup.controllers 2>/dev/null; then echo y; else echo n; fi)
     8
    19menu "BOOK Settings"
    210
     
    812820    #--- Optimizations
    813821    config    CONFIG_OPTIMIZE
    814         bool    "Optimization and parallelization"
     822        bool    "Optimization"
    815823        default    n
    816824        help
     
    822830            #   If the system doesn't work as expected, please rebuild
    823831            #   without optimizations before asking for support.
    824     menu    "Parallelization and Optimization settings"
     832    menu    "Optimization settings"
    825833        depends on CONFIG_OPTIMIZE
    826 
    827     config    N_PARALLEL
    828         int "Number of parallel `make' jobs"
    829         default 1
    830         help
    831             #-- The usual recommandation is (number of CPU cores)+1
    832             #   Do not set for meaningful SBU calculations.
    833834
    834835    choice
     
    845846
    846847    endchoice
    847 
    848     config    REALSBU
    849         bool    "Build Binutls pass1 without optimization (Real SBU)"
    850         depends on OPT_2
    851         default    n
    852         help
    853            #-- Use -j1 in make invokation for Binutils pass1 to
    854            #   get a valid SBU value.
    855848
    856849    endmenu # Optimization settings
     
    862855
    863856    #--- End Optimizations
     857    #--- Parallelism
     858    menu "Parallelism settings"
     859    if HAVE_NPROC
     860        config ALL_CORES
     861        bool "Use all cores as in the book"
     862        default y
     863        help
     864              Use book instructions as written for parallelism. If you
     865              answer no, then jhalfs will fall back to a static number of
     866              cores, defined below. If you answer y, and your system
     867              supports it, you'll be asked for a cpu set to use.
     868
     869        if HAVE_CGROUP
     870            config CPUSET
     871            string "set of cpus to use, or 'all' for all cpus"
     872            default "all"
     873            help
     874                 See "List format" in cpuset(7). Choosing cpus depend
     875                 on the topology of your processors. Sometimes two
     876                 hyperthreads on the same core are numbered consecutively.
     877                 For example for using all cores and no hyperthreading on
     878                 a Haswell, use "0,2,4,6". Other brands may have a different
     879                 topology, and may require e.g. "0-3" to use the first 4 cores.
     880                 If not sure, keep the default.
     881        endif
     882        if !HAVE_CGROUP
     883            config CPUSET
     884            string
     885            default "all"
     886        endif
     887
     888    endif # HAVE_NPROC
     889    if !HAVE_NPROC
     890        config ALL_CORES
     891        bool
     892        default n
     893    endif
     894
     895    config    N_PARALLEL
     896        int "Number of parallel `make' jobs"
     897        depends on !ALL_CORES
     898        default 1
     899        help
     900            #-- The usual recommandation is (number of CPU cores)+1
     901            #   Do not set for meaningful SBU calculations.
     902
     903    config    REALSBU
     904        bool    "Build Binutls pass1 without parallelism (Real SBU)"
     905        depends on ALL_CORES != 1
     906        default    n
     907        help
     908           #-- Use -j1 in make invokation for Binutils pass1 to
     909           #   get a valid SBU value.
     910    endmenu # parallelism
     911
    864912
    865913    #-- Internal Settings
Note: See TracChangeset for help on using the changeset viewer.