lkml.org 
[lkml]   [1996]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: Asynchronous read-ahead
From
In lists.linux.kernel you write:

>On Tue, 9 Apr 1996, David S. Miller wrote:
>> On the I386 a kernel thread switch does indeed flush the TLB (but tlb
>> flushes on the intel are cheap and Linus could optimize this away if

>isn't it so, that the TLB has to be flushed only if the root page table
>directory changes (the value of CR3 put into the TSS)? Dont know if
>CR3 changes for a i386 Linux clone()-ed VM_SHARE process though :(

Every task, even when cloned, currently gets its own TSS, and switches
between tasks are done with a 'jmp TSS' instruction (see switch_to);
this includes reloading CR3 from the new TSS, which initiates a TLB flush.

Optimizing it away, as David suggests, would mean to replace the
'jmp TSS' instruction with code that explicitly saves/restores state
without modifying CR3; it might even save some other restoration work.
I think this change would have minimal impact on other parts of
the kernel; the switch_to is in exactly one place (schedule), setting
up a new task might have to change, but nothing else.

(is this correct? Linus?)

bye
Patrick


\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.097 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site