zfs very poor performance compared to ufs due to lack of cache?
Kostik Belousov
kostikbel at gmail.com
Wed Sep 8 08:49:04 UTC 2010
On Wed, Sep 08, 2010 at 10:19:48AM +0300, Andriy Gapon wrote:
> on 07/09/2010 10:26 Andriy Gapon said the following:
> > Interesting. I briefly looked at the code in mappedread(), zfs_vnops.c, and I
> > have a VM question.
> > Shouldn't we mark the corresponding page bits as valid after reading data into
> > the page?
> > I specifically speak of the block that starts with the following line:
> > } else if (m != NULL && uio->uio_segflg == UIO_NOCOPY) {
> > I am taking mdstart_swap as an example and it does m->valid = VM_PAGE_BITS_ALL.
> >
>
> I've chatted with and conclusion seems to be that vm_page_set_validclean() call
> should be added at the end of the block.
>
> Perhaps, something like this:
>
> --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
> +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
> @@ -500,6 +500,7 @@ again:
> sched_unpin();
> }
> VM_OBJECT_LOCK(obj);
> + vm_page_set_validclean(m, off, bytes);
Only if error == 0, perhaps ?
> vm_page_wakeup(m);
> if (error == 0)
> uio->uio_resid -= bytes;
>
>
> BTW, I think that 'off' variable can be made of 'int' type, as it is an offset
> within a page; no need for int64.
>
> --
> Andriy Gapon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20100908/ebc0dc50/attachment.pgp
More information about the freebsd-fs
mailing list