From owner-freebsd-arch Fri Mar 16 7:52:40 2001 Delivered-To: freebsd-arch@freebsd.org Received: from feral.com (feral.com [192.67.166.1]) by hub.freebsd.org (Postfix) with ESMTP id 8FAC437B71C; Fri, 16 Mar 2001 07:52:36 -0800 (PST) (envelope-from mjacob@feral.com) Received: from beppo (beppo [192.67.166.79]) by feral.com (8.9.3/8.9.3) with ESMTP id HAA22797; Fri, 16 Mar 2001 07:52:38 -0800 Date: Fri, 16 Mar 2001 07:52:34 -0800 (PST) From: Matthew Jacob Reply-To: mjacob@feral.com To: Alfred Perlstein Cc: Benno Rice , Doug Rabson , John Baldwin , arch@FreeBSD.ORG Subject: page faults in AIX kernel In-Reply-To: <20010316073921.W29888@fw.wintelcom.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG [ different topic ] On Fri, 16 Mar 2001, Alfred Perlstein wrote: > * Matthew Jacob [010316 07:28] wrote: > > > > > > > > > > (in the PPC architecture I believe that page faults are interrupts) > > > > > > Not quite. Page faults and external interrupts are both classed as > > > 'exceptions'. External interrupts however can be turned on or off using the > > > EE bit of the machine state register without disabling page fault (DSI or ISI) > > > exceptions. > > > > Ah! Thanks for the clarification. > > > > What I had gotten my notion from was from AIX- if you have a spinlock > > contested and take a page fault in the kernel, you lock up. > > I've heard that page faults in the AIX kernel are "ok" (obviously > not when holding a mutex) because some of the kernel memory is > actually pageable. > > Any idea on what structures they keep in pageable memory? > > (just wondering) They have a concept of pinned and unpinned memory. IIRC (it's been a while now- one of my former clients took back the 2 processor 300MHz PPC box about a year ago and I hadn't done any work with it for 2-3 years) pinned memory isn't unpageable while unpinned memory is.... Let's see if I can dig up some examples... I can't remember exactly what other 'structures' they then actually have as pageable... I guess pretty much anything that isn't pinned (now isn't *that* a useful answer) :-).. Okay- here's one: /* * If this is the first time through: * Add entry to the device switch table to call this driver */ if (nconfigured == 0) { result = devswadd(dev, &vtd_dsw); if (result != 0) { Trace1(0, "vtd_config: devswadd result: %d", result); break; } result = pincode((int (*) ()) vtd_timer); if (result) { Trace1(0, "vtd_config: pincode result: %d", result); devswdel(dev); break; } } nconfigured++; Note that the timer funcion is pinned so that it can't be paged out when a soft call happens (which would be embarrassing). -matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message