On Wed, Oct 29, 2014 at 07:25, David Gwynne wrote:
> i dunno. im fine with either removing colouring altogether or setting it > from something else completely. i just want a decision to be made cos > right now ph_color isnt set, which is a bug. there. i fixed it. Index: kern/subr_pool.c =================================================================== RCS file: /cvs/src/sys/kern/subr_pool.c,v retrieving revision 1.163 diff -u -p -r1.163 subr_pool.c --- kern/subr_pool.c 13 Oct 2014 00:12:51 -0000 1.163 +++ kern/subr_pool.c 29 Oct 2014 21:49:38 -0000 @@ -82,7 +82,6 @@ struct pool_item_header { ph_node; /* Off-page page headers */ int ph_nmissing; /* # of chunks in use */ caddr_t ph_page; /* this page's address */ - caddr_t ph_colored; /* page's colored address */ u_long ph_magic; }; #define POOL_MAGICBIT (1 << 3) /* keep away from perturbed low bits */ @@ -217,7 +216,7 @@ void pool_init(struct pool *pp, size_t size, u_int align, u_int ioff, int flags, const char *wchan, struct pool_allocator *palloc) { - int off = 0, space; + int off = 0; unsigned int pgsize = PAGE_SIZE, items; #ifdef DIAGNOSTIC struct pool *iter; @@ -293,15 +292,6 @@ pool_init(struct pool *pp, size_t size, pp->pr_hardlimit_warning_last.tv_usec = 0; RB_INIT(&pp->pr_phtree); - /* - * Use the space between the chunks and the page header - * for "cache coloring". - */ - space = POOL_INPGHDR(pp) ? pp->pr_phoffset : pp->pr_pgsize; - space -= pp->pr_itemsperpage * pp->pr_size; - pp->pr_maxcolor = (space / align) * align; - pp->pr_curcolor = 0; - pp->pr_nget = 0; pp->pr_nfail = 0; pp->pr_nput = 0; @@ -1232,7 +1222,7 @@ pool_walk(struct pool *pp, int full, int n; LIST_FOREACH(ph, &pp->pr_fullpages, ph_pagelist) { - cp = ph->ph_colored; + cp = ph->ph_page; n = ph->ph_nmissing; while (n--) { @@ -1242,7 +1232,7 @@ pool_walk(struct pool *pp, int full, } LIST_FOREACH(ph, &pp->pr_partpages, ph_pagelist) { - cp = ph->ph_colored; + cp = ph->ph_page; n = ph->ph_nmissing; do { Index: sys/pool.h =================================================================== RCS file: /cvs/src/sys/sys/pool.h,v retrieving revision 1.53 diff -u -p -r1.53 pool.h --- sys/pool.h 22 Sep 2014 01:04:58 -0000 1.53 +++ sys/pool.h 29 Oct 2014 21:49:43 -0000 @@ -128,8 +128,6 @@ struct pool { RB_HEAD(phtree, pool_item_header) pr_phtree; - int pr_maxcolor; /* Cache colouring */ - int pr_curcolor; int pr_phoffset; /* Offset in page of page header */ /*