diff mbox

Re: [PATCH 17/19] io-controller: Support per cgroup per device weights and io class

Message ID 4A2F646A.8070403@cn.fujitsu.com (mailing list archive)
State New, archived
Headers show

Commit Message

Gui Jianfeng June 10, 2009, 7:44 a.m. UTC
Vivek Goyal wrote:
...
>  
> @@ -1233,6 +1254,8 @@ struct io_group *io_group_chain_alloc(struct request_queue *q, void *key,
>  		elv_get_iog(iog);
>  
>  		iog->iocg_id = css_id(&iocg->css);
> +		io_group_init_entity(iocg, iog, iog->dev);

Hi Vivek,

A regression occurs in io.policy handling. IO Controller completely stops working when i use 
this interface. 
Make sure that we initialize entity after iog->dev is setting up properly.

Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
---
 block/elevator-fq.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Comments

Vivek Goyal June 10, 2009, 1:22 p.m. UTC | #1
On Wed, Jun 10, 2009 at 03:44:42PM +0800, Gui Jianfeng wrote:
> Vivek Goyal wrote:
> ...
> >  
> > @@ -1233,6 +1254,8 @@ struct io_group *io_group_chain_alloc(struct request_queue *q, void *key,
> >  		elv_get_iog(iog);
> >  
> >  		iog->iocg_id = css_id(&iocg->css);
> > +		io_group_init_entity(iocg, iog, iog->dev);
> 
> Hi Vivek,
> 
> A regression occurs in io.policy handling. IO Controller completely stops working when i use 
> this interface. 
> Make sure that we initialize entity after iog->dev is setting up properly.
> 

Thanks Gui. Will do in next posting.

Thanks
Vivek

> Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
> ---
>  block/elevator-fq.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/block/elevator-fq.c b/block/elevator-fq.c
> index 6b30c36..a516dce 100644
> --- a/block/elevator-fq.c
> +++ b/block/elevator-fq.c
> @@ -1451,7 +1451,6 @@ struct io_group *io_group_chain_alloc(struct request_queue *q, void *key,
>  		elv_get_iog(iog);
>  
>  		iog->iocg_id = css_id(&iocg->css);
> -		io_group_init_entity(iocg, iog, iog->dev);
>  		iog->my_entity = &iog->entity;
>  
>  		if (bio) {
> @@ -1459,6 +1458,8 @@ struct io_group *io_group_chain_alloc(struct request_queue *q, void *key,
>  			iog->dev = MKDEV(disk->major, disk->first_minor);
>  		}
>  
> +		io_group_init_entity(iocg, iog, iog->dev);
> +
>  		blk_init_request_list(&iog->rl);
>  #ifdef CONFIG_DEBUG_GROUP_IOSCHED
>  		io_group_path(iog, iog->path, sizeof(iog->path));
> -- 
> 1.5.4.rc3

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
diff mbox

Patch

diff --git a/block/elevator-fq.c b/block/elevator-fq.c
index 6b30c36..a516dce 100644
--- a/block/elevator-fq.c
+++ b/block/elevator-fq.c
@@ -1451,7 +1451,6 @@  struct io_group *io_group_chain_alloc(struct request_queue *q, void *key,
 		elv_get_iog(iog);
 
 		iog->iocg_id = css_id(&iocg->css);
-		io_group_init_entity(iocg, iog, iog->dev);
 		iog->my_entity = &iog->entity;
 
 		if (bio) {
@@ -1459,6 +1458,8 @@  struct io_group *io_group_chain_alloc(struct request_queue *q, void *key,
 			iog->dev = MKDEV(disk->major, disk->first_minor);
 		}
 
+		io_group_init_entity(iocg, iog, iog->dev);
+
 		blk_init_request_list(&iog->rl);
 #ifdef CONFIG_DEBUG_GROUP_IOSCHED
 		io_group_path(iog, iog->path, sizeof(iog->path));