Re: [PATCH] cyclictest: remove compatibilty hack for old libnuma, repairs "-a" for isolcpus

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

 




On Wed, 20 May 2015, Henning Schild wrote:

> Recent versions of libnuma >=2.0.9 all have numa_parse_cpustring_all(). Not
> using this function will make the parser fail if isolcpus are used.
> 
> Signed-off-by: Henning Schild <henning.schild@xxxxxxxxxxx>
> ---
>  src/cyclictest/rt_numa.h | 10 ----------
>  1 file changed, 10 deletions(-)
> 
> diff --git a/src/cyclictest/rt_numa.h b/src/cyclictest/rt_numa.h
> index 06c9420..64516f5 100644
> --- a/src/cyclictest/rt_numa.h
> +++ b/src/cyclictest/rt_numa.h
> @@ -92,17 +92,7 @@ static inline unsigned int rt_numa_bitmask_isbitset( const struct bitmask *mask,
>  static inline struct bitmask* rt_numa_parse_cpustring(const char* s,
>  	int max_cpus)
>  {
> -#ifdef HAVE_PARSE_CPUSTRING_ALL		/* Currently not defined anywhere.  No
> -					   autotools build. */
>  	return numa_parse_cpustring_all(s);
> -#else
> -	/* We really need numa_parse_cpustring_all(), so we can assign threads
> -	 * to cores which are part of an isolcpus set, but early 2.x versions of
> -	 * libnuma do not have this function.  A work around should be to run
> -	 * your command with e.g. taskset -c 9-15 <command>
> -	 */
> -	return numa_parse_cpustring((char *)s);
> -#endif
>  }
>  
>  static inline void rt_bitmask_free(struct bitmask *mask)
> -- 
> 2.3.6
> 

This is a terrible hack, but I'm afraid to remove it yet.
Even systems as recent as Fedora 19 have a libnuma less than that.
pm -qf /usr/lib64/libnuma.so
numactl-devel-2.0.8-4.fc19.x86_64
[jkacur@riemann rt-tests]$ cat /etc/fedora-release 
Fedora release 19 (Schrödinger’s Cat)

This is causing problems for people who want to pin threads to 
CPUs isolated with isolcpus=, so we do need to do something about.

I could perhaps accept an improved hack that tests whether the hack itself 
is needed, until we have a better solution.

Thanks

John

[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