<div dir="ltr">The stack traces might have been useful in determining the call path into gsnedf_schedule(). Why did you remove them? It's hard to say anything about the state of interrupts, especially if there's no context around how gsnedf_schedule() was called.<div><br></div><div> -- Chris</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 18, 2014 at 8:18 PM, Namhoon Kim <span dir="ltr"><<a href="mailto:namhoonk@cs.unc.edu" target="_blank">namhoonk@cs.unc.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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" target="_blank">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" target="_blank">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)" target="_blank">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)" target="_blank">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)" target="_blank">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)" target="_blank">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>
<br>_______________________________________________<br>
litmus-dev mailing list<br>
<a href="mailto:litmus-dev@lists.litmus-rt.org" target="_blank">litmus-dev@lists.litmus-rt.org</a><br>
<a href="https://lists.litmus-rt.org/listinfo/litmus-dev" target="_blank">https://lists.litmus-rt.org/listinfo/litmus-dev</a><br>
<br></blockquote></div><br></div></div>