linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Trond Myklebust <Trond.Myklebust@netapp.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "James Bottomley" <James.Bottomley@hansenpartnership.com>,
	"Russell King - ARM Linux" <linux@arm.linux.org.uk>,
	linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Marc Kleine-Budde" <mkl@pengutronix.de>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Marc Kleine-Budde" <m.kleine-budde@pengutronix.de>,
	linux-arm-kernel@lists.infradead.org,
	"Parisc List" <linux-parisc@vger.kernel.org>,
	linux-arch@vger.kernel.org
Subject: Re: still nfs problems [Was: Linux 2.6.37-rc8]
Date: Fri, 07 Jan 2011 13:53:25 -0500	[thread overview]
Message-ID: <1294426405.2929.23.camel@heimdal.trondhjem.org> (raw)
In-Reply-To: <AANLkTimusF4KCJ4vHPn+T1dUiKxapXaT0QTtFvh8Ykdd@mail.gmail.com>

On Thu, 2011-01-06 at 09:55 -0800, Linus Torvalds wrote: 
> On Thu, Jan 6, 2011 at 9:47 AM, Trond Myklebust
> <Trond.Myklebust@netapp.com> wrote:
> >
> > Why is this line needed? We're not writing through the virtual mapping.
> 
> I haven't looked at the sequence of accesses, but you need to be
> _very_ aware that "write-through" is absolutely NOT sufficient for
> cache coherency.
> 
> In cache coherency, you have three options:
> 
>  - true coherency (eg physically indexed/tagged caches)
> 
>  - exclusion (eg virtual caches, but with an exclusion guarantee that
> guarantees that aliases cannot happen: either by using physical
> tagging or by not allowing cases that could cause virtual aliases)
> 
>  - write-through AND non-cached reads (ie "no caching at all").
> 
> You seem to be forgetting the "no cached reads" part. It's not
> sufficient to flush after a write - you need to make sure that you
> also don't have a cached copy of the alias for the read.
> 
> So "We're not writing through the virtual mapping" is NOT a sufficient
> excuse. If you're reading through the virtual mapping, you need to
> make sure that the virtual mapping is flushed _after_ any writes
> through any other mapping and _before_ any reads through the virtual
> one.

I'm aware of that. That part should be taken care of by the call to
invalidate_kernel_vmap_range() which was in both James and my patch.

There is already code in the SUNRPC layer that calls flush_dcache_page()
after writing (although as Russell pointed out earlier, that is
apparently a no-op for non-page cache pages such as these).

> This is why you really really really generally don't want to have
> aliasing. Purely virtual caches are pure crap. Really.

Well, it looks as if NOMMU is giving us problems due to the lack of a
vm_map_ram() (see https://bugzilla.kernel.org/show_bug.cgi?id=26262).

I'd still like to keep the existing code for those architectures that
don't have problems, since that allows us to send 32k READDIR requests
instead of being limited to 4k. For large directories, that is a clear
win.
For the NOMMU case we will just go back to using a single page for
storage (and 4k READDIR requests only). Should I just do the same for
architectures like ARM and PARISC?

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@netapp.com
www.netapp.com

  parent reply	other threads:[~2011-01-07 18:53 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-05 19:05 still nfs problems [Was: Linux 2.6.37-rc8] James Bottomley
2011-01-05 19:18 ` Linus Torvalds
     [not found]   ` <AANLkTi=VZUxNFd7n-qwf5aiOeK5rkk8qBmo+kOpgg7up-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-01-05 19:36     ` James Bottomley
2011-01-05 19:36       ` James Bottomley
2011-01-05 19:49       ` Linus Torvalds
2011-01-05 20:35         ` James Bottomley
     [not found]       ` <1294256169.16957.18.camel-0iu6Cu4xQGLYCGPCin2YbQ@public.gmane.org>
2011-01-05 20:00         ` Russell King - ARM Linux
2011-01-05 20:00           ` Russell King - ARM Linux
2011-01-05 20:33           ` James Bottomley
2011-01-05 20:33             ` James Bottomley
2011-01-05 20:48             ` Linus Torvalds
     [not found]               ` <AANLkTimzzBsdtWcZtP5E_CH1hUZugGMoaHOiMdQJf764-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-01-05 21:04                 ` Russell King - ARM Linux
2011-01-05 21:04                   ` Russell King - ARM Linux
2011-01-05 21:08                   ` Linus Torvalds
2011-01-05 21:08                     ` Linus Torvalds
     [not found]                     ` <AANLkTi=EXXBTW7oWHq3D+PHsx=thF1CpkRjn0ax2p5rm-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-01-05 21:16                       ` Trond Myklebust
2011-01-05 21:16                         ` Trond Myklebust
     [not found]                         ` <1294262208.2952.4.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2011-01-05 21:30                           ` Linus Torvalds
2011-01-05 21:30                             ` Linus Torvalds
2011-01-05 23:06                             ` Trond Myklebust
2011-01-05 23:06                               ` Trond Myklebust
2011-01-05 23:28                               ` James Bottomley
2011-01-06 17:40                                 ` James Bottomley
2011-01-06 17:47                                   ` Trond Myklebust
2011-01-06 17:51                                     ` James Bottomley
2011-01-06 17:55                                     ` Linus Torvalds
2011-01-06 17:55                                       ` Linus Torvalds
2011-01-07 18:53                                       ` Trond Myklebust [this message]
     [not found]                                         ` <1294426405.2929.23.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2011-01-07 19:02                                           ` Russell King - ARM Linux
2011-01-07 19:02                                             ` Russell King - ARM Linux
2011-01-07 19:11                                             ` James Bottomley
2011-01-07 19:11                                               ` James Bottomley
     [not found]                                               ` <1294427467.4895.66.camel-0iu6Cu4xQGLYCGPCin2YbQ@public.gmane.org>
2011-01-08 16:49                                                 ` Trond Myklebust
2011-01-08 16:49                                                   ` Trond Myklebust
2011-01-08 23:15                                                   ` Trond Myklebust
2011-01-08 23:15                                                     ` Trond Myklebust
     [not found]                                                     ` <1294528551.4181.19.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2011-01-10 10:50                                                       ` Uwe Kleine-König
2011-01-10 10:50                                                         ` Uwe Kleine-König
2011-01-10 16:25                                                         ` Trond Myklebust
     [not found]                                                           ` <1294676734.3349.10.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2011-01-10 17:08                                                             ` Marc Kleine-Budde
2011-01-10 17:08                                                               ` Marc Kleine-Budde
2011-01-10 17:20                                                               ` Trond Myklebust
     [not found]                                                                 ` <1294680035.3349.19.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2011-01-10 17:26                                                                   ` Marc Kleine-Budde
2011-01-10 17:26                                                                     ` Marc Kleine-Budde
2011-01-10 19:25                                                                 ` Uwe Kleine-König
     [not found]                                                                   ` <20110110192552.GG24920-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2011-01-10 19:29                                                                     ` Trond Myklebust
2011-01-10 19:29                                                                       ` Trond Myklebust
2011-01-10 19:31                                                                       ` James Bottomley
2011-01-10 19:34                                                                       ` Linus Torvalds
2011-01-10 19:34                                                                         ` Linus Torvalds
2011-01-10 20:15                                                                         ` Trond Myklebust
2011-01-10 12:44                                                       ` Marc Kleine-Budde
2011-01-10 12:44                                                         ` Marc Kleine-Budde
2011-01-07 19:13                                             ` Trond Myklebust
2011-01-07 19:05                                         ` James Bottomley
     [not found]                                   ` <1294335614.22825.154.camel-0iu6Cu4xQGLYCGPCin2YbQ@public.gmane.org>
2011-01-06 18:05                                     ` Russell King - ARM Linux
2011-01-06 18:05                                       ` Russell King - ARM Linux
2011-01-06 18:14                                       ` James Bottomley
2011-01-06 18:14                                         ` James Bottomley
     [not found]                                         ` <1294337670.22825.199.camel-0iu6Cu4xQGLYCGPCin2YbQ@public.gmane.org>
2011-01-06 18:25                                           ` James Bottomley
2011-01-06 18:25                                             ` James Bottomley
2011-01-06 21:07                                             ` James Bottomley
2011-01-06 21:07                                               ` James Bottomley
2011-01-06 20:19                                   ` John Stoffel
2011-01-06 20:19                                     ` John Stoffel
2011-01-05 23:28                               ` Linus Torvalds
2011-01-05 23:28                                 ` Linus Torvalds
     [not found]                                 ` <AANLkTi=SjMinMp+m726GS1iehj6cQgNy1RqSoUqKhjtv-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-01-05 23:59                                   ` Russell King - ARM Linux
2011-01-05 23:59                                     ` Russell King - ARM Linux
2011-01-05 21:16               ` James Bottomley
2011-01-05 21:16                 ` James Bottomley

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=1294426405.2929.23.camel@heimdal.trondhjem.org \
    --to=trond.myklebust@netapp.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=m.kleine-budde@pengutronix.de \
    --cc=mkl@pengutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=u.kleine-koenig@pengutronix.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;
as well as URLs for NNTP newsgroup(s).