Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!clyde.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!apple!usc!samsung!crackers!jjmhome!acestes!paradis From: paradis@acestes.UUCP (Jim Paradis) Newsgroups: comp.sys.encore Subject: Re: Multimax thrashing Message-ID: <122@acestes.UUCP> Date: 26 Dec 90 23:56:38 GMT References: <1990Dec3.170300.14750@newcastle.ac.uk> <130064@infocenter.encore.com> <2166@sirius.ucs.adelaide.edu.au> <142@mx-1> <2195@sirius.ucs.adelaide.edu.au> Reply-To: paradis@acestes.UUCP (Jim Paradis) Organization: Alberich's Rings & Things Lines: 31 In article <2195@sirius.ucs.adelaide.edu.au> francis@cs.adelaide.edu.au writes: >Umax 4.3 is not able to page out copy on write pages. The meaning of >this and its ramifications are explained below. > > [ very good explanation deleted ] Francis' explanation is quite correct... but unfortunately a fix is not trivial. The reason for this is that when several processes reference a copy-on-write page (e.g. a process forks off several children that neither exit nor exec), then EACH process has a PTE that references either the physical page in memory or (if the page were originally paged out when we forked), the page on disk. The problem is that there is no easy way to propagate a change to one of these PTEs to all the other PTEs referencing the page. Basically, there are no direct links from one PTE sharing a page to another. You CAN find them all, but it involves rummaging through a LOT of kernel data structures and performing a lot of tests... which means locking down a lot of stuff for a long time. Since you can't find every affected PTE when you change (or remove) its physical mapping, you can't reliably page a copy-on-write page out. (actually, you can probably get away with it if its reference count is 1; wonder what that optimization will buy you...) Note that only if the page is already in physical memory will you end up wiring down physical pages this way. If you're so lucky as to be swapped out 8-), then forking will only wire down the disk blocks on the paging partition until the last one out turns out the lights... -- Jim Paradis UUCP: harvard!m2c!jjmhome!acestes!paradis 9 Carlstad St. AT&T: (508) 792-3810 Worcester, MA 01607-1569 ICBM: 42deg 13' 52", 71deg 47' 51"