From owner-cvs-all Fri Jul 12 20:22:24 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3CBBD37B400; Fri, 12 Jul 2002 20:22:19 -0700 (PDT) Received: from rwcrmhc52.attbi.com (rwcrmhc52.attbi.com [216.148.227.88]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD14943E3B; Fri, 12 Jul 2002 20:22:18 -0700 (PDT) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc52.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020712222008.VUMW8262.rwcrmhc52.attbi.com@InterJet.elischer.org>; Fri, 12 Jul 2002 22:20:08 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id PAA53895; Fri, 12 Jul 2002 15:00:26 -0700 (PDT) Date: Fri, 12 Jul 2002 15:00:25 -0700 (PDT) From: Julian Elischer To: Alan Cox Cc: Matt Dillon , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_synch.c src/sys/sys proc.h src/sys/vm vm_zeroidle.c src/sys/i386/i386 genassym.c pmap.c In-Reply-To: <20020712205516.GD5265@cs.rice.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 12 Jul 2002, Alan Cox wrote: > On Fri, Jul 12, 2002 at 01:17:07PM -0700, Matt Dillon wrote: > > dillon 2002/07/12 13:17:07 PDT > > > > Modified files: > > sys/kern kern_synch.c > > sys/sys proc.h > > sys/vm vm_zeroidle.c > > sys/i386/i386 genassym.c pmap.c > > Log: > > Re-enable the idle page-zeroing code. Remove all IPIs from the idle > > page-zeroing code as well as from the general page-zeroing code and use a > > lazy tlb page invalidation scheme based on a callback made at the end > > of mi_switch. > > > > I think we should try to take this a step further. Specifically, we > should recognize when processors are running in user mode in order > to avoid IPIs on kernel pmap changes. On reentry to the kernel, > the processor would then do whatever is necessary to resync. If > too many kernel pmap changes accumulate, then you force a single > IPI that performs the changes in bulk. I am planning on adding code in the thread/kse so that there is a flag KEF_USERMODE that gets set when the KSE moves into user mode. The process also will get a counter of how many KSEs it has in user mode at this time. (for a multithreaded app). Not directly relelvent to what you are suggesting, but pcpu[cpunum].curthread->td_kse->ke_flagsd & KEF_USERMODE whould then give teh test you require.. (not the right names for these symbols. I haven't looked them up recently) > > As a start, it would be interesting to know how many IPIs could be > avoided by such a scheme. > > Alan > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message