Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern cosmetic



details:   https://anonhg.NetBSD.org/src/rev/c8bfd9d71f50
branches:  trunk
changeset: 997637:c8bfd9d71f50
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sun Mar 17 07:22:18 2019 +0000

description:
cosmetic

diffstat:

 sys/kern/subr_pool.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (38 lines):

diff -r 0c62a8a245a6 -r c8bfd9d71f50 sys/kern/subr_pool.c
--- a/sys/kern/subr_pool.c      Sun Mar 17 06:55:06 2019 +0000
+++ b/sys/kern/subr_pool.c      Sun Mar 17 07:22:18 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_pool.c,v 1.238 2019/03/17 06:55:06 maxv Exp $     */
+/*     $NetBSD: subr_pool.c,v 1.239 2019/03/17 07:22:18 maxv Exp $     */
 
 /*
  * Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008, 2010, 2014, 2015, 2018
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.238 2019/03/17 06:55:06 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.239 2019/03/17 07:22:18 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -686,9 +686,9 @@
            (pp->pr_size < MIN(palloc->pa_pagesz / 16, phsize << 3) ||
            trysize / pp->pr_size == (trysize - phsize) / pp->pr_size))) {
                /* Use the end of the page for the page header */
-               pp->pr_roflags |= PR_PHINPAGE;
                itemspace = palloc->pa_pagesz - phsize;
                pp->pr_phoffset = itemspace;
+               pp->pr_roflags |= PR_PHINPAGE;
        } else {
                /* The page header will be taken from our page header pool */
                itemspace = palloc->pa_pagesz;
@@ -729,7 +729,7 @@
         * for "cache coloring".
         */
        slack = itemspace - pp->pr_itemsperpage * pp->pr_size;
-       pp->pr_maxcolor = (slack / align) * align;
+       pp->pr_maxcolor = rounddown(slack, align);
        pp->pr_curcolor = 0;
 
        pp->pr_nget = 0;



Home | Main Index | Thread Index | Old Index