public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: Fengguang Wu <fengguang.wu@intel.com>,
	Jens Axboe <axboe@kernel.dk>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH block/for-3.4/core] cfq: fix cfqg ref handling when BLK_CGROUP && !CFQ_GROUP_IOSCHED
Date: Thu, 15 Mar 2012 09:50:57 -0700	[thread overview]
Message-ID: <20120315165057.GB32137@google.com> (raw)
In-Reply-To: <20120315164621.GD3253@redhat.com>

Hello,

On Thu, Mar 15, 2012 at 12:46:21PM -0400, Vivek Goyal wrote:
> On Thu, Mar 15, 2012 at 09:35:46AM -0700, Tejun Heo wrote:
> 
> [..]
> > ---
> > Yeap, forgot to test that config combination.  Fengguang, can you
> > please test this patch?  Jens, once Fengguang confirms the fix, can
> > you please apply this on top of for-3.4/core along with the pending
> > stats updates?
> 
> I was working on similar patch and you beat me to it. :-) One comment
> below.

:)

> [..]
> > @@ -3533,7 +3551,7 @@ static int cfq_init_queue(struct request
> >  
> >  	spin_lock_irq(q->queue_lock);
> >  	cfq_link_cfqq_cfqg(&cfqd->oom_cfqq, cfqd->root_group);
> > -	blkg_put(cfqg_to_blkg(cfqd->root_group));
> > +	cfqg_put(cfqd->root_group);
> 
> This seems to be a spurious cfqg_put()? Which reference we are putting
> down here?

The extra ref from cfq_link_cfqq_cfqg() for oom_cfqq; otherwise, we
need an extra cfq_put() in cfq_exit_queue().  I thought I wrote
comment about that somewhere.  Hmmm.... apparently not.  The thing is
that oom_cfqq doesn't go through proper cfqq destruction and thus
never puts the extra ref to root cfqg.

Thanks.

-- 
tejun

  reply	other threads:[~2012-03-15 16:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-15  9:49 NULL dereference BUG in cfq_init_queue() Fengguang Wu
2012-03-15 16:35 ` [PATCH block/for-3.4/core] cfq: fix cfqg ref handling when BLK_CGROUP && !CFQ_GROUP_IOSCHED Tejun Heo
2012-03-15 16:46   ` Vivek Goyal
2012-03-15 16:50     ` Tejun Heo [this message]
2012-03-15 17:01       ` Vivek Goyal
2012-03-15 17:18         ` Tejun Heo
2012-03-16  4:20   ` Fengguang Wu
2012-03-23 13:04   ` 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=20120315165057.GB32137@google.com \
    --to=tj@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=fengguang.wu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vgoyal@redhat.com \
    /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