From owner-freebsd-current Thu Jun 6 20:02:22 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id UAA18658 for current-outgoing; Thu, 6 Jun 1996 20:02:22 -0700 (PDT) Received: from dyson.iquest.net (dyson.iquest.net [198.70.144.127]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id UAA18644 for ; Thu, 6 Jun 1996 20:02:18 -0700 (PDT) Received: (from root@localhost) by dyson.iquest.net (8.7.5/8.6.9) id WAA01131; Thu, 6 Jun 1996 22:00:32 -0500 (EST) From: "John S. Dyson" Message-Id: <199606070300.WAA01131@dyson.iquest.net> Subject: Re: More on VM, swap leaks To: fcurrent@jraynard.demon.co.uk (James Raynard) Date: Thu, 6 Jun 1996 22:00:31 -0500 (EST) Cc: plm@xs4all.nl, freebsd-current@FreeBSD.org In-Reply-To: <199606070203.CAA02611@jraynard.demon.co.uk> from "James Raynard" at Jun 7, 96 02:03:44 am X-Mailer: ELM [version 2.4 PL24 ME8] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk > > > > JH> Another possibility is a bad emacs binary. Especially since > > JH> as part of the compilation process, emacs runs itself, loads > > JH> in a bunch of LISP, then pukes itself out as a new executable. > > JH> I shudder to think what could happen if a buggy kernel or bad > > JH> SIMM decided to rear its head at that point. > > > > I have the same problems. > > I have had other programs die, as well Emacs:- > > Jun 4 16:05:00 jraynard /kernel: pid 10265 (atrun), uid 0: exited on signal 10 > Jun 6 23:16:05 jraynard /kernel: pid 148 (innd), uid 8: exited on signal 10 > No guarantees, but I found a *major* omission in pmap.c. Replace the pmap_object_init_pt routine in pmap.c with the following, and see how things go: void pmap_object_init_pt(pmap, addr, object, pindex, size, limit) pmap_t pmap; vm_offset_t addr; vm_object_t object; vm_pindex_t pindex; vm_size_t size; int limit; { vm_offset_t tmpidx; int psize; vm_page_t p; int objpgs; psize = (size >> PAGE_SHIFT); if (!pmap || (object->type != OBJT_VNODE) || (limit && (psize > MAX_INIT_PT) && (object->resident_page_count > MAX_INIT_PT))) { return; } /* * if we are processing a major portion of the object, then scan the * entire thing. */ if (psize > (object->size >> 2)) { objpgs = psize; for (p = TAILQ_FIRST(&object->memq); ((objpgs > 0) && (p != NULL)); p = TAILQ_NEXT(p, listq)) { tmpidx = p->pindex; if (tmpidx < pindex) { continue; } tmpidx -= pindex; if (tmpidx >= psize) { continue; } if (((p->valid & VM_PAGE_BITS_ALL) == VM_PAGE_BITS_ALL) && (p->busy == 0) && (p->flags & (PG_BUSY | PG_FICTITIOUS)) == 0) { if (p->queue == PQ_CACHE) vm_page_deactivate(p); p->flags |= PG_BUSY; pmap_enter_quick(pmap, addr + (tmpidx << PAGE_SHIFT), VM_PAGE_TO_PHYS(p)); p->flags |= PG_MAPPED; PAGE_WAKEUP(p); } objpgs -= 1; } } else { /* * else lookup the pages one-by-one. */ for (tmpidx = 0; tmpidx < psize; tmpidx += 1) { p = vm_page_lookup(object, tmpidx + pindex); if (p && ((p->valid & VM_PAGE_BITS_ALL) == VM_PAGE_BITS_ALL) && (p->busy == 0) && (p->flags & (PG_BUSY | PG_FICTITIOUS)) == 0) { if (p->queue == PQ_CACHE) vm_page_deactivate(p); p->flags |= PG_BUSY; pmap_enter_quick(pmap, addr + (tmpidx << PAGE_SHIFT), VM_PAGE_TO_PHYS(p)); p->flags |= PG_MAPPED; PAGE_WAKEUP(p); } } } return; }