From owner-freebsd-smp Wed Nov 20 12:58:52 1996 Return-Path: owner-smp Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id MAA09273 for smp-outgoing; Wed, 20 Nov 1996 12:58:52 -0800 (PST) Received: from spinner.DIALix.COM (root@spinner.DIALix.COM [192.203.228.67]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id MAA09234 for ; Wed, 20 Nov 1996 12:58:48 -0800 (PST) Received: from spinner.DIALix.COM (peter@localhost.DIALix.oz.au [127.0.0.1]) by spinner.DIALix.COM (8.8.3/8.8.3) with ESMTP id EAA12835; Thu, 21 Nov 1996 04:58:25 +0800 (WST) Message-Id: <199611202058.EAA12835@spinner.DIALix.COM> X-Mailer: exmh version 1.6.9 8/22/96 To: Chris Csanady cc: Steve Passe , freebsd-smp@freebsd.org Subject: Re: vm_page_alloc(ZERO): missing pages... In-reply-to: Your message of "Wed, 20 Nov 1996 14:50:04 CST." <199611202050.OAA02373@friley216.res.iastate.edu> Date: Thu, 21 Nov 1996 04:58:24 +0800 From: Peter Wemm Sender: owner-smp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Chris Csanady wrote: > >Also, how much paging is taking place? We are not propagating TLB flushes > >to all cpu's yet (needs APIC IPI's to work). > > A great deal of paging. I was running a benchmark (hint) which beats on the > memory quite hard. VM as well. Besides being a wonderful benchmark, I also > use it every now and then to try to break things. :) Err, well, in this case, I'd suggest the following saying is appropriate: Patient: "Doctor! Doctor! It hurts when I do this.." Doctor: "Well, don't do it then.." > Are the lacking TLB flushes very harmful? How hard would this be to > implement? Yes, and potentially rather nasty. :-( Here's why: CPU 1: Running in user mode CPU 2: enters kernel, frees up pages that belong to the process that CPU 1 is running, reassigns them elsewhere, flushes it's TLB and uses the new mappings. CPU 1: blissfully unaware while the TLB cache holds.. Continues to use the page that it thinks it owns, but might now be being used to write an inode or something... There is a race between the page mappings being changed and the next TLB flush on the other cpus. This window opens up much wider when there is paging, or page stealing going on. > Chris Cheers, -Peter