From: Tejun Heo <tj@kernel.org>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Kevin Hao <haokexin@gmail.com>,
IDE/ATA development list <linux-ide@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] libata: introduce ata_host_set_queue_depth()
Date: Mon, 7 Jul 2014 16:06:10 -0400 [thread overview]
Message-ID: <20140707200610.GA1283@mtj.dyndns.org> (raw)
In-Reply-To: <CAPcyv4gLb6i5PSi9_uxHv-UQA8-w=a55eOP1GtkXmvTzY5P+7A@mail.gmail.com>
On Mon, Jul 07, 2014 at 11:19:25AM -0700, Dan Williams wrote:
> This change may cause the compiler to do a full divide where
> previously it could optimize to power-of-2 math with the visibility of
> the ATA_MAX_QUEUE constant. How about converting
> ap->host->queue_depth to ap->host->queue_depth_mask? ...then this
> becomes:
>
> tag = (i + ap->last_tag + 1) & max_queue_mask
Given how inefficient the test_and_set bit is, I don't think a single
moduls matters. Plus, we don't even need modulus there. We can
simply use >= max_depth.
Thanks.
--
tejun
next prev parent reply other threads:[~2014-07-07 20:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-06 6:28 [PATCH v2 0/2] libata: support the ata host which implements a queue depth less than 32 Kevin Hao
2014-07-06 6:28 ` [PATCH v2 1/2] libata: introduce ata_host_set_queue_depth() Kevin Hao
2014-07-07 13:49 ` Tejun Heo
2014-07-08 2:58 ` Kevin Hao
2014-07-07 18:19 ` Dan Williams
2014-07-07 20:06 ` Tejun Heo [this message]
2014-07-07 20:56 ` Dan Williams
2014-07-08 2:41 ` Kevin Hao
2014-07-06 6:28 ` [PATCH v2 2/2] sata_fsl: set the correct queue depth for the host controller Kevin Hao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140707200610.GA1283@mtj.dyndns.org \
--to=tj@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=haokexin@gmail.com \
--cc=linux-ide@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox