mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-mmc <linux-mmc@vger.kernel.org>,
	linux-block <linux-block@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Bough Chen <haibo.chen@nxp.com>,
	Alex Lemberg <alex.lemberg@sandisk.com>,
	Mateusz Nowak <mateusz.nowak@intel.com>,
	Yuliy Izrailov <Yuliy.Izrailov@sandisk.com>,
	Jaehoon Chung <jh80.chung@samsung.com>,
	Dong Aisheng <dongas86@gmail.com>,
	Das Asutosh <asutoshd@codeaurora.org>,
	Zhangfei Gao <zhangfei.gao@gmail.com>,
	Sahitya Tummala <stummala@codeaurora.org>,
	Harjani Ritesh <riteshh@codeaurora.org>,
	Venu Byravarasu <vbyravarasu@nvidia.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Shawn Lin <shawn.lin@rock-chips.com>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH V8 08/14] mmc: core: Add parameter use_blk_mq
Date: Fri, 22 Sep 2017 16:30:35 +0300	[thread overview]
Message-ID: <032894b4-8575-9d93-bf74-c96e7b778d9b@intel.com> (raw)
In-Reply-To: <CAPDyKFqvE3YUnmLFUoU36jwYh6kKG89mj5pOy82zW6=EdWRN+g@mail.gmail.com>

On 21/09/17 12:47, Ulf Hansson wrote:
> On 13 September 2017 at 13:40, Adrian Hunter <adrian.hunter@intel.com> wrote:
>> Until mmc has blk-mq support fully implemented and tested, add a
>> parameter use_blk_mq, default to false unless config option MMC_MQ_DEFAULT
>> is selected.
>>
>> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
>> ---
>>  drivers/mmc/Kconfig      | 11 +++++++++++
>>  drivers/mmc/core/core.c  |  7 +++++++
>>  drivers/mmc/core/core.h  |  2 ++
>>  drivers/mmc/core/host.c  |  2 ++
>>  drivers/mmc/core/host.h  |  4 ++++
>>  include/linux/mmc/host.h |  1 +
>>  6 files changed, 27 insertions(+)
>>
>> diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
>> index ec21388311db..98202934bd29 100644
>> --- a/drivers/mmc/Kconfig
>> +++ b/drivers/mmc/Kconfig
>> @@ -12,6 +12,17 @@ menuconfig MMC
>>           If you want MMC/SD/SDIO support, you should say Y here and
>>           also to your specific host controller driver.
>>
>> +config MMC_MQ_DEFAULT
>> +       bool "MMC: use blk-mq I/O path by default"
>> +       depends on MMC && BLOCK
>> +       ---help---
>> +         This option enables the new blk-mq based I/O path for MMC block
>> +         devices by default.  With the option the mmc_core.use_blk_mq
>> +         module/boot option defaults to Y, without it to N, but it can
>> +         still be overridden either way.
>> +
>> +         If unsure say N.
>> +
>>  if MMC
> 
> I asume the goal of adding this option is to enable us to move slowly
> forward. In general that might be a good idea, however for this
> particular case I am not sure.
> 
> The main reason is simply that I find it unlikely that people and
> distributions will actually go in and change the default value, so in
> the end we will just be adding new code, which isn't really going to
> be much tested. That's what happened in scsi case.

The argument that no one is going to test anyway so we shouldn't give them
the opportunity, is not a sustainable vision for the future.  Instead we
should reach out to relevant stakeholders and get them to do their testing
with blk-mq first.

> 
> As I also stated earlier, I do worry about the maintenance of the mmc
> block device code, and this approach make it worse, at least short
> term.

What maintenance?

> 
> To me, the scsi case is also different, because the mq support was
> added long time ago and at that point one could worry a bit of
> maturity of the blkmq in general, that I assume have been sorted out
> by know.

But blk-mq still isn't fully ready for all of scsi, so you seem to be
contradicting yourself.

> 
>>
>>  source "drivers/mmc/core/Kconfig"
>> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
>> index ef2d8aa1e7d2..3638ed4f0f9e 100644
>> --- a/drivers/mmc/core/core.c
>> +++ b/drivers/mmc/core/core.c
>> @@ -66,6 +66,13 @@
>>  bool use_spi_crc = 1;
>>  module_param(use_spi_crc, bool, 0);
>>
>> +#ifdef CONFIG_MMC_MQ_DEFAULT
>> +bool mmc_use_blk_mq = true;
>> +#else
>> +bool mmc_use_blk_mq = false;
>> +#endif
>> +module_param_named(use_blk_mq, mmc_use_blk_mq, bool, S_IWUSR | S_IRUGO);
>> +
>>  static int mmc_schedule_delayed_work(struct delayed_work *work,
>>                                      unsigned long delay)
>>  {
>> diff --git a/drivers/mmc/core/core.h b/drivers/mmc/core/core.h
>> index e941342ed450..535539a9e7eb 100644
>> --- a/drivers/mmc/core/core.h
>> +++ b/drivers/mmc/core/core.h
>> @@ -35,6 +35,8 @@ struct mmc_bus_ops {
>>         int (*reset)(struct mmc_host *);
>>  };
>>
>> +extern bool mmc_use_blk_mq;
>> +
>>  void mmc_attach_bus(struct mmc_host *host, const struct mmc_bus_ops *ops);
>>  void mmc_detach_bus(struct mmc_host *host);
>>
>> diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
>> index ad88deb2e8f3..b624dbb6cd15 100644
>> --- a/drivers/mmc/core/host.c
>> +++ b/drivers/mmc/core/host.c
>> @@ -398,6 +398,8 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev)
>>         host->max_blk_size = 512;
>>         host->max_blk_count = PAGE_SIZE / 512;
>>
>> +       host->use_blk_mq = mmc_use_blk_mq;
>> +
>>         return host;
>>  }
>>
>> diff --git a/drivers/mmc/core/host.h b/drivers/mmc/core/host.h
>> index 77d6f60d1bf9..170fe5947087 100644
>> --- a/drivers/mmc/core/host.h
>> +++ b/drivers/mmc/core/host.h
>> @@ -69,6 +69,10 @@ static inline bool mmc_card_hs400es(struct mmc_card *card)
>>         return card->host->ios.enhanced_strobe;
>>  }
>>
>> +static inline bool mmc_host_use_blk_mq(struct mmc_host *host)
>> +{
>> +       return host->use_blk_mq;
>> +}
>>
>>  #endif
>>
>> diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
>> index 54b0463443bd..5d1bd10991f7 100644
>> --- a/include/linux/mmc/host.h
>> +++ b/include/linux/mmc/host.h
>> @@ -378,6 +378,7 @@ struct mmc_host {
>>         unsigned int            doing_retune:1; /* re-tuning in progress */
>>         unsigned int            retune_now:1;   /* do re-tuning at next req */
>>         unsigned int            retune_paused:1; /* re-tuning is temporarily disabled */
>> +       unsigned int            use_blk_mq:1;   /* use blk-mq */
>>
>>         int                     rescan_disable; /* disable card detection */
>>         int                     rescan_entered; /* used with nonremovable devices */
>> --
>> 1.9.1
>>
> 
> Kind regards
> Uffe
> 

  reply	other threads:[~2017-09-22 13:37 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-13 11:40 [PATCH V8 00/14] mmc: Add Command Queue support Adrian Hunter
2017-09-13 11:40 ` [PATCH V8 01/14] mmc: core: Introduce host claiming by context Adrian Hunter
2017-09-20  9:00   ` Ulf Hansson
2017-09-22 11:23   ` Linus Walleij
2017-09-13 11:40 ` [PATCH V8 02/14] mmc: core: Add support for handling CQE requests Adrian Hunter
2017-09-13 11:40 ` [PATCH V8 03/14] mmc: mmc: Enable Command Queuing Adrian Hunter
2017-09-13 11:40 ` [PATCH V8 04/14] mmc: mmc: Enable CQE's Adrian Hunter
2017-09-13 11:40 ` [PATCH V8 05/14] mmc: block: Use local variables in mmc_blk_data_prep() Adrian Hunter
2017-09-13 11:40 ` [PATCH V8 06/14] mmc: block: Prepare CQE data Adrian Hunter
2017-09-13 11:40 ` [PATCH V8 07/14] mmc: block: Factor out mmc_setup_queue() Adrian Hunter
2017-09-13 11:40 ` [PATCH V8 08/14] mmc: core: Add parameter use_blk_mq Adrian Hunter
2017-09-21  9:47   ` Ulf Hansson
2017-09-22 13:30     ` Adrian Hunter [this message]
2017-09-22 14:01       ` Linus Walleij
2017-09-13 11:40 ` [PATCH V8 09/14] mmc: core: Remove unnecessary host claim Adrian Hunter
2017-09-13 11:40 ` [PATCH V8 10/14] mmc: core: Export mmc_start_bkops() Adrian Hunter
2017-09-13 11:40 ` [PATCH V8 11/14] mmc: core: Export mmc_start_request() Adrian Hunter
2017-09-13 11:40 ` [PATCH V8 12/14] mmc: block: Add CQE and blk-mq support Adrian Hunter
2017-09-21  9:59   ` Ulf Hansson
2017-09-21 11:17     ` Adrian Hunter
2017-09-13 11:40 ` [PATCH V8 13/14] mmc: cqhci: support for command queue enabled host Adrian Hunter
2017-09-13 11:40 ` [PATCH V8 14/14] mmc: sdhci-pci: Add CQHCI support for Intel GLK Adrian Hunter
2017-09-21  9:01 ` [PATCH V8 00/14] mmc: Add Command Queue support Ulf Hansson
2017-09-21  9:44   ` Adrian Hunter
2017-10-10 12:12     ` Ulf Hansson
2017-10-10 12:24       ` Adrian Hunter
2017-10-10 13:08         ` Ulf Hansson
2017-10-10 13:31           ` Adrian Hunter
2017-10-11 12:13             ` Ulf Hansson
2017-10-11 12:58               ` Adrian Hunter
2017-10-11 13:58                 ` Ulf Hansson
2017-10-12  8:08                   ` Linus Walleij
2017-10-12  8:28                     ` Ulf Hansson
2017-10-13 11:58                   ` Adrian Hunter
2017-10-18  6:16                   ` Adrian Hunter
2017-10-19 11:44                     ` Adrian Hunter
2017-10-20 12:30                       ` Adrian Hunter
2017-10-23 13:06                         ` Adrian Hunter
2017-10-24  5:37                           ` Ulf Hansson
2017-10-24  6:42                             ` Adrian Hunter
2017-10-24  7:39                               ` Ulf Hansson
2017-10-24  9:11                                 ` Adrian Hunter
2017-09-21 14:07 ` Christoph Hellwig

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=032894b4-8575-9d93-bf74-c96e7b778d9b@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=Yuliy.Izrailov@sandisk.com \
    --cc=alex.lemberg@sandisk.com \
    --cc=asutoshd@codeaurora.org \
    --cc=dongas86@gmail.com \
    --cc=haibo.chen@nxp.com \
    --cc=hch@lst.de \
    --cc=jh80.chung@samsung.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=mateusz.nowak@intel.com \
    --cc=riteshh@codeaurora.org \
    --cc=shawn.lin@rock-chips.com \
    --cc=stummala@codeaurora.org \
    --cc=ulf.hansson@linaro.org \
    --cc=vbyravarasu@nvidia.com \
    --cc=zhangfei.gao@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome