On Thu, 14 Feb 2008 14:18:33 +0530 Balbir Singh <balbir@xxxxxxxxxxxxxxxxxx> wrote: > > If I have to check under lock, please teach me. > > > > If there are several processes running in parallel in the same cgroup, the end > result might not be so nice, specially if the usage is close to the watermarks. > I suspect that we should be OK for now, but might be worth keeping in mind. > I'll add text somewhere. > > - counter->usage += val; > > + if (newval > counter->hwmark) { > > + counter->wmark_state = RES_WMARK_ABOVE_HIGH; > > + smp_wmb(); > > Do we need a barrier here? I suspect not, could you please document as to why a > barrier is needed? > just chainging value with smp_wmb() and read value after smp_rmb(). By this, I think we can expect we can read snapshot value of wmark_state at smp_rmb(). ......I misunderstand that spin_unlock() has no barrier(). ok, I'll remove smp_wmb() here. Thanks, -Kame _______________________________________________ Containers mailing list Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/containers