Hi Vegard, I have some questions for you. On Fri, May 23, 2008 at 11:57 PM, Vegard Nossum <vegard.nossum@xxxxxxxxx> wrote: > On Fri, May 23, 2008 at 4:55 PM, Peter Teoh <htmldeveloper@xxxxxxxxx> wrote: >> It is not spamming, it is education....thank for the info. BTW...I >> think u gave me an idea now...... >> >> Currently your kmemcheck is restricted to only one CPU. Why not >> ALWAYS enable all the CPU to run at the same time....BUT WHEN AND >> ONLY WHEN read operation is detected on one CPU.....immediately send >> an IPI to all other CPU to freeze their operation.....until the not >> present flag is turned off again.....so it solved your "very small >> window" of racing condition..... >> >> What do you think? > > Hi, and thanks for the suggestion :-) > > Coincidentally, I sent the patch that does exactly this to LKML only 3 > minutes before I got your e-mail! > > (http://lkml.org/lkml/2008/5/23/179) > > > Vegard Thanks to Mulyadi.....u gave me the motivation to continue this thread again... First, inside http://lkml.org/lkml/2008/5/23/179, u mentioned normal IPI won't work ...have to be NMI IPI....I don't understand this part.....why normal IPI will result in deadlock? My present understanding is that sending an normal IPI for pagefault, to other processor, when they are in interrupt handling mode, will result in double fault: http://en.wikipedia.org/wiki/Double_fault But Linux Kernel do handle the double fault. Deadlock? I still don't understand how it arises. But yes, definitely u cannot use normal IPI to signal other processor. i.e. the following scenario is possible: sending normal IPI to other processor --> pagefault handler executed ---> then the processor also encountered an IRQ --> ???? but then again normal pagefault handler already handled the scenario when external interrupt can come in right? Second, your present tried to retain the CR3 value, but change the contents of the page table instead....but has problem with multiprocessor. How about the other way round - change the contents of per-CPU CR3, which will point to a different pagetable - (subtable). Not sure if this is the "per-cpu" pagetable that Ingo is suggesting to you. But I am suggesting a very small subtable - only those entries needed are constructed. After use it will be switch back to the original CR3. Possible? -- Regards, Peter Teoh -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ