svn commit: r356038 - head/sys/kern
Konstantin Belousov
kib at FreeBSD.org
Mon Dec 23 20:15:20 UTC 2019
Author: kib
Date: Mon Dec 23 20:15:19 2019
New Revision: 356038
URL: https://svnweb.freebsd.org/changeset/base/356038
Log:
Do not use waitable allocation of pbuf when creating cluster for write.
Previously just ensuring that we do not sleep when clustering for
md(4) vnode was enough. Now, with the switch of the pbuf allocator to
uma and completely broken per-subsystem pbuf limits, it might cause
unbounded sleep even for non-md(4) vnodes.
Reported and tested by: pho
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D22899
Modified:
head/sys/kern/vfs_cluster.c
Modified: head/sys/kern/vfs_cluster.c
==============================================================================
--- head/sys/kern/vfs_cluster.c Mon Dec 23 16:34:39 2019 (r356037)
+++ head/sys/kern/vfs_cluster.c Mon Dec 23 20:15:19 2019 (r356038)
@@ -865,8 +865,7 @@ cluster_wbuild(struct vnode *vp, long size, daddr_t st
(tbp->b_bcount != tbp->b_bufsize) ||
(tbp->b_bcount != size) ||
(len == 1) ||
- ((bp = uma_zalloc(cluster_pbuf_zone,
- (vp->v_vflag & VV_MD) != 0 ? M_NOWAIT : M_WAITOK)) == NULL)) {
+ ((bp = uma_zalloc(cluster_pbuf_zone, M_NOWAIT)) == NULL)) {
totalwritten += tbp->b_bufsize;
bawrite(tbp);
++start_lbn;
More information about the svn-src-all
mailing list