Date: Mon, 23 Dec 2019 20:15:19 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r356038 - head/sys/kern Message-ID: <201912232015.xBNKFJTR020142@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912232015.xBNKFJTR020142>