First step for dynticks
      in FreeBSD
               Tsuyoshi Ozawa
                Univ. of Tsukuba
          ozawa@so...
Ticks


               HZ       HZ         time

• Timer interrupt is important processing to
  work kernel correctly
• Bu...
Ticks


               HZ       HZ         time

• Timer interrupt is important processing to
  work kernel correctly
• Bu...
Ticks


               HZ       HZ         time

• Timer interrupt is important processing to
  work kernel correctly
• Bu...
Ticks


               HZ       HZ         time

• Timer interrupt is important processing to
  work kernel correctly
• Bu...
Dynticks


                                                          time
                    when next Timer is going to ...
Dynticks


                                                          time
                    when next Timer is going to ...
Dynticks


                                                          time
                    when next Timer is going to ...
Dynticks


                                                          time
                    when next Timer is going to ...
Benefits

• If OSes can skip needless ticks...
   •   Save power consumption

   •   OS in Virtual Machine work more lightl...
Suggestion


• Dynamic Ticks in FreeBSD
Rough Design
• Switch mode between periodic tick mode
  & dynamic tick mode
 •   The switch trigger is when to be schedule...
2 tick mode transition
                        after sched_idletd is scheduled




                                       ...
2 tick mode transition
                        after sched_idletd is scheduled




                                       ...
2 tick mode transition
                        after sched_idletd is scheduled




                                       ...
2 tick mode transition
                        after sched_idletd is scheduled




                                       ...
2 tick mode transition
                        after sched_idletd is scheduled




                                       ...
2 tick mode transition
                        after sched_idletd is scheduled




                                       ...
Current status

• Started to write code 11th March,
  2010(JST)
• I implemented to scan callout queue
  The routine scan w...
Demo
Wrapping up

• I started to implement tickless kernel in
  FreeBSD.
• As first step, I implemented the routine
  which dete...
Acknowledgements
Thanks
• Alexander Mortin
• Hiroki Sato        for advising me !!

         Any idea or question?
Upcoming SlideShare
Loading in...5
×

First step for dynticks in FreeBSD

2,094

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,094
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
15
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide



















  • First step for dynticks in FreeBSD

    1. 1. First step for dynticks in FreeBSD Tsuyoshi Ozawa Univ. of Tsukuba ozawa@softlab.cs.tsukuba.ac.jp ozawa@t-oza.net AsiaBSDcon March 14th, 2010 Work-In-Progress talk
    2. 2. Ticks HZ HZ time • Timer interrupt is important processing to work kernel correctly • But it is very expensive to handle periodic ticks
    3. 3. Ticks HZ HZ time • Timer interrupt is important processing to work kernel correctly • But it is very expensive to handle periodic ticks
    4. 4. Ticks HZ HZ time • Timer interrupt is important processing to work kernel correctly • But it is very expensive to handle periodic ticks
    5. 5. Ticks HZ HZ time • Timer interrupt is important processing to work kernel correctly • But it is very expensive to handle periodic ticks
    6. 6. Dynticks time when next Timer is going to be fired • Timer interrupts are generated by using oneshot timer. • This feature is implemented in Solaris, Linux and etc.
    7. 7. Dynticks time when next Timer is going to be fired • Timer interrupts are generated by using oneshot timer. • This feature is implemented in Solaris, Linux and etc.
    8. 8. Dynticks time when next Timer is going to be fired • Timer interrupts are generated by using oneshot timer. • This feature is implemented in Solaris, Linux and etc.
    9. 9. Dynticks time when next Timer is going to be fired • Timer interrupts are generated by using oneshot timer. • This feature is implemented in Solaris, Linux and etc.
    10. 10. Benefits • If OSes can skip needless ticks... • Save power consumption • OS in Virtual Machine work more lightly (e.g. FreeBSD as guest OS) VMware, “Timekeeping in VMware Virtual Machines”, http:// www.vmware.com/pdf/vmware_timekeeping.pdf, 2008
    11. 11. Suggestion • Dynamic Ticks in FreeBSD
    12. 12. Rough Design • Switch mode between periodic tick mode & dynamic tick mode • The switch trigger is when to be scheduled sched_idletd • This function only works when CPU is idle • If the cpu is idle, the CPU has no need to know what current time is. • Scan callout queue & get next event
    13. 13. 2 tick mode transition after sched_idletd is scheduled time HZ HZ HZ when next Timer is going to be fired Periodic tick mode Dynamic tick mode • The idle process( sched_idletd ) trigger the mode transition
    14. 14. 2 tick mode transition after sched_idletd is scheduled time HZ HZ HZ when next Timer is going to be fired Periodic tick mode Dynamic tick mode • The idle process( sched_idletd ) trigger the mode transition
    15. 15. 2 tick mode transition after sched_idletd is scheduled time HZ HZ HZ when next Timer is going to be fired Periodic tick mode Dynamic tick mode • The idle process( sched_idletd ) trigger the mode transition
    16. 16. 2 tick mode transition after sched_idletd is scheduled time HZ HZ HZ when next Timer is going to be fired Periodic tick mode Dynamic tick mode • The idle process( sched_idletd ) trigger the mode transition
    17. 17. 2 tick mode transition after sched_idletd is scheduled time HZ HZ HZ when next Timer is going to be fired Periodic tick mode Dynamic tick mode • The idle process( sched_idletd ) trigger the mode transition
    18. 18. 2 tick mode transition after sched_idletd is scheduled time HZ HZ HZ when next Timer is going to be fired Periodic tick mode Dynamic tick mode • The idle process( sched_idletd ) trigger the mode transition
    19. 19. Current status • Started to write code 11th March, 2010(JST) • I implemented to scan callout queue The routine scan when the next timer event come up?
    20. 20. Demo
    21. 21. Wrapping up • I started to implement tickless kernel in FreeBSD. • As first step, I implemented the routine which detect when the next timer fire.
    22. 22. Acknowledgements Thanks • Alexander Mortin • Hiroki Sato for advising me !! Any idea or question?
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×