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: <4A88EACC.6010805@cn.fujitsu.com>
Date:	Mon, 17 Aug 2009 13:29:48 +0800
From:	Gui Jianfeng <guijianfeng@...fujitsu.com>
To:	Vivek Goyal <vgoyal@...hat.com>
CC:	linux-kernel@...r.kernel.org,
	containers@...ts.linux-foundation.org, dm-devel@...hat.com,
	jens.axboe@...cle.com, ryov@...inux.co.jp,
	balbir@...ux.vnet.ibm.com, righi.andrea@...il.com,
	nauman@...gle.com, dpshah@...gle.com, lizf@...fujitsu.com,
	mikew@...gle.com, fchecconi@...il.com, paolo.valente@...more.it,
	fernando@....ntt.co.jp, s-uchida@...jp.nec.com, taka@...inux.co.jp,
	jmoyer@...hat.com, dhaval@...ux.vnet.ibm.com,
	m-ikeda@...jp.nec.com, agk@...hat.com, akpm@...ux-foundation.org,
	peterz@...radead.org, jmarchan@...hat.com
Subject: Re: [PATCH 02/24] io-controller: Core of the elevator fair queuing

Vivek Goyal wrote:
...
> +static void place_entity(struct io_service_tree *st, struct io_entity *entity,
> +				int add_front)
> +{
> +	u64 vdisktime = st->min_vdisktime;
> +	struct rb_node *parent;
> +	struct io_entity *entry;
> +	int nr_active = st->nr_active - 1;
> +
> +	/*
> +	 * Currently put entity at the end of last entity. This probably will
> +	 * require adjustments as we move along
> +	 */
> +	if (io_entity_class_idle(entity)) {
> +		vdisktime = elv_delta_fair(ELV_IDLE_DELAY, entity);
> +		parent = rb_last(&st->active);
> +		if (parent) {
> +			entry = rb_entry(parent, struct io_entity, rb_node);
> +			vdisktime += entry->vdisktime;
> +		}
> +	} else if (!add_front && nr_active) {
> +		parent = rb_last(&st->active);
> +		if (parent) {
> +			entry = rb_entry(parent, struct io_entity, rb_node);
> +			vdisktime = entry->vdisktime;
> +		}
> +	} else
> +		vdisktime = st->min_vdisktime;

Hi Vivek,

Should we set vdisktime a little small than st->min_vdisktime to ensure putting
this entity at the left-most position when add_front is set?

> +
> +	entity->vdisktime = max_vdisktime(st->min_vdisktime, vdisktime);
> +}
> +
> +static inline void io_entity_update_prio(struct io_entity *entity)
> +{
> +	if (unlikely(entity->ioprio_changed)) {
> +		/*
> +		 * Re-initialize the service tree as ioprio class of the
> +		 * entity might have changed.
> +		 */
> +		init_io_entity_service_tree(entity, parent_entity(entity));
> +		entity->ioprio_changed = 0;
> +	}
> +}
> +


-- 
Regards
Gui Jianfeng

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