xfs
[Top] [All Lists]

Re: xfs buffers

To: Russell Cattelan <cattelan@xxxxxxxxxxx>
Subject: Re: xfs buffers
From: kanishk rastogi <kanishk.85@xxxxxxxxx>
Date: Mon, 17 Aug 2009 22:39:36 -0400
Cc: xfs-oss <xfs@xxxxxxxxxxx>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=mNU2eBjb9arglIE+hiV7DKkzoJ+WZPVLQ35u1DyJwC4=; b=mJYbZPGOKFQkUSNHj5RYLsDVOgwbX2AZnW0Imt/xZMDDkvwcdxV/oXM/mkA9rF2sL9 9wKUJ2IuoFHzvlMBzgyAUhzXDoR0qFY8XcqqhUw3WBzANmzeeeIMmfM1K+v++fGYAnmw 9h+Xb0PqDQjPw1RwuqoGS/sBvLrqHJnIYmq5k=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=LWOVtXzXM49D1Qg3Gy+ttHUhaqGq4jFzISXdVVYMpOXSLRLMHyTriFCheiy6B/J84h leC4IntCcEIXGKln5Ld4nfbQFozdbsjHzO/g0T9Toravjyt+mdnSFh16wwC1om0zlHw9 cfctFmw9anGvKjXkhSq5KGOrq0Aiijdoj/+Fo=
In-reply-to: <4A85A582.5000701@xxxxxxxxxxx>
References: <9ee2fe770908131117o5b7ec317me4524d020bbe216b@xxxxxxxxxxxxxx> <4A85A582.5000701@xxxxxxxxxxx>
inline...

On Fri, Aug 14, 2009 at 1:57 PM, Russell Cattelan <cattelan@xxxxxxxxxxx> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

kanishk rastogi wrote:
> hi all, I was trying to understand the xfs_buf_t management in XFS.
>  I was looking at the xfs_bufhash_t which is used to keep the info
> of buffers which have ongoing transactions. I wanted to know if it
> uses it for caching these pages.
>
> As far as i can see in xfs_buf_relse  calls ::
>
> list_del_init(&bp->b_hash_list);
>
> if the count drops down to 0 for the buffer...
>
> if (atomic_dec_and_lock(&bp->b_hold, &hash->bh_lock)) { if
> (bp->b_relse) { ----->set only in case of error??
> atomic_inc(&bp->b_hold); spin_unlock(&hash->bh_lock);
> (*(bp->b_relse)) (bp); } else if (bp->b_flags & XBF_FS_MANAGED) {
> ----> mostly unset......\
Indeed. that flag is used on exactly one buffer, the superblock.ode of the
Basically the superblock is pinned in memory and only flushed by the
filesystem.
> spin_unlock(&hash->bh_lock); } else { ASSERT(!(bp->b_flags &
> (XBF_DELWRI|_XBF_DELWRI_Q))); *list_del_init(&bp->b_hash_list);*
> spin_unlock(&hash->bh_lock); xfs_buf_free(bp); } }
 

>
> ---------------
>
> CMIIW: So it doesnt keeps buffers if they are not in use....  ??
buffers are released back to the buf_t  zone when they are done.

zone allocation / free is very fast so managing lists of "free"
buffers doesn't make a lot of sense.

sorry my fault i was asking about the pages these buffers point to? ....
I see them being pickd from the device inode of the monted device...

thankx
kanishk

>
> I dont think that should be the case...
>
> -- regards kanishk
>
> ----------------------------------------------------------------------
>
>
> _______________________________________________ xfs mailing list
> xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFKhaWBNRmM+OaGhBgRAtqgAJ9CZfj0QXz8Yy7P4jYemgEPsvR9pQCfcSWM
a9OI8A4ckMdOuiXQ60o4PLE=
=OJAD
-----END PGP SIGNATURE-----




--
regards
kanishk
<Prev in Thread] Current Thread [Next in Thread>