vfs_bio.c (3fb14f61e12f079b5917847a905391eabc5c9623) | vfs_bio.c (f71ef9b686914af52bee614dbd0c1b9c0d2bc6cb) |
---|---|
1/*- 2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3 * 4 * Copyright (c) 2004 Poul-Henning Kamp 5 * Copyright (c) 1994,1997 John S. Dyson 6 * Copyright (c) 2013 The FreeBSD Foundation 7 * All rights reserved. 8 * --- 1642 unchanged lines hidden (view full) --- 1651 * is less than BKVASIZE. In this case the actual wait/block will 1652 * come from buf_reycle() failing to flush one of these small bufs. 1653 */ 1654 bp = NULL; 1655 freebufs = atomic_fetchadd_int(&bd->bd_freebuffers, -1); 1656 if (freebufs > 0) 1657 bp = uma_zalloc(buf_zone, M_NOWAIT); 1658 if (bp == NULL) { | 1/*- 2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3 * 4 * Copyright (c) 2004 Poul-Henning Kamp 5 * Copyright (c) 1994,1997 John S. Dyson 6 * Copyright (c) 2013 The FreeBSD Foundation 7 * All rights reserved. 8 * --- 1642 unchanged lines hidden (view full) --- 1651 * is less than BKVASIZE. In this case the actual wait/block will 1652 * come from buf_reycle() failing to flush one of these small bufs. 1653 */ 1654 bp = NULL; 1655 freebufs = atomic_fetchadd_int(&bd->bd_freebuffers, -1); 1656 if (freebufs > 0) 1657 bp = uma_zalloc(buf_zone, M_NOWAIT); 1658 if (bp == NULL) { |
1659 atomic_fetchadd_int(&bd->bd_freebuffers, 1); | 1659 atomic_add_int(&bd->bd_freebuffers, 1); |
1660 bufspace_daemon_wakeup(bd); 1661 counter_u64_add(numbufallocfails, 1); 1662 return (NULL); 1663 } 1664 /* 1665 * Wake-up the bufspace daemon on transition below threshold. 1666 */ 1667 if (freebufs == bd->bd_lofreebuffers) --- 3843 unchanged lines hidden --- | 1660 bufspace_daemon_wakeup(bd); 1661 counter_u64_add(numbufallocfails, 1); 1662 return (NULL); 1663 } 1664 /* 1665 * Wake-up the bufspace daemon on transition below threshold. 1666 */ 1667 if (freebufs == bd->bd_lofreebuffers) --- 3843 unchanged lines hidden --- |