From: dlg Date: Fri, 19 Dec 2014 02:46:47 +0000 (+0000) Subject: the last commit changed LIST_INSERT_HEAD to TAILQ_INSERT_TAIL cos the X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9f2f21cedbccbf5a88312bc583e5a09dffb57422;p=openbsd the last commit changed LIST_INSERT_HEAD to TAILQ_INSERT_TAIL cos the latter is cheaper, but i forgot to change the thing that pulls pages off those lists to match the change in direction. the page lists went from LIFO to FIFO. this changes pool_update_curpage to use TAILQ_LAST so we go back to LIFO. pointed out by and ok tedu@ --- diff --git a/sys/kern/subr_pool.c b/sys/kern/subr_pool.c index 9b51c930d1d..1cedfa6b820 100644 --- a/sys/kern/subr_pool.c +++ b/sys/kern/subr_pool.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_pool.c,v 1.170 2014/12/19 02:15:25 dlg Exp $ */ +/* $OpenBSD: subr_pool.c,v 1.171 2014/12/19 02:46:47 dlg Exp $ */ /* $NetBSD: subr_pool.c,v 1.61 2001/09/26 07:14:56 chs Exp $ */ /*- @@ -851,9 +851,9 @@ pool_p_remove(struct pool *pp, struct pool_item_header *ph) void pool_update_curpage(struct pool *pp) { - pp->pr_curpage = TAILQ_FIRST(&pp->pr_partpages); + pp->pr_curpage = TAILQ_LAST(&pp->pr_partpages, pool_pagelist); if (pp->pr_curpage == NULL) { - pp->pr_curpage = TAILQ_FIRST(&pp->pr_emptypages); + pp->pr_curpage = TAILQ_LAST(&pp->pr_emptypages, pool_pagelist); } }