Re: [patch] cpufreq: mark cpufreq_tsc() as core_initcall_sync

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

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux