[LITMUS^RT] Adding Job Deadlines to Control Pages

Björn Brandenburg bbb at mpi-sws.org
Wed Dec 9 17:15:00 CET 2015


> On 08 Dec 2015, at 19:58, Geoffrey Tran <gtran at isi.edu> wrote:
> 
> I have been trying to add job deadlines to the control page, per the discussion at https://github.com/LITMUS-RT/liblitmus/pull/1.  However, I seem to be running into a few issues.
> 
> To summarize my changes: 
> - Added lt_t deadline field to control_page struct in rt_param.h
> - In setup_release() in jobs.c, check for if task t has control page, then write to the field.
> 
> In my user space code, I try testing the following:
> struct control_page* testCtrlPage = get_ctrl_page();
> if(testCtrlPage!=NULL)
> {
>         printf("IRQ: %lu\tdeadline: %llu\tirq_syscall:%lu\n",
>         	testCtrlPage->irq_count, 
>         	testCtrlPage->deadline,
>         	testCtrlPage->ts_syscall_start);
> }
> 
> The code compiles and executes, but the output for all three fields are always 0:
> “…
> IRQ: 0  deadline: 0     irq_syscall:0
> IRQ: 0  deadline: 0     irq_syscall:0
> …"
> 
> I’m not very familiar with this, so there might be something obvious that’s missing.  Any feedback is welcome!

Hi Geoffrey,

I can’t spot anything that looks obviously wrong. However, not seeing *any* interrupts in the control paper is rather unlikely; this seems broken.

I’ve pushed a patch to liblitmus that adds an option to rtspin to make it print interrupt information.

	https://github.com/LITMUS-RT/liblitmus/commit/7efbfc0d311523468c3b4665cc31d654c4c58a75

Running on top of the current master branch, rtspin reports interrupts as expected:

> [root at litmus-rt ~]# setsched GSN-EDF        
> [root at litmus-rt ~]# rtspin -v -i   20 100 1 
> rtspin/1611:1 @ 0.1450ms                    
>         total interrupts: 0; delta: 0       
> rtspin/1611:2 @ 100.3330ms                  
>         total interrupts: 38; delta: 38     
> rtspin/1611:3 @ 200.3431ms                  
>         total interrupts: 78; delta: 40     
> rtspin/1611:4 @ 300.4119ms                  
>         total interrupts: 118; delta: 40    
> rtspin/1611:5 @ 400.3479ms                  
>         total interrupts: 160; delta: 42    
> rtspin/1611:6 @ 500.3340ms                  
>         total interrupts: 200; delta: 40    
> rtspin/1611:7 @ 600.4560ms                  
>         total interrupts: 238; delta: 38    
> rtspin/1611:8 @ 700.3901ms                  
>         total interrupts: 278; delta: 40    
> rtspin/1611:9 @ 800.3840ms                  
>         total interrupts: 318; delta: 40    
> rtspin/1611:10 @ 900.4440ms                 
>         total interrupts: 358; delta: 40    
> rtspin/1611:11 @ 1000.4129ms                
>         total interrupts: 398; delta: 40    


So I think the control page is working correctly. Looking at your printf statement, is it possible that you are using the wrong bit widths?

- Björn






More information about the litmus-dev mailing list