Re: [PATCH] Optimize struct task_delay_info

From: Zhang, Yanmin
Date: Thu Jul 12 2007 - 04:38:19 EST


On Wed, 2007-07-11 at 14:27 +0200, Andi Kleen wrote:
> "Zhang, Yanmin" <yanmin_zhang@xxxxxxxxxxxxxxx> writes:
> > replace them;
> > 2) Delete lock. The change to the protected data has no nested cases.
> > In addition, the result is for performance data collection, so itâs
> > unnecessary to add such lock.
>
> Not sure that's a good idea. People expect their performance counts
> to be accurate too. You could possibly use atomics though, but
> when there are multiple counters updated the spinlock will be likely
> faster.
Accurancy here has 2 meanings.
1) From data update point of view. The data is correct because only the
process itself updates them and there is no nested update.
2) If the reader could get the correct data when the process updates the data. It
might be an issue. But the issue is not important. Mostly, the application tool
reads the data in an interval.

Yanmin
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/