From: Jeff Moyer <jmoyer@redhat.com>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: Andi Kleen <ak@linux.intel.com>, Jens Axboe <axboe@kernel.dk>,
Andi Kleen <andi@firstfloor.org>,
torvalds@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix array overflow in CFQ
Date: Thu, 21 Oct 2010 12:53:39 -0400 [thread overview]
Message-ID: <x49fwvz1o8c.fsf@segfault.boston.devel.redhat.com> (raw)
In-Reply-To: <20101019150516.GE857@redhat.com> (Vivek Goyal's message of "Tue, 19 Oct 2010 11:05:16 -0400")
Vivek Goyal <vgoyal@redhat.com> writes:
> On Tue, Oct 19, 2010 at 03:23:22PM +0200, Andi Kleen wrote:
>>
>> > slice = group_slice * count /
>> > max_t(unsigned, cfqg->busy_queues_avg[cfqd->serving_prio],
>> > cfq_group_busy_queues_wl(cfqd->serving_prio, cfqd,
>> >cfqg));
>> >
>> >So for IDLE class, we return immediately from the function and never
>> >execute cfqg->busy_queues_avg[IDLE].
>>
>> Hmm that's true. But why do you put this into a global variable
>> anyways, can't it
>> just be a local?
>
> We keep track of average number of queues per group per prio class. So it
> can't be local as it historical data.
>
>> >Now to remove the gcc warning we can increase the size of busy_queues_avg[]
>> >array but third field should always remain unused.
>> >
>> It's better to increase the field still I think.
>
> Agreed.
>
> Jens, do you want me to regenerate your patch so that we increase the
> size of ->busy_queues_avg[CFQ_PRIO_NR] but not ->service_trees[][].
Just be sure to put a huge comment in there so you don't confuse the
poor masses trying to make sense of the code.
Cheers,
Jeff
next prev parent reply other threads:[~2010-10-21 16:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-19 9:10 Andi Kleen
2010-10-19 10:01 ` Jens Axboe
2010-10-19 11:49 ` Vivek Goyal
2010-10-19 11:55 ` Jens Axboe
2010-10-19 12:33 ` Vivek Goyal
2010-10-19 13:23 ` Andi Kleen
2010-10-19 15:05 ` Vivek Goyal
2010-10-21 16:53 ` Jeff Moyer [this message]
2010-10-21 17:16 ` Andi Kleen
2010-10-21 17:15 ` Jeff Moyer
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=x49fwvz1o8c.fsf@segfault.boston.devel.redhat.com \
--to=jmoyer@redhat.com \
--cc=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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
all inboxes | Powered by JetHome®