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]
Message-ID: <1258481265.6084.293.camel@cail>
Date:	Tue, 17 Nov 2009 13:07:45 -0500
From:	"Alan D. Brunelle" <Alan.Brunelle@...com>
To:	Vivek Goyal <vgoyal@...hat.com>
Cc:	linux-kernel@...r.kernel.org, jens.axboe@...cle.com,
	nauman@...gle.com, dpshah@...gle.com, lizf@...fujitsu.com,
	ryov@...inux.co.jp, fernando@....ntt.co.jp, s-uchida@...jp.nec.com,
	taka@...inux.co.jp, guijianfeng@...fujitsu.com, jmoyer@...hat.com,
	balbir@...ux.vnet.ibm.com, righi.andrea@...il.com,
	m-ikeda@...jp.nec.com, akpm@...ux-foundation.org, riel@...hat.com,
	kamezawa.hiroyu@...fujitsu.com, czoccolo@...il.com
Subject: Re: [PATCH 06/16] blkio: Introduce per cfq group weights and
 vdisktime calculations

On Fri, 2009-11-13 at 12:40 -0500, Vivek Goyal wrote:

> +
> +static inline u64 max_vdisktime(u64 min_vdisktime, u64 vdisktime)
> +{
> +	s64 delta = (s64)(vdisktime - min_vdisktime);
> +	if (delta > 0)
> +		min_vdisktime = vdisktime;
> +
> +	return min_vdisktime;
> +}
> +
> +static inline u64 min_vdisktime(u64 min_vdisktime, u64 vdisktime)
> +{
> +	s64 delta = (s64)(vdisktime - min_vdisktime);
> +	if (delta < 0)
> +		min_vdisktime = vdisktime;
> +
> +	return min_vdisktime;
> +}
> +
> +static void update_min_vdisktime(struct cfq_rb_root *st)
> +{
> +	u64 vdisktime = st->min_vdisktime;
> +	struct cfq_group *cfqg;
> +
> +	if (st->active) {
> +		cfqg = rb_entry(st->active, struct cfq_group, rb_node);
> +		vdisktime = cfqg->vdisktime;
> +	}
> +
> +	if (st->left) {
> +		cfqg = rb_entry(st->left, struct cfq_group, rb_node);
> +		vdisktime = min_vdisktime(vdisktime, cfqg->vdisktime);
> +	}
> +
> +	st->min_vdisktime = max_vdisktime(st->min_vdisktime, vdisktime);
> +}

Any reason why you don't use min_t(u64, vdisktime, cfqg->vdisktime) and
max_t(u64, st->min_vdisktime, vdisktime)) here?

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ