From 9f2f21cedbccbf5a88312bc583e5a09dffb57422 Mon Sep 17 00:00:00 2001 From: dlg Date: Fri, 19 Dec 2014 02:46:47 +0000 Subject: [PATCH] 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@ --- sys/kern/subr_pool.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); } } -- 2.20.1