<div dir="ltr">Hi All,<div><br></div><div>I'd like to modify page permissions to invoke a page fault. So, I used set_pte() with modified pte access bits in gsnedf_schedule() . According to kernel documentation (<a href="https://www.kernel.org/doc/Documentation/cachetlb.txt">https://www.kernel.org/doc/Documentation/cachetlb.txt</a>), I should call flush_cache_page() before set_pte() and call flush_tlb_page() after set_pte(). But, when I run several rtspin tasks, the following warning messages are shown.</div><div><br></div><div><div>3194 P0 [vprintk_emit@kernel/printk.c:1564]: 4------------[ cut here ]------------</div><div>3195 P0 [vprintk_emit@kernel/printk.c:1564]: 4WARNING: at kernel/smp.c:244 smp_call_function_single+0x12f/0x190()</div><div>3196 P0 [vprintk_emit@kernel/printk.c:1564]: dModules linked in:3197 P0 [vprintk_emit@kernel/printk.c:1564]: </div><div>3198 P0 [vprintk_emit@kernel/printk.c:1564]: dCPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 3.10.5-kvm-test-pagefault #223</div><div>3199 P0 [vprintk_emit@kernel/printk.c:1564]: dHardware name: , BIOS QEMU 01/01/2007</div><div>~~~(stack traces)</div></div><div><br></div><div>The codes at kernel/smp.c:244: (<a href="https://github.com/LITMUS-RT/litmus-rt/blob/master/kernel/smp.c#L243">https://github.com/LITMUS-RT/litmus-rt/blob/master/kernel/smp.c#L243</a>)</div><div><div><pre style="font-family:Monaco,'Courier New',Courier,monospace;font-size:14px;padding:1em;color:rgb(120,120,120);overflow:auto;font-weight:bold"><b><i>/*</i></b>
<b><i> * Can deadlock when called with interrupts disabled.</i></b>
<b><i> * We allow cpu's that are not yet online though, as no one else can</i></b>
<b><i> * send smp call function interrupt to this cpu and as such deadlocks</i></b>
<b><i> * can't happen.</i></b>
<b><i> */</i></b>
<a href="http://lxr.free-electrons.com/ident?v=3.10;i=WARN_ON_ONCE" style="color:black;text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153)">WARN_ON_ONCE</a>(<a href="http://lxr.free-electrons.com/ident?v=3.10;i=cpu_online" style="color:black;text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153)">cpu_online</a>(this_cpu) && <a href="http://lxr.free-electrons.com/ident?v=3.10;i=irqs_disabled" style="color:black;text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153)">irqs_disabled</a>()
&& !<a href="http://lxr.free-electrons.com/ident?v=3.10;i=oops_in_progress" style="color:black;text-decoration:none;border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:rgb(153,153,153)">oops_in_progress</a>);</pre></div></div><div>Are interrupts disabled when we enter gsnedf_schedule()? Does anyone know how to modify page access bits in schedule() properly?</div><div><br></div><div>Thanks,</div><div><br></div><div>Namhoon Kim</div><div><br></div><div><br></div></div>