Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Oct 2016 16:38:35 -0400
From:      Anton Yuzhaninov <citrin@citrin.ru>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        "freebsd-fs@freebsd.org" <freebsd-fs@freebsd.org>
Subject:   Re: UFS: unaligned read from GELI with 8k sectorsize
Message-ID:  <dd0369e6-e691-4a0d-57cd-9ed18a0550b7@citrin.ru>
In-Reply-To: <20161003174902.GR38409@kib.kiev.ua>
References:  <f84b069b-aeee-ff3c-d4f9-e2fe3caaddb1@citrin.ru> <20161001114536.GX38409@kib.kiev.ua> <20161001115439.GY38409@kib.kiev.ua> <68a8ed6d-e302-799c-3d2c-1d85c48d07bf@citrin.ru> <20161001211025.GD38409@kib.kiev.ua> <999638f9-3fee-82e3-d67f-cffef53b74e8@citrin.ru> <20161002191349.GH38409@kib.kiev.ua> <b4a71a1b-d3c0-68a5-6999-e6e851f796c2@citrin.ru> <20161003174902.GR38409@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2016-10-03 13:49, Konstantin Belousov wrote:
> I did several bug fixing and read passes over the patch, below is the
> current version, hopefully more robust. BTW, do you have INVARIANTS and
> perhaps WITNESS in your kernel config ?

I didn't have in previous tests, but I've added INVARIANTS and WITNESS 
for last one.
With INVARIANTS I see a LOR on reboot/shutdown:
https://imgur.com/a/dWPrm
but may be it unrelated to vnode pager.

I can confirm, that with this patch (applied to fresh stable/11) geli 
with 8k sector can be used as root filesystem.

I don't know thought will it have some performance benefits compare to 
geli with 4k when vnode pager is used.

Even for raw device I can't provide benchmark data, that it is useless 
to read from this SSD in blocks less than 8k.

Samsung for some reason doesn't publish full spec for the SSD (with NAND 
page size and erase block size). Info about 8k pages comes from random 
posts on internet forums.

In may case attempt to use 8k sector in geli is attempt to get optimal 
performance, but may be there are cases when >4k sectors are used in 
hardware. See e. g. this old thread:
https://lists.freebsd.org/pipermail/freebsd-fs/2010-November/010023.html

> +SYSCTL_INT(_vfs_ffs, OID_AUTO, use_buf_pager, CTLFLAG_RW, &use_buf_pager, 0,
> +    "always use buffer pager instead of bmap");

Small nit: most sysctl descriptions begin with a capital letter.

I prefer CTLFLAG_RWTUN because this settings affects boot process (I 
haven't tested use_buf_pager=1 yet).

> +	if (!use_buf_pager && um->um_devvp->v_bufobj.bo_bsize <= PAGE_SIZE)
> +		return (vnode_pager_generic_getpages(vp, mm, count,
> +		    ap->a_rbehind, ap->a_rahead, NULL, NULL));

Also I don't like one more if statement in performance critical path 
(one more place for branch misprediction in CPU), but probably it effect 
is negligible.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?dd0369e6-e691-4a0d-57cd-9ed18a0550b7>