I am curious about the smp_flush_tlb() ia32 code in arch/i386/kernel/smp.c.
Firstly, is it guaranteed that all callers of this routine hold the giant
kernel lock? Or could it be called without the lock?
Secondly, what is the reason of the __save_flags/__cli/__restore_flags in
the body of smp_flush_tlb? I noted there are some FORCE_APIC_SERIALIZATION/
CONFIG_X86_GOOD_APIC issues, but those are well contained in
send_IPI_allbutself, so smp_flush_tlb should not need to redo it, according
to my simple thinking.
Thirdly, depending on whether smp_flush_tlb is always called with the
kernel_lock (see first question), how is it possible to get "crossing"
invalidates?
Fourthly, wouldn't it be better if the caller were to do its local_flush_tlb
and then go into the while loop, waiting for other cpus to finish their
flushes? This way, it would probably spend lesser time spinning ... yes,
this is just microoptimization.
Please CC me (kanoj@engr.sgi.com) on your replies.
Thanks much.
Kanoj
(kanoj@engr.sgi.com)
-
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/