[LITMUS^RT] Modifying Page Table Entry in gsnedf_schedule()

Christopher Kenna cjk at cs.unc.edu
Fri Sep 19 08:12:46 CEST 2014


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.

 -- Chris

On Thu, Sep 18, 2014 at 8:18 PM, Namhoon Kim <namhoonk at cs.unc.edu> wrote:

> Hi All,
>
> 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 (
> https://www.kernel.org/doc/Documentation/cachetlb.txt), 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.
>
> 3194 P0 [vprintk_emit at kernel/printk.c:1564]: 4------------[ cut here
> ]------------
> 3195 P0 [vprintk_emit at kernel/printk.c:1564]: 4WARNING: at
> kernel/smp.c:244 smp_call_function_single+0x12f/0x190()
> 3196 P0 [vprintk_emit at kernel/printk.c:1564]: dModules linked in:3197 P0
> [vprintk_emit at kernel/printk.c:1564]:
> 3198 P0 [vprintk_emit at kernel/printk.c:1564]: dCPU: 0 PID: 0 Comm:
> swapper/0 Tainted: G        W    3.10.5-kvm-test-pagefault #223
> 3199 P0 [vprintk_emit at kernel/printk.c:1564]: dHardware name:  , BIOS QEMU
> 01/01/2007
> ~~~(stack traces)
>
> The codes at kernel/smp.c:244: (
> https://github.com/LITMUS-RT/litmus-rt/blob/master/kernel/smp.c#L243)
>
> */*** * Can deadlock when called with interrupts disabled.** * We allow cpu's that are not yet online though, as no one else can** * send smp call function interrupt to this cpu and as such deadlocks** * can't happen.** */*
>  WARN_ON_ONCE <http://lxr.free-electrons.com/ident?v=3.10;i=WARN_ON_ONCE>(cpu_online <http://lxr.free-electrons.com/ident?v=3.10;i=cpu_online>(this_cpu) && irqs_disabled <http://lxr.free-electrons.com/ident?v=3.10;i=irqs_disabled>()
>                 && !oops_in_progress <http://lxr.free-electrons.com/ident?v=3.10;i=oops_in_progress>);
>
> Are interrupts disabled when we enter gsnedf_schedule()? Does anyone know
> how to modify page access bits in schedule() properly?
>
> Thanks,
>
> Namhoon Kim
>
>
>
> _______________________________________________
> litmus-dev mailing list
> litmus-dev at lists.litmus-rt.org
> https://lists.litmus-rt.org/listinfo/litmus-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20140918/2ca19bca/attachment.html>


More information about the litmus-dev mailing list