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] [day] [month] [year] [list]
Date:	16 Oct 2006 15:42:43 +0200
From:	Andi Kleen <ak@...e.de>
To:	Arjan van de Ven <arjan@...ux.intel.com>
Cc:	mingo@...e.hu, akpm@...l.org, linux-kernel@...r.kernel.org
Subject: Re: [patch 1/2] round_jiffies infrastructure

Arjan van de Ven <arjan@...ux.intel.com> writes:
> +}
> +EXPORT_SYMBOL_GPL(__round_jiffies);

This means non GPL modules will disturb your timers again. probably not
a good strategy.

> +
> +unsigned long __round_jiffies_relative(unsigned long T, int CPU)
> +{
> +	int rem;
> +	int original = T;
> +	T=T+jiffies;
> +	rem = T % HZ;
> +	if (rem < HZ/4)
> +		T = T - rem;
> +	else
> +		T = T - rem + HZ;
> +	/* we don't want all cpus firing at once hitting the same lock/memory */
> +	T += CPU * 3;

Consider a dual core Yonah/Merom: it has shared caches and the two cores
can only go to sleep together. With this the wakeups will be always
twice. Not good. I guess you need to add some topology awareness here
and e.g. only spread it for sockets.

BTW we normally put spaces around operators inside expressions.

-Andi
-
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