On Thu, Apr 02, 2015 at 04:23:18PM +0200, Mateusz Guzik wrote:
M> Well, a thread migrating to another cpu is the standard thing everyone
M> sees.

How often do you see it right in a particular window of 2 or
3 instructions?

If you carefully read the thread I referred to, you would notice that
on many arches, save amd64 and i386, all systems stats are prone
to mangling the stats due to migration within PCPU_INC. Look here:

grep '^#define  PCPU_ADD' sys/*/include/pcpu.h

Do we have reports on not precise enough statistics, yet?

M> I don't feel that strongly about changing the code. If it stays as it
M> is, it definitely needs the comment I mentioned explaining why migration
M> is fine.

I just added the comment.

M> If the code was to be changed a machdep counter_u64_fetchadd seems like
M> the only course of action.

If we have more places in kernel, where such API is required, I would do
it. Alas, seems like not possible to make it without critical section,
even on amd64. Note that counter_u64_add() on amd64 is critical-less.

-- 
Totus tuus, Glebius.
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to