xfs
[Top] [All Lists]

Re: [PATCH 15/18] xfs; pack xfs_buf structure more tightly

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 15/18] xfs; pack xfs_buf structure more tightly
From: Alex Elder <aelder@xxxxxxx>
Date: Wed, 15 Sep 2010 13:01:14 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1284461777-1496-16-git-send-email-david@xxxxxxxxxxxxx>
References: <1284461777-1496-1-git-send-email-david@xxxxxxxxxxxxx> <1284461777-1496-16-git-send-email-david@xxxxxxxxxxxxx>
Reply-to: aelder@xxxxxxx
On Tue, 2010-09-14 at 20:56 +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> 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@xxxxxxx>

> Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
> ---
>  fs/xfs/linux-2.6/xfs_buf.h |   30 +++++++++++++++++++-----------
>  1 files changed, 19 insertions(+), 11 deletions(-)


<Prev in Thread] Current Thread [Next in Thread>