xfs
[Top] [All Lists]

TAKE 977546 - Use power-of-2 sized ktrace buffers to reduce overhead

To: sgi.bugs.xfs@xxxxxxxxxxxx
Subject: TAKE 977546 - Use power-of-2 sized ktrace buffers to reduce overhead
From: dgc@xxxxxxx (David Chinner)
Date: Fri, 22 Feb 2008 16:34:01 +1100 (EST)
Cc: xfs@xxxxxxxxxxx
Sender: xfs-bounce@xxxxxxxxxxx
Use power-of-2 sized buffers to reduce overhead

Now that the ktrace_enter() code is using atomics,
the non-power-of-2 buffer sizes - which require modulus
operations to get the index - are showing up as using
substantial CPU in the profiles.

Force the buffer sizes to be rounded up to the nearest
power of two and use masking rather than modulus operations
to convert the index counter to the buffer index. This
reduces ktrace_enter overhead to 8% of a CPU time, and
again almost halves the trace intensive test runtime.


Date:  Fri Feb 22 16:33:15 AEDT 2008
Workarea:  chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs
Inspected by:  lachlan@xxxxxxx, hch@xxxxxxxxxxxxx

The following file(s) were checked into:
  longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb


Modid:  xfs-linux-melb:xfs-kern:30538a
fs/xfs/support/ktrace.c - 1.30 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/support/ktrace.c.diff?r1=text&tr1=1.30&r2=text&tr2=1.29&f=h
        - Use power-of-2 buffer sizes so we can use more efficient
          masking operations to get the buffer index.

fs/xfs/support/ktrace.h - 1.17 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/support/ktrace.h.diff?r1=text&tr1=1.17&r2=text&tr2=1.16&f=h
        - Use power-of-2 buffer sizes so we can use more efficient
          masking operations to get the buffer index.



<Prev in Thread] Current Thread [Next in Thread>
  • TAKE 977546 - Use power-of-2 sized ktrace buffers to reduce overhead, David Chinner <=