Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Apr 2014 21:39:43 +0000 (UTC)
From:      Navdeep Parhar <np@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r264565 - head/sys/kern
Message-ID:  <201404162139.s3GLdh5T051396@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: np
Date: Wed Apr 16 21:39:43 2014
New Revision: 264565
URL: http://svnweb.freebsd.org/changeset/base/264565

Log:
  Do not set M_BESTFIT if a strategy has already been provided.  This
  fixes problems when using M_FIRSTFIT.
  
  Reviewed by:	jeff@
  MFC after:	1 week

Modified:
  head/sys/kern/subr_vmem.c

Modified: head/sys/kern/subr_vmem.c
==============================================================================
--- head/sys/kern/subr_vmem.c	Wed Apr 16 21:30:17 2014	(r264564)
+++ head/sys/kern/subr_vmem.c	Wed Apr 16 21:39:43 2014	(r264565)
@@ -502,7 +502,8 @@ qc_import(void *arg, void **store, int c
 	int i;
 
 	qc = arg;
-	flags |= M_BESTFIT;
+	if ((flags & VMEM_FITMASK) == 0)
+		flags |= M_BESTFIT;
 	for (i = 0; i < cnt; i++) {
 		if (vmem_xalloc(qc->qc_vmem, qc->qc_size, 0, 0, 0,
 		    VMEM_ADDR_MIN, VMEM_ADDR_MAX, flags, &addr) != 0)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404162139.s3GLdh5T051396>