lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 20 Oct 2009 02:58:14 +0200
From:	Jens Axboe <jens.axboe@...cle.com>
To:	Corrado Zoccolo <czoccolo@...il.com>
Cc:	Linux-Kernel <linux-kernel@...r.kernel.org>,
	Jeff Moyer <jmoyer@...hat.com>
Subject: Re: [RFC PATCH 3/5] cfq-iosched: reimplement priorities using
	different service trees

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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists