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: <4e5e476b0912050313k280caa8bjf7c2cf1c5d19c88c@mail.gmail.com>
Date:	Sat, 5 Dec 2009 12:13:37 +0100
From:	Corrado Zoccolo <czoccolo@...il.com>
To:	Linux-Kernel <linux-kernel@...r.kernel.org>,
	Jens Axboe <jens.axboe@...cle.com>,
	Jeff Moyer <jmoyer@...hat.com>, Vivek Goyal <vgoyal@...hat.com>
Subject: Re: [PATCH] cfq-iosched: reduce write depth only if sync was delayed

On Fri, Dec 4, 2009 at 1:35 PM, Corrado Zoccolo <czoccolo@...il.com> wrote:
> The introduction of ramp-up formula for async queue depths has
> slowed down dirty page reclaim, by reducing async write performance.
> This patch makes sure the formula kicks in only when sync request
> was recently delayed.
>
> Signed-off-by: Corrado Zoccolo <czoccolo@...il.com>
> ---
>  block/cfq-iosched.c |    9 +++++----
>  1 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
> index b00ca4c..a594388 100644
> --- a/block/cfq-iosched.c
> +++ b/block/cfq-iosched.c
> @@ -284,7 +284,7 @@ struct cfq_data {
>         */
>        struct cfq_queue oom_cfqq;
>
> -       unsigned long last_end_sync_rq;
> +       unsigned long last_delayed_sync;
>
>        /* List of cfq groups being managed on this device*/
>        struct hlist_head cfqg_list;
> @@ -2264,7 +2264,7 @@ static bool cfq_may_dispatch(struct cfq_data *cfqd,
> struct cfq_queue *cfqq)
>         * based on the last sync IO we serviced
>         */
>        if (!cfq_cfqq_sync(cfqq) && cfqd->cfq_latency) {
> -               unsigned long last_sync = jiffies - cfqd->last_end_sync_rq;
> +               unsigned long last_sync = jiffies - cfqd->last_delayed_sync;
>                unsigned int depth;
>
>                depth = last_sync / cfqd->cfq_slice[1];
> @@ -3272,7 +3272,8 @@ static void cfq_completed_request(struct request_queue
> *q, struct request *rq)
>
>        if (sync) {
>                RQ_CIC(rq)->last_end_request = now;
> -               cfqd->last_end_sync_rq = now;
> +               if (time_after(rq->start_time + cfqd->cfq_fifo_expire[1], now))
> +                       cfqd->last_delayed_sync = now;

Sorry, the check be reversed (!time_after).

>        }
>
>        /*
> @@ -3706,7 +3707,7 @@ static void *cfq_init_queue(struct request_queue *q)
>        cfqd->cfq_latency = 1;
>        cfqd->cfq_group_isolation = 0;
>        cfqd->hw_tag = -1;
> -       cfqd->last_end_sync_rq = jiffies;
> +       cfqd->last_delayed_sync = jiffies - HZ;
>        return cfqd;
>  }
>
> --
> 1.6.2.5
>
>
>
>
--
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