linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Jens Axboe <jaxboe@fusionio.com>,
	linux kernel mailing list <linux-kernel@vger.kernel.org>
Cc: Paul Bolle <pebolle@tiscali.nl>
Subject: [PATCH] blk-cgroup: Initialize ioc->cgroup_changed at ioc creation time
Date: Mon, 23 May 2011 10:55:39 -0400	[thread overview]
Message-ID: <20110523145539.GA4019@redhat.com> (raw)

If we don't explicitly initialize it to zero, CFQ might think that
cgroup of ioc has changed and it generates lots of unnecessary calls
to call_for_each_cic(changed_cgroup). Fix it.

cfq_get_io_context()
  cfq_ioc_set_cgroup()
     call_for_each_cic(ioc, changed_cgroup)

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
---
 block/blk-ioc.c |    3 +++
 1 file changed, 3 insertions(+)

Index: linux-2.6-block/block/blk-ioc.c
===================================================================
--- linux-2.6-block.orig/block/blk-ioc.c	2011-03-08 09:40:58.057296008 -0500
+++ linux-2.6-block/block/blk-ioc.c	2011-05-23 10:33:51.875994035 -0400
@@ -96,6 +96,9 @@ struct io_context *alloc_io_context(gfp_
 		INIT_RADIX_TREE(&ret->radix_root, GFP_ATOMIC | __GFP_HIGH);
 		INIT_HLIST_HEAD(&ret->cic_list);
 		ret->ioc_data = NULL;
+#if defined(CONFIG_BLK_CGROUP) || defined(CONFIG_BLK_CGROUP_MODULE)
+		ret->cgroup_changed = 0;
+#endif
 	}
 
 	return ret;

             reply	other threads:[~2011-05-23 14:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-23 14:55 Vivek Goyal [this message]
2011-05-23 17:35 ` [PATCH] blk-cgroup: Initialize ioc->cgroup_changed at ioc creation time Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110523145539.GA4019@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=jaxboe@fusionio.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pebolle@tiscali.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).