xfs
[Top] [All Lists]

Re: [PATCH 10/16] xfs: add a lru to the XFS buffer cache

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 10/16] xfs: add a lru to the XFS buffer cache
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Mon, 8 Nov 2010 18:19:28 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1289206519-18377-11-git-send-email-david@xxxxxxxxxxxxx>
References: <1289206519-18377-1-git-send-email-david@xxxxxxxxxxxxx> <1289206519-18377-11-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
> @@ -471,6 +546,8 @@ _xfs_buf_find(
>               /* the buffer keeps the perag reference until it is freed */
>               new_bp->b_pag = pag;
>               spin_unlock(&pag->pag_buf_lock);
> +
> +             xfs_buf_lru_add(new_bp);

Why do we add the buffer to the lru when we find it?  Normally we
would remove it here (unless we want a lazy lru scheme), and potentially
increment b_lru_ref - although that seems to be done by the callers
in the next patch.

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