From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <122a1b862278abf61a07a806168993ac@felloff.net> References: <4578ec4fd74cba90ed1d96bfb4fa6e25@mikro.quanstro.net> <122a1b862278abf61a07a806168993ac@felloff.net> Date: Sun, 2 Mar 2014 09:48:44 +0000 Message-ID: From: Charles Forsyth To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=e89a8f646f8fa5615304f39c93d6 Subject: Re: [9fans] imagereclaim() Topicbox-Message-UUID: c0d01a28-ead8-11e9-9d60-3106f5b1d025 --e89a8f646f8fa5615304f39c93d6 Content-Type: text/plain; charset=UTF-8 On 2 March 2014 03:55, wrote: > checked nix/port/page.c. your duppage() is wrong. It isn't needed at all. When a cached page is written, it's trying hard to replace the page in the cache by a new copy, to return the previously cached page. Instead, I copy the cached page and return the copy, which is what it already does in another instance. In the current version, not yet available (but soon), I do away with the page hash table entirely, so there's nowhere for the page hash chains to accumulate. Page is smaller and simpler, with a reference count but no lock. --e89a8f646f8fa5615304f39c93d6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

= On 2 March 2014 03:55, <cinap_lenrek@felloff.net> wr= ote:
checked nix/port/page.c. your duppage() is wrong.

It = isn't needed at all. When a cached page is written, it's trying har= d to replace the page in the cache by a new copy,
to return the previously cached page. Instead, I copy the cached page and r= eturn the copy, which is what it already
do= es in another instance. In the current version, not yet available (but soon= ), I do away with the page hash
table entirely, so there's nowhere for the p= age hash chains to accumulate. Page is smaller and simpler, with
a reference count but no lock.
--e89a8f646f8fa5615304f39c93d6--