Re: [PATCH] rt-numa: optionally ignore runtime cpumask

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 21, 2022 at 07:16:48PM +0100, Sebastian Andrzej Siewior wrote:
> On 2022-01-21 11:16:59 [-0300], Marcelo Tosatti wrote:
> > 
> > use_current_cpuset() function does:
> > 
> > /*
> >  * After this function is called, affinity_mask is the intersection of
> >  * the user supplied affinity mask and the affinity mask from the run
> >  * time environment
> >  */
> > static void use_current_cpuset(int max_cpus, struct bitmask *cpumask)
> > 
> > However, when using isolcpus kernel command line option, the CPUs 
> > specificied at isolcpus= are not part of the run time environment
> > cpumask.
> > 
> > This causes "cyclictest -a isolatedcpus" to fail with:
> > 
> > WARN: Couldn't setaffinity in main thread: Invalid argument
> > FATAL: No allowable cpus to run on
> > # /dev/cpu_dma_latency set to 0us
> > 
> > To fix this, add an environment variable IGNORE_RUNTIME_CPU_AFFINITY_MASK
> > that when set to a value other than 0, will override the runtime cpu
> > affinity mask (retrieved with numa_sched_getaffinity) with a bit set
> > for each CPU in numa_num_configured_cpus:
> 
> This looks hacky and not documented. What about using all CPUs which
> part of current affinity mask by default. 

You mean "using all CPUs which are part of the current affinity mask by
default" ? (where current affinity mask would mean user specified CPU
mask).

> And then either specify the
> requested CPU mask or use explicitly all CPUs.

Do you mean to drop 

        /*
         * Clear bits that are not set in both the cpuset from the
         * environment, and in the user specified affinity.

And just attempt to use the user specified mask? (which will then return
failure to the user in which case he can correct it).





[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux