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: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 1 Feb 2005 10:41:24 -0800 (PST)

:We have to touch the page tables for a process switch anyway, it's not
:that expensive to have a thread-local page mapping there I think.
:On the other hand the LDT approach costs for every access.

    The rfork'd processes are sharing the same page table, and the switch
    code detects this and does not bother to reload %cr3 (which saves a lot
    of cpu cycles), so you can't create a thread-local page mapping that way.

    As far as I know the LDT is the only way to create uniqueness between
    different processes sharing the same page table.  It's expensive, but 
    probably not as expensive as reloading %cr3.

    It would be interesting to test that hypothesis... what is more expensive?
    reloading %cr3 on every switch or reloading the LDT on every switch ?

					Matthew Dillon 

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