Date: Tue, 9 Apr 2013 12:20:44 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249305 - head/sys/vm Message-ID: <201304091220.r39CKimD093179@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Tue Apr 9 12:20:44 2013 New Revision: 249305 URL: http://svnweb.freebsd.org/changeset/base/249305 Log: Fix KASSERTs: maximum number of items per slab is 256. Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Tue Apr 9 12:01:54 2013 (r249304) +++ head/sys/vm/uma_core.c Tue Apr 9 12:20:44 2013 (r249305) @@ -1171,7 +1171,7 @@ keg_small_init(uma_keg_t keg) } keg->uk_ipers = (keg->uk_slabsize - shsize) / rsize; - KASSERT(keg->uk_ipers > 0 && keg->uk_ipers <= 255, + KASSERT(keg->uk_ipers > 0 && keg->uk_ipers <= 256, ("%s: keg->uk_ipers %u", __func__, keg->uk_ipers)); memused = keg->uk_ipers * rsize + shsize; @@ -1191,7 +1191,7 @@ keg_small_init(uma_keg_t keg) if ((wastedspace >= keg->uk_slabsize / UMA_MAX_WASTE) && (keg->uk_ipers < (keg->uk_slabsize / keg->uk_rsize))) { keg->uk_ipers = keg->uk_slabsize / keg->uk_rsize; - KASSERT(keg->uk_ipers > 0 && keg->uk_ipers <= 255, + KASSERT(keg->uk_ipers > 0 && keg->uk_ipers <= 256, ("%s: keg->uk_ipers %u", __func__, keg->uk_ipers)); #ifdef UMA_DEBUG printf("UMA decided we need offpage slab headers for " @@ -1726,7 +1726,7 @@ uma_startup(void *bootmem, int boot_page objsize--; uma_max_ipers_ref = MAX(UMA_SLAB_SIZE / objsize, 64); - KASSERT((uma_max_ipers_ref <= 255) && (uma_max_ipers <= 255), + KASSERT((uma_max_ipers_ref <= 256) && (uma_max_ipers <= 256), ("uma_startup: calculated uma_max_ipers values too large!")); #ifdef UMA_DEBUG
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304091220.r39CKimD093179>