* xfs buffers
@ 2009-08-13 18:17 kanishk rastogi
2009-08-14 17:57 ` Russell Cattelan
0 siblings, 1 reply; 3+ messages in thread
From: kanishk rastogi @ 2009-08-13 18:17 UTC (permalink / raw)
To: xfs
[-- Attachment #1.1: Type: text/plain, Size: 1205 bytes --]
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......
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.... ??
I dont think that should be the case...
--
regards
kanishk
[-- Attachment #1.2: Type: text/html, Size: 1425 bytes --]
[-- Attachment #2: Type: text/plain, Size: 121 bytes --]
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: xfs buffers
2009-08-13 18:17 xfs buffers kanishk rastogi
@ 2009-08-14 17:57 ` Russell Cattelan
2009-08-18 2:39 ` kanishk rastogi
0 siblings, 1 reply; 3+ messages in thread
From: Russell Cattelan @ 2009-08-14 17:57 UTC (permalink / raw)
To: kanishk rastogi; +Cc: xfs-oss
-----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.
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.
>
> I dont think that should be the case...
>
> -- regards kanishk
>
> ----------------------------------------------------------------------
>
>
> _______________________________________________ xfs mailing list
> xfs@oss.sgi.com 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-----
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: xfs buffers
2009-08-14 17:57 ` Russell Cattelan
@ 2009-08-18 2:39 ` kanishk rastogi
0 siblings, 0 replies; 3+ messages in thread
From: kanishk rastogi @ 2009-08-18 2:39 UTC (permalink / raw)
To: Russell Cattelan; +Cc: xfs-oss
[-- Attachment #1.1: Type: text/plain, Size: 2224 bytes --]
inline...
On Fri, Aug 14, 2009 at 1:57 PM, Russell Cattelan <cattelan@thebarn.com>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@oss.sgi.com 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
[-- Attachment #1.2: Type: text/html, Size: 3472 bytes --]
[-- Attachment #2: Type: text/plain, Size: 121 bytes --]
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-08-18 2:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-13 18:17 xfs buffers kanishk rastogi
2009-08-14 17:57 ` Russell Cattelan
2009-08-18 2:39 ` kanishk rastogi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.