From 58b908ae128f6c8585b816783e577d24069f2783 Mon Sep 17 00:00:00 2001 From: pooka Date: Thu, 9 Aug 2007 09:54:36 +0000 Subject: [PATCH] Flush file's pages in inactive (they'll still be kept in the kernel page page if it's enabled). This very easily takes care of memory management problems except for large files. --- sys/rump/fs/lib/libp2k/p2k.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/sys/rump/fs/lib/libp2k/p2k.c b/sys/rump/fs/lib/libp2k/p2k.c index b909ac40c62e..25b541bf5b57 100644 --- a/sys/rump/fs/lib/libp2k/p2k.c +++ b/sys/rump/fs/lib/libp2k/p2k.c @@ -1,4 +1,4 @@ -/* $NetBSD: p2k.c,v 1.5 2007/08/08 22:45:51 pooka Exp $ */ +/* $NetBSD: p2k.c,v 1.6 2007/08/09 09:54:36 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -546,10 +546,6 @@ p2k_node_write(struct puffs_cc *pcc, void *opc, uint8_t *buf, off_t offset, if (rv == 0) *resid = uio.uio_resid; - /* XXX: should do this */ -#if 0 - return VOP_PUTPAGES(opc, 0, 0, PGO_ALLPAGES); -#endif return rv; } @@ -566,10 +562,10 @@ p2k_node_reclaim(struct puffs_cc *pcc, void *opc, const struct puffs_cid *pcid) int p2k_node_inactive(struct puffs_cc *pcc, void *opc, const struct puffs_cid *pcid) { - struct vnode *vp; + struct vnode *vp = opc; int rv; - vp = opc; + (void) VOP_PUTPAGES(opc, 0, 0, PGO_ALLPAGES); rv = VOP_INACTIVE(vp, curlwp); if (vp->v_data == (void *)1) puffs_setback(pcc, PUFFS_SETBACK_NOREF_N1);