[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Request for help: passing network statistics from netback driver to Xen scheduler.

  • To: "xen-devel@xxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxx>
  • From: "Dlugajczyk, Marcin" <j.j.dlugajczyk@xxxxxxxxxxxxxxx>
  • Date: Thu, 31 Jul 2014 14:37:09 +0000
  • Accept-language: en-US, en-GB
  • Delivery-date: Thu, 31 Jul 2014 14:58:08 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: AQHPrMzozLuECr79bkCENBo7MFf+sA==
  • Thread-topic: Request for help: passing network statistics from netback driver to Xen scheduler.

Hi everyone!

This my first time on this mailing list. Iâm working with Xen for my master 
thesis, and Iâd like to ask you for an advice. I donât have any previous 
experience with Xen or Linux development, so please bear with my if Iâm doing 
something silly!

What Iâm trying to accomplish is to build a Xen scheduler, which is scheduling 
domains based on their network intensity (Iâm trying to implement one of the 
co-scheduling algorithms). So far, Iâve implemented simple round-robin 
scheduler which seems to work. Now I want to extend it to take into account the 
network traffic of each domain (higher the traffic, higher the priority).

Iâve found a patch for older version of Xen[1], which implemented something 
similar. Author of this patch added some statistics to share_info structure, 
and updated them in the netback driver. Iâd like to do something similar.

Iâve modified the ubunutâs kernel code to add some statistics to shared_info:

-Iâve modified the shared_info structure in include/xen/interface/xen.h and 
added an array for storing statistics (up to 10 domains):
        unsigned long network_intensity[10]
-Iâve used the EXPORT_SYMBOL macro to make the HYPERVISOR_shared_info available 
in netback driver
- in the driver/net/xen-netback/netback.c file, Iâve modified function 
xenvif_rx_action, so that itâd increment the network intensity counter. Iâve 
also added a printk statement to verify if my code is working
- Iâve updated the shared_info structure in xen source code as well.

After compiling the kernel and booting it, Iâve verified that output from my 
printk statements was visible in the output from dmesg.

However, when I try to access statistics from shared_info in Xen scheduler, 
theyâre always 0.

Could you please tell me what am I doing wrong? Do I have to somehow request 
synchronisation of the shared_info between kernel and Xen?
Or maybe is there some better way to get data on network intensity without 
modifying the kernel?

Thank you in advance for you help.

Kind regards,
Marcin DÅugajczyk

[1]: http://csl.cse.psu.edu/?q=node/54
Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.