All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: "Steven J. Hill" <Steven.Hill@cavium.com>,
	Pierre Ossman <pierre@ossman.eu>,
	Vinod Koul <vinod.koul@intel.com>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	linux-block@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
	Christoph Hellwig <hch@lst.de>, Arnd Bergmann <arnd@arndb.de>,
	Paolo Valente <paolo.valente@linaro.org>,
	Daniel Mack <daniel@zonque.org>,
	Marc Zyngier <marc.zyngier@arm.com>
Subject: Re: [RFC PATCH] mmc: core: Remove CONFIG_MMC_BLOCK_BOUNCE option.
Date: Tue, 23 May 2017 11:05:02 +0200	[thread overview]
Message-ID: <CACRpkdYV2KfyRL6eweie3Yb-Em7L9X6Y3k=SOqO107oUX9MNbw@mail.gmail.com> (raw)
In-Reply-To: <cc8694f6-4955-51d3-6342-107cfbb50ed2@cavium.com>

On Fri, May 19, 2017 at 9:30 AM, Steven J. Hill <Steven.Hill@cavium.com> wrote:

> Remove MMC bounce buffer config option and associated code. This
> is proposed in addition to Linus' changes to remove the config
> option. I have tested this on our Octeon hardware platforms.
>
> Signed-off-by: Steven J. Hill <Steven.Hill@cavium.com>

This would have to be rebased as Ulf merged my patch making this
a per-host runtime config option. (The Kconfig is gone for example.)

Bounce buffers were added by Pierre Ossman for kernel 2.6.23 in
commit 98ccf14909ba02a41c5925b0b2c92aeeef23d3b9
"mmc: bounce requests for simple hosts"

Quote:

    Some hosts cannot do scatter/gather in hardware. Since not doing sg
    is such a big performance hit, we (optionally) bounce the requests
    to a simple linear buffer that we hand over to the driver.

    Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>

So this runs the risk on reducing performance on simple MMC/SD
controllers. Notice: simple, not old.

We need to know if people are deploying simple controllers still
and if this is something that really affects their performance.

That said: this was put in place because the kernel was sending
SG lists that the host DMA could not manage.

Nowadays we have two mechanisms:

- DMA engine and DMA-API that help out in managing bounce
  buffers when used. This means this only is useful for hardware
  that does autonomous DMA, without any separate DMA engine.

- CMA that can actually allocate a big chunk of memory: I think
  this original code is restricted to a 64KB segment because
  kmalloc() will only guarantee contigous physical memory up to
  64-128KiB or so. Now we could actually allocate a big badass
  CMA buffer if that improves the performance, and that would be
  a per-host setting.

It would be good to hear from people seeing benefits from bounce
buffers about this. What hardware is there that acually sees a
significant improvement with bounce buffers?

Pierre, what host were you developing this for? Maybe I can try
to get the same and test it.

Yours,
Linus Walleij

  reply	other threads:[~2017-05-23  9:05 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-10  8:24 [PATCH 0/5] mmc: core: modernize ioctl() requests Linus Walleij
2017-05-10  8:24 ` [PATCH 1/5] mmc: core: Delete bounce buffer Kconfig option Linus Walleij
2017-05-15 11:55   ` Ulf Hansson
2017-05-15 14:04   ` Bartlomiej Zolnierkiewicz
2017-05-18  7:48     ` Linus Walleij
2017-05-19  7:30       ` [RFC PATCH] mmc: core: Remove CONFIG_MMC_BLOCK_BOUNCE option Steven J. Hill
2017-05-23  9:05         ` Linus Walleij [this message]
2017-05-23 10:08           ` Arnd Bergmann
2017-05-23 18:24           ` Pierre Ossman
2017-05-10  8:24 ` [PATCH 2/5] mmc: core: Allocate per-request data using the block layer core Linus Walleij
2017-05-16  9:02   ` Ulf Hansson
2017-05-18  8:01     ` Linus Walleij
2017-05-16 11:54   ` Adrian Hunter
2017-05-18  8:21     ` Linus Walleij
2017-05-18 12:42       ` Adrian Hunter
2017-05-18 13:31         ` Linus Walleij
2017-05-10  8:24 ` [PATCH 3/5] mmc: block: Tag is_rpmb as bool Linus Walleij
2017-05-10  8:24 ` [PATCH 4/5] mmc: block: move single ioctl() commands to block requests Linus Walleij
2017-05-16  9:15   ` Ulf Hansson
2017-05-23  8:14   ` Avri Altman
2017-05-23  8:14     ` Avri Altman
2017-05-10  8:24 ` [PATCH 5/5] mmc: block: move multi-ioctl() to use block layer Linus Walleij
2017-05-12 21:09   ` Avri Altman
2017-05-12 21:09     ` Avri Altman
2017-05-18  9:26     ` Linus Walleij
2017-05-16  9:21   ` Ulf Hansson
2017-05-23  9:21   ` Avri Altman
2017-05-23  9:21     ` Avri Altman
2017-05-23 10:51   ` Avri Altman
2017-05-23 10:51     ` Avri Altman
2017-05-11 21:08 ` [PATCH 0/5] mmc: core: modernize ioctl() requests Ulf Hansson

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='CACRpkdYV2KfyRL6eweie3Yb-Em7L9X6Y3k=SOqO107oUX9MNbw@mail.gmail.com' \
    --to=linus.walleij@linaro.org \
    --cc=Steven.Hill@cavium.com \
    --cc=adrian.hunter@intel.com \
    --cc=arnd@arndb.de \
    --cc=axboe@kernel.dk \
    --cc=b.zolnierkie@samsung.com \
    --cc=daniel@zonque.org \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=paolo.valente@linaro.org \
    --cc=pierre@ossman.eu \
    --cc=ulf.hansson@linaro.org \
    --cc=vinod.koul@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.