linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/2] drivers: spi/i2c: account completions as iowait
@ 2014-11-02 13:58 Wolfram Sang
  2014-11-02 13:58 ` [RFC 1/2] i2c: " Wolfram Sang
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Wolfram Sang @ 2014-11-02 13:58 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	linux-spi-u79uwXL29TY76Z2rM5mHXA, Mark Brown, Peter Zijlstra,
	Ingo Molnar, Balbir Singh, Wolfram Sang

So, I recently learned that there is wait_for_completion_io_* because one I2C
driver uses it instead of wait_for_completion_*. I want consistency, so
technically the io-versions seem to be the correct ones to me, because, well,
we are waiting for IO.

However, researching the net, users currently interpret iowait entirely as
blkio wait. Furthermore, io_schedule() calls delayacct_blkio_{start|end}() which
worked fine for my tests with I2C but might show that iowait was really meant as
blkiowait? So, should other subsystems use it?

To make it more confusing, some people (like Peter Zijlstra [1]) seem to like
iowait gone, so maybe it is all not worth it?

I'd be grateful for a rule-of-thumb here. And because people like to discuss
code, I created patches to convert I2C and SPI to be accounted as iowait ;)

Thanks,

   Wolfram


[1] http://www.spinics.net/lists/kernel/msg1778892.html

Wolfram Sang (2):
  i2c: account completions as iowait
  spi: account completions as iowait

 drivers/i2c/busses/i2c-axxia.c           |  4 ++--
 drivers/i2c/busses/i2c-bcm-kona.c        |  8 ++++----
 drivers/i2c/busses/i2c-bcm2835.c         |  2 +-
 drivers/i2c/busses/i2c-bfin-twi.c        |  4 ++--
 drivers/i2c/busses/i2c-cadence.c         |  2 +-
 drivers/i2c/busses/i2c-davinci.c         |  2 +-
 drivers/i2c/busses/i2c-designware-core.c |  2 +-
 drivers/i2c/busses/i2c-efm32.c           |  2 +-
 drivers/i2c/busses/i2c-exynos5.c         |  2 +-
 drivers/i2c/busses/i2c-highlander.c      |  2 +-
 drivers/i2c/busses/i2c-hix5hd2.c         |  2 +-
 drivers/i2c/busses/i2c-ismt.c            |  2 +-
 drivers/i2c/busses/i2c-mxs.c             |  2 +-
 drivers/i2c/busses/i2c-nomadik.c         |  4 ++--
 drivers/i2c/busses/i2c-omap.c            |  2 +-
 drivers/i2c/busses/i2c-pmcmsp.c          |  2 +-
 drivers/i2c/busses/i2c-pnx.c             |  2 +-
 drivers/i2c/busses/i2c-qup.c             |  4 ++--
 drivers/i2c/busses/i2c-riic.c            |  2 +-
 drivers/i2c/busses/i2c-sh7760.c          |  2 +-
 drivers/i2c/busses/i2c-sirf.c            |  2 +-
 drivers/i2c/busses/i2c-st.c              |  2 +-
 drivers/i2c/busses/i2c-sun6i-p2wi.c      |  2 +-
 drivers/i2c/busses/i2c-tegra.c           |  2 +-
 drivers/i2c/busses/i2c-wmt.c             |  4 ++--
 drivers/spi/spi-altera.c                 |  2 +-
 drivers/spi/spi-atmel.c                  |  2 +-
 drivers/spi/spi-au1550.c                 |  4 ++--
 drivers/spi/spi-bcm2835.c                |  2 +-
 drivers/spi/spi-bcm63xx-hsspi.c          |  2 +-
 drivers/spi/spi-bcm63xx.c                |  2 +-
 drivers/spi/spi-efm32.c                  |  2 +-
 drivers/spi/spi-ep93xx.c                 |  4 ++--
 drivers/spi/spi-fsl-espi.c               |  2 +-
 drivers/spi/spi-fsl-spi.c                |  2 +-
 drivers/spi/spi-imx.c                    |  6 +++---
 drivers/spi/spi-mpc512x-psc.c            |  2 +-
 drivers/spi/spi-mpc52xx-psc.c            |  2 +-
 drivers/spi/spi-mxs.c                    |  2 +-
 drivers/spi/spi-nuc900.c                 |  2 +-
 drivers/spi/spi-oc-tiny.c                |  2 +-
 drivers/spi/spi-omap2-mcspi.c            |  4 ++--
 drivers/spi/spi-ppc4xx.c                 |  2 +-
 drivers/spi/spi-qup.c                    |  2 +-
 drivers/spi/spi-s3c24xx.c                |  2 +-
 drivers/spi/spi-s3c64xx.c                |  2 +-
 drivers/spi/spi-sh-msiof.c               |  4 ++--
 drivers/spi/spi-sirf.c                   | 10 +++++-----
 drivers/spi/spi-sun4i.c                  |  2 +-
 drivers/spi/spi-sun6i.c                  |  2 +-
 drivers/spi/spi-tegra114.c               |  2 +-
 drivers/spi/spi-tegra20-sflash.c         |  2 +-
 drivers/spi/spi-tegra20-slink.c          |  2 +-
 drivers/spi/spi-ti-qspi.c                |  4 ++--
 drivers/spi/spi-xilinx.c                 |  2 +-
 drivers/spi/spi.c                        |  4 ++--
 drivers/spi/spidev.c                     |  2 +-
 57 files changed, 77 insertions(+), 77 deletions(-)

-- 
2.1.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-11-03 19:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-02 13:58 [RFC 0/2] drivers: spi/i2c: account completions as iowait Wolfram Sang
2014-11-02 13:58 ` [RFC 1/2] i2c: " Wolfram Sang
     [not found] ` <1414936689-2707-1-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2014-11-02 13:58   ` [RFC 2/2] spi: " Wolfram Sang
2014-11-02 16:59   ` [RFC 0/2] drivers: spi/i2c: " Peter Zijlstra
     [not found]     ` <20141102165943.GT10501-IIpfhp3q70z/8w/KjCw3T+5/BudmfyzbbVWyRVo5IupeoWH0uzbU5w@public.gmane.org>
2014-11-03 19:31       ` Wolfram Sang
2014-11-03 13:02 ` One Thousand Gnomes
     [not found]   ` <20141103130222.1c53fa39-mUKnrFFms3BCCTY1wZZT65JpZx93mCW/@public.gmane.org>
2014-11-03 19:45     ` Wolfram Sang

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).