xfs
[Top] [All Lists]

Re: [PATCH 3/5] xfs: use per-filesystem radix trees for dquot lookup

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 3/5] xfs: use per-filesystem radix trees for dquot lookup
From: Ben Myers <bpm@xxxxxxx>
Date: Tue, 13 Mar 2012 12:06:02 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20120313085308.824843587@xxxxxxxxxxxxxxxxxxxxxx>
References: <20120313085232.134690907@xxxxxxxxxxxxxxxxxxxxxx> <20120313085308.824843587@xxxxxxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
On Tue, Mar 13, 2012 at 04:52:35AM -0400, Christoph Hellwig wrote:
> Replace the global hash tables for looking up in-memory dquot structures
> with per-filesystem radix trees to allow scaling to a large number of
> in-memory dquot structures.
> 
> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

...

> @@ -780,51 +712,27 @@ restart:
>               }
>       }
>  
> -     /*
> -      * Hashlock comes after ilock in lock order
> -      */
> -     mutex_lock(&h->qh_lock);
> -     if (version != h->qh_version) {
> -             xfs_dquot_t *tmpdqp;
> +     mutex_lock(&qi->qi_tree_lock);
> +     error = -radix_tree_insert(tree, id, dqp);
> +     if (unlikely(error)) {
> +             WARN_ON(error != EEXIST);

Yeah, radix_tree_insert can return ENOMEM.

Looks good.

Reviewed-by: Ben Myers <bpm@xxxxxxx>

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