lkml.org 
[lkml]   [2016]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] percpu_stats: Simple per-cpu statistics count helper functions
Hello,

On Wed, Apr 06, 2016 at 05:51:45PM -0400, Waiman Long wrote:
> >>+ /*
> >>+ * If a statistics count is in the middle of being updated, it
> >>+ * is possible that the above clearing may not work. So we need
> >>+ * to double check again to make sure that the counters are really
> >>+ * cleared. Still there is a still a very small chance that the
> >>+ * second clearing does not work.
> >>+ */
> >>+ for_each_possible_cpu(cpu) {
> >>+ unsigned long *pstats = per_cpu_ptr(pcs->stats, cpu);
> >>+ int stat;
> >>+
> >>+ for (stat = 0; stat< pcs->nstats; stat++, pstats++)
> >>+ if (*pstats)
> >>+ *pstats = 0;
> >>+ }
> >I don't think this is acceptable.
>
> I am not sure what you mean here by not acceptable. Please enlighten me on
> that.

Hmmm... I thought that was pretty clear. Try-twice-and-we-are-probably-okay
is simply not acceptable. Please make it watertight.

Thanks.

--
tejun

\
 
 \ /
  Last update: 2016-04-07 01:01    [W:0.286 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site