From: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
To: Yoshihiro Shimoda
<yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
Cc: axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org,
linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-block-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
wsa+renesas-jBu1N2QxHDJrcw3mvpCnnVaTQe2KTcn/@public.gmane.org,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
hch-jcswGhMUV9g@public.gmane.org
Subject: Re: [RFC PATCH v6 5/5] mmc: queue: Use bigger segments if IOMMU can merge the segments
Date: Fri, 14 Jun 2019 09:24:59 +0200 [thread overview]
Message-ID: <20190614072459.GD8420@lst.de> (raw)
In-Reply-To: <1560421215-10750-6-git-send-email-yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
On Thu, Jun 13, 2019 at 07:20:15PM +0900, Yoshihiro Shimoda wrote:
> +static unsigned int mmc_get_max_segments(struct mmc_host *host)
> +{
> + return host->can_merge ? BLK_MAX_SEGMENTS : host->max_segs;
> +}
Note that BLK_MAX_SEGMENTS is really a little misnamed, it just
is a BLK_DEFAULT_SEGMENTS. I think you are better of picking your
own value here (even if 128 ends up ok) than reusing this somewhat
confusing constant.
> + /*
> + * Since blk_mq_alloc_tag_set() calls .init_request() of mmc_mq_ops,
> + * the host->can_merge should be set before to get max_segs from
> + * mmc_get_max_segments().
> + */
> + if (host->max_segs < BLK_MAX_SEGMENTS &&
> + device_iommu_mapped(mmc_dev(host)))
> + host->can_merge = 1;
> + else
> + host->can_merge = 0;
> +
can_merge seems a little too generic a name to me. Maybe can_iommu_merge?
next prev parent reply other threads:[~2019-06-14 7:24 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-13 10:20 [RFC PATCH v6 0/5] treewide: improve R-Car SDHI performance Yoshihiro Shimoda
[not found] ` <1560421215-10750-1-git-send-email-yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2019-06-13 10:20 ` [RFC PATCH v6 1/5] iommu: add an exported function to get minimum page size for a domain Yoshihiro Shimoda
[not found] ` <1560421215-10750-2-git-send-email-yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2019-06-13 19:37 ` Wolfram Sang
2019-06-14 7:16 ` Christoph Hellwig
2019-06-17 5:08 ` Yoshihiro Shimoda
2019-06-14 9:41 ` Robin Murphy
[not found] ` <5e295ec3-39c9-de8a-a649-0aeeb0078ae3-5wv7dgnIgG8@public.gmane.org>
2019-06-17 5:23 ` Yoshihiro Shimoda
2019-06-13 10:20 ` [RFC PATCH v6 2/5] block: sort headers on blk-setting.c Yoshihiro Shimoda
[not found] ` <1560421215-10750-3-git-send-email-yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2019-06-13 19:40 ` Wolfram Sang
2019-06-13 10:20 ` [RFC PATCH v6 3/5] block: add a helper function to merge the segments by an IOMMU Yoshihiro Shimoda
[not found] ` <1560421215-10750-4-git-send-email-yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2019-06-14 7:22 ` Christoph Hellwig
2019-06-14 9:54 ` Robin Murphy
[not found] ` <039d7388-ed24-c7e7-dd6a-656c719a5ed9-5wv7dgnIgG8@public.gmane.org>
2019-06-17 6:29 ` Yoshihiro Shimoda
2019-06-13 10:20 ` [RFC PATCH v6 4/5] mmc: tmio: Use dma_max_mapping_size() instead of a workaround Yoshihiro Shimoda
[not found] ` <1560421215-10750-5-git-send-email-yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2019-06-13 19:45 ` Wolfram Sang
2019-06-17 4:25 ` Yoshihiro Shimoda
2019-06-13 20:35 ` Geert Uytterhoeven
[not found] ` <CAMuHMdXYqgPRX1WfUTRsKHhnSok5vfnr4AY36=vXoUvAxcNyWQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-06-14 7:18 ` Christoph Hellwig
[not found] ` <20190614071800.GB8420-jcswGhMUV9g@public.gmane.org>
2019-06-14 7:27 ` Geert Uytterhoeven
[not found] ` <CAMuHMdXm5RtDUL5Wkyd6aJihu9nykYOhRf7vN6hOtB-OO8CTQQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-06-17 4:54 ` Yoshihiro Shimoda
[not found] ` <OSBPR01MB3590D4EF069F4554DA5D7ABBD8EB0-zhdMvvdcU0ZkIAJEWnuByncolHNk5qUtvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2019-06-17 6:23 ` Geert Uytterhoeven
[not found] ` <CAMuHMdWPUZGFWeKzPK=zkwc5h2SD+aW6ULb8C2rDJSmTWNXjeA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-06-17 6:54 ` Yoshihiro Shimoda
2019-06-13 10:20 ` [RFC PATCH v6 5/5] mmc: queue: Use bigger segments if IOMMU can merge the segments Yoshihiro Shimoda
[not found] ` <1560421215-10750-6-git-send-email-yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2019-06-13 19:58 ` Wolfram Sang
2019-06-17 6:38 ` Yoshihiro Shimoda
2019-06-14 7:24 ` Christoph Hellwig [this message]
[not found] ` <20190614072459.GD8420-jcswGhMUV9g@public.gmane.org>
2019-06-14 10:42 ` Wolfram Sang
2019-06-17 6:46 ` Yoshihiro Shimoda
[not found] ` <OSBPR01MB3590FA5DB10D9EF34F551335D8EB0-zhdMvvdcU0ZkIAJEWnuByncolHNk5qUtvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2019-06-17 6:53 ` Christoph Hellwig
[not found] ` <20190617065331.GA5456-jcswGhMUV9g@public.gmane.org>
2019-06-17 7:02 ` Yoshihiro Shimoda
2019-06-13 19:36 ` [RFC PATCH v6 0/5] treewide: improve R-Car SDHI performance Wolfram Sang
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=20190614072459.GD8420@lst.de \
--to=hch-jcswghmuv9g@public.gmane.org \
--cc=axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=linux-block-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=wsa+renesas-jBu1N2QxHDJrcw3mvpCnnVaTQe2KTcn/@public.gmane.org \
--cc=yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.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;
as well as URLs for NNTP newsgroup(s).