Re: [patch] smp-2.3.40-A3, SMP fixes

From: Manfred Spraul (manfreds@colorfullife.com)
Date: Mon Jan 17 2000 - 09:27:35 EST


I downloaded your patch, and I have 2 questions:
+ movl %%eax,%%cr4; \
+ movl %%cr3,%%ebx; \
+ movl %%ebx,%%cr3; \
+ movl %%ecx,%%cr4; \
+ " : : : "cc", "eax", "ebx", "ecx", "memory" \
+ ); \

IIRC I read somewhere that you should reload cr3 after changing cr4.
Unfortunately, I can't find that text, but arch/i386/kernel/head.S contains
these comments:
> movl %cr4,%eax # Turn on 4Mb pages
> orl $16,%eax
> movl %eax,%cr4
> movl %cr3,%eax # Intel specification clarification says
> movl %eax,%cr3 # to do this. Maybe it makes a difference.
> # Who knows ?

In my own patch, I added an additional "movl %%ebx,cr3" after reenableing
PGE. Do you have that specification clarification?

From: "Ingo Molnar" <mingo@chiara.csoma.elte.hu>
> __flush_tlb() is noticeably faster than __flush_tlb_global().
> The two affected places, zap_low_mappings() and flush_all_zero_pkmaps()
> are now using the new flush_tlb_all_kernel() call.

I guess flush_all_zero_pkmaps() will happen quite often, it might be the
most common caller of flush_tlb_all() [other reasons are module load/unload,
or creating a process that uses more than 1024 file handles - extremely rare
events] . I would remove the PAGE_GLOBAL bit from the kmap pages, then we do
not need another flush_tlb function that's referenced from the
cross-platform part of the kernel.

--
    Manfred

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jan 23 2000 - 21:00:15 EST