From: Vivek Goyal <vgoyal@redhat.com>
To: Tejun Heo <tj@kernel.org>
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 13:01:00 -0400 [thread overview]
Message-ID: <20120315170100.GF3253@redhat.com> (raw)
In-Reply-To: <20120315165057.GB32137@google.com>
On Thu, Mar 15, 2012 at 09:50:57AM -0700, Tejun Heo wrote:
> > [..]
> > > @@ -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.
Ok. Is cfq_exit_queue() a better place to put down this reference
explicitly with a comment. Even if you keep it here, atleast a comment
is required. It is not obvious at all (atleast to me).
Thanks
Vivek
next prev parent reply other threads:[~2012-03-15 17:01 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
2012-03-15 17:01 ` Vivek Goyal [this message]
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=20120315170100.GF3253@redhat.com \
--to=vgoyal@redhat.com \
--cc=axboe@kernel.dk \
--cc=fengguang.wu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.