xfs
[Top] [All Lists]

Re: [PATCH 2/2] xfs: improve buffer cache hash scalability

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 2/2] xfs: improve buffer cache hash scalability
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Mon, 23 Aug 2010 06:36:47 -0400
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1282522546-7892-3-git-send-email-david@xxxxxxxxxxxxx>
References: <1282522546-7892-1-git-send-email-david@xxxxxxxxxxxxx> <1282522546-7892-3-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-08-17)
> @@ -1443,8 +1438,7 @@ xfs_alloc_bufhash(
>  {
>       unsigned int            i;
>  
> -     btp->bt_hashshift = external ? 3 : 8;   /* 8 or 256 buckets */
> -     btp->bt_hashmask = (1 << btp->bt_hashshift) - 1;
> +     btp->bt_hashshift = external ? 3 : 12;  /* 8 or 4096 buckets */

Not directly related to the patch, but we never have hashes buffers
on the log device.  And on the RT device we only use hashed buffers
twice to verify the device size.  With a little work on the latter
we can stop allocating the buf hash entirely for the RT and log
devices.

Anyway, the patch looks good for now, although we should try to get
rid of the hash long term.


Reviewed-by: Christoph Hellwig <hch@xxxxxx>

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