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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A713E10.2030204@cn.fujitsu.com>
Date:	Thu, 30 Jul 2009 14:30:40 +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, nauman@...gle.com, dpshah@...gle.com,
	ryov@...inux.co.jp, balbir@...ux.vnet.ibm.com,
	righi.andrea@...il.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
Subject: Re: [PATCH 05/24] io-controller: Modify cfq to make use of flat elevator
 fair queuing

Vivek Goyal wrote:
...
>  /*
>   * Check if new_cfqq should preempt the currently active queue. Return 0 for
> - * no or if we aren't sure, a 1 will cause a preempt.
> + * no or if we aren't sure, a 1 will cause a preemption attempt.
> + * Some of the preemption logic has been moved to common layer. Only cfq
> + * specific parts are left here.
>   */
>  static int
> -cfq_should_preempt(struct cfq_data *cfqd, struct cfq_queue *new_cfqq,
> -		   struct request *rq)
> +cfq_should_preempt(struct request_queue *q, void *new_cfqq, struct request *rq)
>  {
> -	struct cfq_queue *cfqq;
> +	struct cfq_data *cfqd = q->elevator->elevator_data;
> +	struct cfq_queue *cfqq = elv_active_sched_queue(q->elevator);
>  
> -	cfqq = cfqd->active_queue;
>  	if (!cfqq)
>  		return 0;
>  
> -	if (cfq_slice_used(cfqq))
> +	if (elv_ioq_slice_used(cfqq->ioq))
>  		return 1;
>  
>  	if (cfq_class_idle(new_cfqq))
> @@ -2018,13 +1661,7 @@ cfq_should_preempt(struct cfq_data *cfqd, struct cfq_queue *new_cfqq,
>  	if (rq_is_meta(rq) && !cfqq->meta_pending)
>  		return 1;
>  
> -	/*
> -	 * Allow an RT request to pre-empt an ongoing non-RT cfqq timeslice.
> -	 */
> -	if (cfq_class_rt(new_cfqq) && !cfq_class_rt(cfqq))
> -		return 1;
> -
> -	if (!cfqd->active_cic || !cfq_cfqq_wait_request(cfqq))
> +	if (!cfqd->active_cic || !elv_ioq_wait_request(cfqq->ioq))
>  		return 0;
>  
>  	/*

Hi Vivek,

cfq_should_preempt() will do the check "if (cfq_rq_close(cfqd, rq)) to see whether
it should preempt the current cfqq. From fairness point of view,  should we also 
check "fairness" value, if it's set fairness == 1, don't allow to preempt the current
cfqq?


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