lkml.org 
[lkml]   [2006]   [Nov]   [18]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSat, 18 Nov 2006 21:46:24 +0300
FromOleg Nesterov <>
SubjectRe: [patch] cpufreq: mark cpufreq_tsc() as core_initcall_sync
On 11/17, Paul E. McKenney wrote:
>
> Oleg, any thoughts about Jens's optimization?  He would code something
> like:
> 
> 	if (srcu_readers_active(&my_srcu))
> 		synchronize_srcu();
> 	else
> 		smp_mb();

Well, this is clearly racy, no? I am not sure, but may be we can do

	smp_mb();
	if (srcu_readers_active(&my_srcu))
		synchronize_srcu();
in this case we also need to add 'smp_mb()' into srcu_read_lock() after
'atomic_inc(&sp->hardluckref)'.

> However, he is doing ordered I/O requests rather than protecting data
> structures.

Probably this makes a difference, but I don't understand this.

Oleg.

-
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-11-18 19:49    [from the cache]
©2003-2008