[PATCH 15/18] xfs; pack xfs_buf structure more tightly
Alex Elder
aelder at sgi.com
Wed Sep 15 13:01:14 CDT 2010
On Tue, 2010-09-14 at 20:56 +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner at redhat.com>
>
> pahole reports the struct xfs_buf has quite a few holes in it, so
> packing the structure better will reduce the size of it by 16 bytes.
> Also, move all the fields used in cache lookups into the first
> cacheline.
>
> Before on x86_64:
>
> /* size: 320, cachelines: 5 */
> /* sum members: 298, holes: 6, sum holes: 22 */
>
> After on x86_64:
>
> /* size: 304, cachelines: 5 */
> /* padding: 6 */
> /* last cacheline: 48 bytes */
Looks good.
Reviewed-by: Alex Elder <aelder at sgi.com>
> Signed-off-by: Dave Chinner <dchinner at redhat.com>
> ---
> fs/xfs/linux-2.6/xfs_buf.h | 30 +++++++++++++++++++-----------
> 1 files changed, 19 insertions(+), 11 deletions(-)
More information about the xfs
mailing list