Re: [PATCH-RFC] cfq: Disable low_latency by default for 2.6.32

KOSAKI Motohiro
2009-11-27T06:29:14Z

> Instead, PF_MEMALLOC is good idea?

This patch was obviously wrong. please forget it. i'm sorry.

>
>
> Subject: [PATCH] cfq: Do not limit the async queue depth while memory reclaim
>
> Not-Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> (I haven't test this)
> ---
> block/cfq-iosched.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
> index aa1e953..9546f64 100644
> --- a/block/cfq-iosched.c
> +++ b/block/cfq-iosched.c
> @@ -1308,7 +1308,8 @@ static bool cfq_may_dispatch(struct cfq_data *cfqd, struct cfq_queue *cfqq)
> * We also ramp up the dispatch depth gradually for async IO,
> * based on the last sync IO we serviced
> */
> - if (!cfq_cfqq_sync(cfqq) && cfqd->cfq_latency) {
> + if (!cfq_cfqq_sync(cfqq) && cfqd->cfq_latency &&
> + !(current->flags & PF_MEMALLOC)) {
> unsigned long last_sync = jiffies - cfqd->last_end_sync_rq;
> unsigned int depth;
>
> --
> 1.6.5.2