svn commit: r245843 - projects/counters/sys/vm

Gleb Smirnoff glebius at FreeBSD.org
Wed Jan 23 14:14:13 UTC 2013


Author: glebius
Date: Wed Jan 23 14:14:13 2013
New Revision: 245843
URL: http://svnweb.freebsd.org/changeset/base/245843

Log:
  Followup on r243430. A couple more places where PAGE_SIZE is preferred
  over UMA_SLAB_SIZE.

Modified:
  projects/counters/sys/vm/uma_core.c

Modified: projects/counters/sys/vm/uma_core.c
==============================================================================
--- projects/counters/sys/vm/uma_core.c	Wed Jan 23 10:52:36 2013	(r245842)
+++ projects/counters/sys/vm/uma_core.c	Wed Jan 23 14:14:13 2013	(r245843)
@@ -1410,7 +1410,7 @@ keg_ctor(void *mem, int size, void *udat
 		if (totsize & UMA_ALIGN_PTR)
 			totsize = (totsize & ~UMA_ALIGN_PTR) +
 			    (UMA_ALIGN_PTR + 1);
-		keg->uk_pgoff = (UMA_SLAB_SIZE * keg->uk_ppera) - totsize;
+		keg->uk_pgoff = (PAGE_SIZE * keg->uk_ppera) - totsize;
 
 		if (keg->uk_flags & UMA_ZONE_REFCNT)
 			totsize = keg->uk_pgoff + sizeof(struct uma_slab_refcnt)
@@ -1426,7 +1426,7 @@ keg_ctor(void *mem, int size, void *udat
 		 * mathematically possible for all cases, so we make
 		 * sure here anyway.
 		 */
-		if (totsize > UMA_SLAB_SIZE * keg->uk_ppera) {
+		if (totsize > PAGE_SIZE * keg->uk_ppera) {
 			printf("zone %s ipers %d rsize %d size %d\n",
 			    zone->uz_name, keg->uk_ipers, keg->uk_rsize,
 			    keg->uk_size);


More information about the svn-src-projects mailing list