svn commit: r280136 - head/sys/vm

Gleb Smirnoff glebius at FreeBSD.org
Mon Mar 16 14:24:49 UTC 2015


Author: glebius
Date: Mon Mar 16 14:24:47 2015
New Revision: 280136
URL: https://svnweb.freebsd.org/changeset/base/280136

Log:
  Provide a comment explaining r279688.
  
  Suggested by:	alc

Modified:
  head/sys/vm/vnode_pager.c

Modified: head/sys/vm/vnode_pager.c
==============================================================================
--- head/sys/vm/vnode_pager.c	Mon Mar 16 14:12:41 2015	(r280135)
+++ head/sys/vm/vnode_pager.c	Mon Mar 16 14:24:47 2015	(r280136)
@@ -772,6 +772,14 @@ vnode_pager_generic_getpages(struct vnod
 	bsize = vp->v_mount->mnt_stat.f_iosize;
 	foff = IDX_TO_OFF(m[reqpage]->pindex);
 
+	/*
+	 * Synchronous and asynchronous paging operations use different
+	 * free pbuf counters.  This is done to avoid asynchronous requests
+	 * to consume all pbufs.
+	 * Allocate the pbuf at the very beginning of the function, so that
+	 * if we are low on certain kind of pbufs don't even proceed to BMAP,
+	 * but sleep.
+	 */
 	freecnt = iodone != NULL ?
 	    &vnode_async_pbuf_freecnt : &vnode_pbuf_freecnt;
 	bp = getpbuf(freecnt);


More information about the svn-src-head mailing list