From owner-freebsd-ia64 Thu Jan 23 1:58:23 2003 Delivered-To: freebsd-ia64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9374237B401 for ; Thu, 23 Jan 2003 01:58:21 -0800 (PST) Received: from herring.nlsystems.com (mailgate.nlsystems.com [62.49.251.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 52E5643ED8 for ; Thu, 23 Jan 2003 01:58:20 -0800 (PST) (envelope-from dfr@nlsystems.com) Received: from herring.nlsystems.com (herring.nlsystems.com [10.0.0.2]) by herring.nlsystems.com (8.12.6/8.12.6) with ESMTP id h0N9w93p018809; Thu, 23 Jan 2003 09:58:11 GMT (envelope-from dfr@nlsystems.com) Content-Type: text/plain; charset="iso-8859-1" From: Doug Rabson To: Arun Sharma Subject: Re: cat /proc/pid/map == panic Date: Thu, 23 Jan 2003 09:58:09 +0000 User-Agent: KMail/1.4.3 Cc: freebsd-ia64@FreeBSD.ORG References: <200301220302.h0M323r01126@unix-os.sc.intel.com> <200301221021.29297.dfr@nlsystems.com> <20030122142309.A15191@unix-os.sc.intel.com> In-Reply-To: <20030122142309.A15191@unix-os.sc.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200301230958.09691.dfr@nlsystems.com> X-Spam-Status: No, hits=-8.4 required=6.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_01_02, USER_AGENT,USER_AGENT_KMAIL version=2.41 Sender: owner-freebsd-ia64@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Wednesday 22 January 2003 10:23 pm, Arun Sharma wrote: > On Wed, Jan 22, 2003 at 10:21:29AM +0000, Doug Rabson wrote: > > On Wednesday 22 January 2003 3:02 am, Arun Sharma wrote: > > > cat /proc/pid/map results in a page not present fault. The > > > attached patch fixed it for me. > > > > This is going to find the wrong pte, I think. Without the > > pmap_install(pmap), your pmap_find_vhpt will look in the current > > process instead of the target. > > That's right. An updated patch is attached. It looks right to me. Do you have a commit bit? Shall I commit the fix? > > > Does it work if you just add the check > > for pmap=3D=3D0 to the old code, i.e. still use pmap_install and tpa = to > > get the mapping? > > I haven't tried it, but I think in my case pmap was almost certainly > non-zero (the process in question is sshd). Further, cr.iip was > pointing to the tpa instruction when the page not present fault > happened. The problem with ia64_tpa is that it will result in faults. > The code in procfs is trying to count the number of resident pages - > so you may not want to fault more pages in. Oh, of course. It makes much more sense now. > > A further optimization of this patch may be to just load one region > register instead of loading all of them. I guess that depends how expensive the generic pmap_install actually is.=20 It would be pretty interesting to know the costs of e.g. loading a=20 region register, loading a translation register etc. --=20 Doug Rabson=09=09=09=09Mail: dfr@nlsystems.com =09=09=09=09=09Phone: +44 20 8348 6160 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ia64" in the body of the message