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]
Date:	Wed, 10 Jun 2015 11:47:27 +0900
From:	Tejun Heo <tj@...nel.org>
To:	Jeff Moyer <jmoyer@...hat.com>
Cc:	axboe@...nel.dk, linux-kernel@...r.kernel.org,
	cgroups@...r.kernel.org, vgoyal@...hat.com,
	avanzini.arianna@...il.com
Subject: Re: [PATCH 7/8] cfq-iosched: fold cfq_find_alloc_queue() into
 cfq_get_queue()

Hey, Jeff.

On Tue, Jun 09, 2015 at 10:40:02AM -0400, Jeff Moyer wrote:
> The resulting code (introduced by the last patch, I know) is not ideal:
> 
>         rcu_read_lock();
>         cfqg = cfq_lookup_create_cfqg(cfqd, bio_blkcg(bio));
>         if (!cfqg) {
>                 cfqq = &cfqd->oom_cfqq;
>                 goto out;
>         }
> 
>         if (!is_sync) {
>                 if (!ioprio_valid(cic->ioprio)) {
>                         struct task_struct *tsk = current;
>                         ioprio = task_nice_ioprio(tsk);
>                         ioprio_class = task_nice_ioclass(tsk);
>                 }
>                 async_cfqq = cfq_async_queue_prio(cfqd, ioprio_class,
>                 ioprio);
>                 cfqq = *async_cfqq;
>                 if (cfqq)
>                         goto out;
>         }
> 
> As you mentioned, we don't need to lookup the cfqg for the async queue.
> What's more is we could fallback to the oom_cfqq even if we had an
> existing async cfqq.  I'm guessing you structured the code this way to
> make the error path cleaner.  I don't think it's a big deal, as it
> should be a rare occurrence, so...

In this patch, the lookup seems unnecessary for the async case but the
change is required for the following changes because async queues are
moved from cfq_data to cfq_group, so we can't determine async queues
w/o looking up cfqg at all and we'll have to fall back to oom_cfqq if
cfqg lookup fails (cuz there's no system-wide async queues).

Thanks.

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