public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Shawn Guo <shawn.guo@freescale.com>,
	ashishj3 <ashish.jangam@kpitcummins.com>,
	Dajun <dajun.chen@diasemi.com>,
	sameo@openedhand.com, linaro-dev@lists.linaro.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 01/11] MFD: DA9052 MFD core module v2
Date: Sat, 23 Jul 2011 11:50:30 +0200	[thread overview]
Message-ID: <201107231150.31055.arnd@arndb.de> (raw)
In-Reply-To: <20110722085939.GF23192@opensource.wolfsonmicro.com>

On Friday 22 July 2011, Mark Brown wrote:
> We went round this analysis already with the underlying I2C drivers
> (which also end up needing to take mutexes and so on) - it really does
> work out better to just make the I/O noninterruptible, the I/O is fast
> enough to not really be worth interrupting and the handling for actual
> I/O errors should normally be sufficiently different to that for user
> initiated aborts that it just adds complication.
> 
> For example, if the user interrupts while we're in the middle of some
> lengthy series of operations or wait what we really want to do is to
> tear down the high level thing we're doing in an orderly fashion.  If
> we allow the interrupt to be noticed as part of an I/O operation then
> what we often end up doing is failing that and we then have to work out
> why the I/O failed, if actually happened on a physical level and how we
> deal with that.  Usually none of these paths will be well tested.
> 
> The overall result is that the system generally becomes more complicated
> and less robust.

Yes, that makes sense. There are also cases where a mutex should really
be a spinlock (which is by definition not interruptible), or vice
versa. I don't know if this is one of them.

I agree that the safest solution here is to just make the mutex
uninterruptible.

	Arnd

  reply	other threads:[~2011-07-23  9:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-05 14:37 [PATCH 01/11] MFD: DA9052 MFD core module v2 ashishj3
2011-07-05 14:55 ` Arnd Bergmann
2011-07-11  6:57   ` Ashish Jangam
2011-07-11  7:03     ` Mark Brown
2011-07-12 18:32     ` Arnd Bergmann
2011-07-12 18:40       ` Ashish Jangam
2011-07-21 15:46 ` Shawn Guo
2011-07-21 15:47   ` Mark Brown
2011-07-21 20:40     ` Arnd Bergmann
2011-07-22  8:59       ` Mark Brown
2011-07-23  9:50         ` Arnd Bergmann [this message]
2011-07-23 10:43           ` Mark Brown
2011-07-21 16:07 ` Shawn Guo
2011-07-24 18:49 ` Mark Brown

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=201107231150.31055.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=ashish.jangam@kpitcummins.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=dajun.chen@diasemi.com \
    --cc=linaro-dev@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sameo@openedhand.com \
    --cc=shawn.guo@freescale.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