]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r308782:
authoravg <avg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 30 Jun 2017 09:34:50 +0000 (09:34 +0000)
committeravg <avg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 30 Jun 2017 09:34:50 +0000 (09:34 +0000)
commitf4346638707d029978de01239c39c1fefe6cb507
tree21099f79f3cb0a47ab254b1bc52b300010ceaef5
parent1a47aa842a9cd5a029b4c7087f7099e1cda1d9b0
MFC r308782:
After some ZIL changes 6 years ago zil_slog_limit got partially broken
due to zl_itx_list_sz not updated when async itx'es upgraded to sync.
Actually because of other changes about that time zl_itx_list_sz is not
really required to implement the functionality, so this patch removes
some unneeded broken code and variables.

Original idea of zil_slog_limit was to reduce chance of SLOG abuse by
single heavy logger, that increased latency for other (more latency critical)
loggers, by pushing heavy log out into the main pool instead of SLOG. Beside
huge latency increase for heavy writers, this implementation caused double
write of all data, since the log records were explicitly prepared for SLOG.
Since we now have I/O scheduler, I've found it can be much more efficient
to reduce priority of heavy logger SLOG writes from ZIO_PRIORITY_SYNC_WRITE
to ZIO_PRIORITY_ASYNC_WRITE, while still leave them on SLOG.

Existing ZIL implementation had problem with space efficiency when it
has to write large chunks of data into log blocks of limited size. In some
cases efficiency stopped to almost as low as 50%. In case of ZIL stored on
spinning rust, that also reduced log write speed in half, since head had to
uselessly fly over allocated but not written areas. This change improves
the situation by offloading problematic operations from z*_log_write() to
zil_lwb_commit(), which knows real situation of log blocks allocation and
can split large requests into pieces much more efficiently. Also as side
effect it removes one of two data copy operations done by ZIL code WR_COPIED
case.

While there, untangle and unify code of z*_log_write() functions.
Also zfs_log_write() alike to zvol_log_write() can now handle writes crossing
block boundary, that may also improve efficiency if ZPL is made to do that.

git-svn-id: svn://svn.freebsd.org/base/stable/10@320496 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
cddl/contrib/opensolaris/cmd/ztest/ztest.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c