"manish regmi" <manish_regmi@hotmail.com> writes: > hi, > Can anybody tell me how linux is doing page table switch & tlb > switch(flush). In some arch a read that it is doing in function > lazy_tlb_switch() or so. For x86, check out ./include/asm-i386/mmu_context.h:28:static \ inline void switch_mm(struct mm_struct *prev, \ struct mm_struct *next, struct task_struct *tsk, unsigned cpu) ... where you'll find control register three gets loaded. That is the register where the address of the PGD is stored, and changing the contents of that register causes an automatic full tlb flush. (Except "global" tlb entries.) > I need i386 implementation on linux 2.4.x. Can you tell in which > function it is implemented. On every task switch it shold have done > that but where.? -- --Ed L Cashin | PGP public key: ecashin@uga.edu | http://noserose.net/e/pgp/ -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/