All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: Corrado Zoccolo <czoccolo@gmail.com>
Cc: Linux-Kernel <linux-kernel@vger.kernel.org>,
	Jeff Moyer <jmoyer@redhat.com>
Subject: Re: [RFC PATCH 3/5] cfq-iosched: reimplement priorities using different service trees
Date: Tue, 20 Oct 2009 02:58:14 +0200	[thread overview]
Message-ID: <20091020005813.GD10727@kernel.dk> (raw)
In-Reply-To: <200910192221.23564.czoccolo@gmail.com>

On Mon, Oct 19 2009, Corrado Zoccolo wrote:
> We use different service trees for different priority classes.
> This allows a simplification in the service tree insertion code, that no
> longer has to consider priority while walking the tree.

> +enum wl_prio_t {
> +	IDLE_WL = -1,
> +	BE_WL = 0,
> +	RT_WL = 1
> +};

WL?

> +static struct cfq_rb_root *service_tree_for(enum wl_prio_t prio,
> +					struct cfq_data *cfqd)
> +{
> +	return prio == IDLE_WL ? &cfqd->service_tree_idle :
> +		&cfqd->service_trees[prio];
> +}

Don't do it...

static struct cfq_rb_root *service_tree_for(enum wl_prio_t prio,
					struct cfq_data *cfqd)
{
        if (prio == IDLE_WL)
                return &cfqd->service_tree_idle;

        return &cfqd->service_trees[prio];
}

much cleaner. There are more of these in this patch.

Otherwise it looks sane, and I agree that making the insert cleaner here
is a good bonus.

-- 
Jens Axboe


  reply	other threads:[~2009-10-20  0:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-19 20:21 [RFC PATCH 3/5] cfq-iosched: reimplement priorities using different service trees Corrado Zoccolo
2009-10-20  0:58 ` Jens Axboe [this message]
2009-10-20 10:43   ` Corrado Zoccolo
2009-10-20 13:19     ` 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=20091020005813.GD10727@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=czoccolo@gmail.com \
    --cc=jmoyer@redhat.com \
    --cc=linux-kernel@vger.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.