lkml.org 
[lkml]   [2006]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: statistics infrastructure (in -mm tree) review
From
Date
Greg KH <greg@kroah.com> writes:
> > + * exploiters don't update several statistics of the same entity in one go.
> > + */
> > +static inline void statistic_add(struct statistic *stat, int i,
> > + s64 value, u64 incr)
> > +{
> > + unsigned long flags;
> > + local_irq_save(flags);
> > + if (stat[i].state == STATISTIC_STATE_ON)
> > + stat[i].add(&stat[i], smp_processor_id(), value, incr);


Indirect call in statistics hotpath? You know how slow this is
on IA64 and even on other architectures it tends to disrupt
the pipeline.

Also on i386 the u64s generate quite bad code.

That looks like a really bad implementation that shouldn't be used
anywhere.

-Andi
-
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-06-14 07:07    [W:0.222 / U:9.024 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site