Re: cvs commit: src/lib/libthread_xu Makefile pthread.map src/li

看板DFBSD_commit作者時間21年前 (2005/02/02 08:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串10/24 (看更多)
Joerg Sonnenberger wrote: > 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. > Yes, you can rewrite a pte, but an invlpg intruction is very expensive! remember you have to operate TLB, which should be avoided in most time. > Joerg > > >> -Matt
文章代碼(AID): #1201-700 (DFBSD_commit)
討論串 (同標題文章)
完整討論串 (本文為第 10 之 24 篇):
文章代碼(AID): #1201-700 (DFBSD_commit)