mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Takashi Iwai <tiwai@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: regcache_sync() errors for read-only registers cache
Date: Tue, 3 Mar 2015 14:54:38 +0000	[thread overview]
Message-ID: <20150303145438.GY21293@sirena.org.uk> (raw)
In-Reply-To: <s5htwy277v0.wl-tiwai@suse.de>

[-- Attachment #1: Type: text/plain, Size: 2237 bytes --]

On Tue, Mar 03, 2015 at 10:22:59AM +0100, Takashi Iwai wrote:
> Mark Brown wrote:

> > > The --scissors option of git am is your friend.

> > That's still pain.

> But it's still better than sending two mails even if you don't know
> whether it's the right patch.  It's even not tag as an RFC.  The patch
> was there just as a reference.

I actually find it harder to work with TBH - it breaks up the mail to
have the extra stuff around the code in there and it's harder to apply
if it's OK.  During a discussion it feels more natural to just have the
diff hunk with the mail text around it instead.

> > Well, it's either that or adding the values read back from the chip to
> > the defaults.

> For fixing the single rw, it's easy in either way (although the latter
> sounds bad from the performance POV).  But what about the block rw?

Why should adding something to the defaults hurt performance (it should
just be a one time cost to insert the default which we've got a
reasonable chance of making back later)?  I guess if there's a lot of
these registers it'll add up but they're pretty rare, usually it's a few
ID and revision registers and anything else is volatile so wouldn't get
cached at all.

Block I/O can just get the same fix I think, the logic is basically the
same it's just what we do with differences that changes.

> > > regmap_wrietable() call in _regmap_write().

> > It's superfluous with respect to what?  Still a bit confused, sorry.

> regmap_writeable() is called twice in that code path with my patch.
> First before calling _regmap_write() and again in _regmap_write().
> The second call is superfluous in this code path although it's needed
> for other paths.

> regmap_writeable() isn't usually that heavy, but it's still
> suboptimal.

Oh, right.  The two checks are logically distinct to me - the check in
_write() is more of an assert than something that's expected to go off,
anything relying on it is in trouble, while the one in the cache sync is
there as part of normal operation.  If anyone cared about performance to
that extent it probably ought to be a build option to even check though
since the I/O is generally so slow and it's rare to implement writeable
at all it doesn't normally matter.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2015-03-03 14:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-27 12:59 Takashi Iwai
2015-03-02 18:24 ` Mark Brown
2015-03-02 19:15   ` Takashi Iwai
2015-03-03  9:09     ` Mark Brown
2015-03-03  9:22       ` Takashi Iwai
2015-03-03 14:54         ` Mark Brown [this message]
2015-03-03 15:33           ` Takashi Iwai
2015-03-03 20:04             ` Mark Brown
2015-03-03 22:00               ` Takashi Iwai

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=20150303145438.GY21293@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiwai@suse.de \
    /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

all inboxes | Powered by JetHome®