Finally, I got selected for Outreachy 2015. I will be working on the project “Introducing PowerClamp-like driver for Xen” with Xen Project with Dario Faggioli and George Dunlap . And this is my first blog to share my Outreachy experiences. Before jumping to my experience, I would like to mention about Outreachy.
Reflective of a generally low number of women participating in the FOSS development. Outreachy provides an equal opportunity for women in FOSS. It provides Free and Open Source Software Outreach Program internships. December 2015 – March 2016 is the 11th round of the program starting with one round in 2006 and then in 2010 with rounds organized twice a year.
Being a part of Outreachy is matter of immense pride for me. I also believe having a program targeted specifically towards women makes easier to reach talented and passionate participants, who are uncertain about how to start otherwise.
I applied for the program so that I can start contributing to the open source organizations and I expect to learn a lot from the cool developers here at Xen Project. As a contributor I think Xen Project has a great team of developers. I enjoyed working with Xen Project developers. They are fun, highly knowledgeable, understanding and easy to work with, even for newbies like me. I am grateful to them for their help on my first patch (linked below) and feel lucky to work besides them in future.
My first bite-sized contribution:
About my project “Introducing PowerClamp-like driver for Xen”
PowerClamp was introduced to Linux in late 2012 in order to allow users to set a system-wide maximum power usage limit. This is particularly useful for data centers, where there may be a need to reduce power consumption based on availability of electricity or cooling. A more complete writeup is available at LWN. These same arguments apply to Xen. The purpose of this project would be to implement a similar functionality in Xen, and to make it interface as well as possible with the Linux PowerClamp tools, so that the same tools could be used for both. The basic mechanism for PowerClamp in Linux is to monitor the percentage of time spent idling. When this time goes below a user-specified threshold, it activates a high-priority real-time process to force the CPU to idle for the specified amount of time. The idea is fairly straightforward, but working with the scheduler involves dealing with very tricky race conditions and deadlock.
Project includes two main tasks. First one is to apply the idea to the main Xen scheduler, the Credit1 scheduler. Here, we want something that is generic, i.e., that can be applied to all schedulers (Credit1, Credit2, etc.). So, when dealing with the interface and with some high level infrastructure for the feature, we will try to make this happen in generic code (like schedule.c, sysctl.c, etc.). Although some bits of the actual implementation can be scheduler specific. In this phase we will decide what we want to be generic, and what we want to put in per -scheduler code.Then, we have two main ways to implement this:
- Adding an extra priority level.
- Re-using the existing credit mechanism.
Depending on the scheduler we can figure this out and then implement the better one.
Second one is to design an appropriate interface. We can check for any PowerClamp user-space tools for Linux and we can try to integrate those tools with Xen. Or we can just have this be a separate Xen feature, accessible via Xen’s xl command-line interface. Or we can try to combine both of the ideas.