public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Arnd Bergmann <arnd@arndb.de>
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: Fri, 22 Jul 2011 09:59:39 +0100	[thread overview]
Message-ID: <20110722085939.GF23192@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <11313494.PB6mQOoBLX@wuerfel>

On Thu, Jul 21, 2011 at 10:40:23PM +0200, Arnd Bergmann wrote:
> On Thursday 21 July 2011 16:47:48 Mark Brown wrote:

> > Although the bigger problem is why are these interruptible?  That's
> > very unusual.

> Well, the default should really be to use _interruptible or at least
> _killable with the appropriate error handling, and only use noninterruptible
> locks  in cases where that's not possible.

> In the funtions that Shawn pointed out, there is an error return, so it would
> be possible to do that, but the callers would need to be audited carefully.

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.

  reply	other threads:[~2011-07-22  8:59 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 [this message]
2011-07-23  9:50         ` Arnd Bergmann
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=20110722085939.GF23192@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=arnd@arndb.de \
    --cc=ashish.jangam@kpitcummins.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