DragonFly BSD
DragonFly commits List (threaded) for 2005-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: cvs commit: src/lib/libthread_xu Makefile pthread.map src/lib/libthread_xu/arch Makefile.inc src/lib/libthread_xu/arch/alpha Makefile.inc src/lib/libthread_xu/arch/alpha/alpha pthread_md.c src/lib/libthread_xu/arch/alpha/include pthread_md.h src/lib/libthread_xu/arch/amd64 ...

From: Joerg Sonnenberger <joerg@xxxxxxxxxxxxxxxxx>
Date: Wed, 2 Feb 2005 00:26:42 +0100
Mail-followup-to: commits@crater.dragonflybsd.org

On Tue, Feb 01, 2005 at 03:14:47PM -0800, Matthew Dillon wrote:
> :This is an optimisation for the intra-program switch if you want to call it so.
> :I would argue that the normal switch case is either user -> kernel or to
> :a different kernel thread.
>     You pretty much always want to have just a single page table with a
>     threaded program.  The %cr3 optimization is a nice plus, but it isn't
>     why the page table is being shared.  The page table is being shared
>     because trying to build a threaded program WITHOUT sharing the page
>     table is extremely expensive.  Every time you'd allocate memory or map
>     something it would have to be replicated across N page tables.  
>     Performance would be destroyed.

But you can still share most parts of the page table, if you exploit
the two level approach.


> 						-Matt

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]