OpenVZ Forum


Home » Mailing lists » Devel » [PATCH O/4] Block I/O tracking
[PATCH 4/4] Block I/O tracking [message #28430 is a reply to message #28426] Tue, 18 March 2008 09:31 Go to previous messageGo to previous message
Hirokazu Takahashi is currently offline  Hirokazu Takahashi
Messages: 18
Registered: January 2008
Junior Member
Hi,

With this patch, dm-ioband can work with the bio cgroup.


Signed-off-by: Hirokazu Takahashi <taka@valinux.co.jp>


--- linux-2.6.25-rc3.ioload/drivers/md/dm-ioband-type.c	2008-03-13 22:27:45.000000000 +0900
+++ linux-2.6.25-rc3-mm1/drivers/md/dm-ioband-type.c	2008-03-17 15:57:32.000000000 +0900
@@ -6,6 +6,7 @@
  * This file is released under the GPL.
  */
 #include <linux/bio.h>
+#include <linux/biocontrol.h>
 #include "dm.h"
 #include "dm-bio-list.h"
 #include "dm-ioband.h"
@@ -57,13 +58,7 @@ static int ioband_node(struct bio *bio)
 
 static int ioband_cgroup(struct bio *bio)
 {
-  /*
-   * This function should return the ID of the cgroup which issued "bio".
-   * The ID of the cgroup which the current process belongs to won't be
-   * suitable ID for this purpose, since some BIOs will be handled by kernel
-   * threads like aio or pdflush on behalf of the process requesting the BIOs.
-   */
-	return 0;	/* not implemented yet */
+	return get_bio_cgroup_id(bio->bi_io_vec[0].bv_page);
 }
 
 struct group_type dm_ioband_group_type[] = {
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [PATCH] cgroups: implement device whitelist (v4)
Next Topic: Announcement : Enomalism 2.0 Alpha Released
Goto Forum:
  


Current Time: Thu Aug 15 16:24:33 GMT 2024

Total time taken to generate the page: 0.02787 seconds