lkml.org 
[lkml]   [2006]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch 1/2] round_jiffies infrastructure
From
Date
Arjan van de Ven <arjan@linux.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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-10-16 15:45    [W:0.191 / U:2.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site