lkml.org 
[lkml]   [2005]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Semantics of smp_mb() [was : Re: [PATCH] Fix RCU race in access of nohz_cpu_mask ]
Srivatsa Vaddagiri wrote:
>
> Oleg, with all these inputs, I consider the patch I had sent to be correct.

Yes, I think so. My suspects were due to my misunderstanding.
I was wrong when I said that we can ignore rmb() part of mb()
in case when start_hz_timer() runs after rcu_start_batch().

rcp->cur++;
// ->cur will be visible to other cpus
// _before_ we will *READ* nohz_cpu_mask.
// we don't have any 'timing' problems.
// In other words: if another cpu does not
// see the new value - we did not read this
// mask yet.
smp_mb();
Thanks for your patience.

> P.S :- Thanks to everybody who reponded clarifying this subject.

Yes! it was really helpful, thanks to all. I think it would be great
to have Paul's very clear (and short!) explanation somewhere in
Documentation/.

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: 2005-12-12 19:20    [from the cache]
©2003-2011 Jasper Spaans