Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Jul 2002 15:00:25 -0700 (PDT)
From:      Julian Elischer <julian@elischer.org>
To:        Alan Cox <alc@cs.rice.edu>
Cc:        Matt Dillon <dillon@FreeBSD.org>, 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
Message-ID:  <Pine.BSF.4.21.0207121455510.53224-100000@InterJet.elischer.org>
In-Reply-To: <20020712205516.GD5265@cs.rice.edu>

next in thread | previous in thread | raw e-mail | index | archive | help


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0207121455510.53224-100000>