lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090917213409.39b8509c@infradead.org>
Date:	Thu, 17 Sep 2009 21:34:09 +0200
From:	Arjan van de Ven <arjan@...radead.org>
To:	mingo@...hat.com, hpa@...or.com, paulus@...ba.org, acme@...hat.com,
	linux-kernel@...r.kernel.org, fweisbec@...il.com,
	a.p.zijlstra@...llo.nl, efault@....de, tglx@...utronix.de,
	mingo@...e.hu
Cc:	mingo@...e.hu, linux-tip-commits@...r.kernel.org,
	linux-kernel@...r.kernel.org, acme@...hat.com, paulus@...ba.org,
	hpa@...or.com, mingo@...hat.com, a.p.zijlstra@...llo.nl,
	efault@....de, fweisbec@...il.com, tglx@...utronix.de
Subject: Re: [tip:perfcounters/core] perf sched: Determine the number of
 CPUs automatically

On Thu, 17 Sep 2009 18:07:09 GMT
> 
> perf sched: Determine the number of CPUs automatically
> 
> For 'perf sched map' output, determine max_cpu automatically,
> instead of the static default of 15.
>  
>  static u32 curr_pid[MAX_CPUS] = { [0 ... MAX_CPUS-1] = -1 };
>  
> @@ -1818,6 +1818,9 @@ static struct trace_sched_handler map_ops  = {
>  
>  static void __cmd_map(void)
>  {
> +	max_cpu = system("exit `grep ^processor /proc/cpuinfo  | wc
> -l`");

YUCK.

what is wrong with
   max_cpu = sysconf(_SC_NPROCESSORS_CONF); 
??

-- 
Arjan van de Ven 	Intel Open Source Technology Centre
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ