linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: "Linus Torvalds" <torvalds@linux-foundation.org>,
	"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: Thu, 06 Jan 2011 11:51:35 -0600	[thread overview]
Message-ID: <1294336295.22825.168.camel@mulgrave.site> (raw)
In-Reply-To: <1294336054.2905.1.camel@heimdal.trondhjem.org>

On Thu, 2011-01-06 at 12:47 -0500, Trond Myklebust wrote:
> On Thu, 2011-01-06 at 11:40 -0600, James Bottomley wrote: 
> > On Wed, 2011-01-05 at 23:28 +0000, James Bottomley wrote:
> > > Can you explain how the code works? it looks to me like you read the xdr
> > > stuff through the vmap region then write it out directly to the pages? 
> > 
> > OK, I think I see how this is supposed to work:  It's a sequential loop
> > of reading in via the pages (i.e. through the kernel mapping) and then
> > updating those pages via the vmap.  In which case, I think this patch is
> > what you need.
> > 
> > The theory of operation is that the readdir on pages actually uses the
> > network DMA operations to perform, so when it's finished, the underlying
> > page is up to date.  After this you invalidate the vmap range, so we
> > have no cache lines above it (so it picks up the values from the
> > uptodate page).  Finally, after the operation on the vmap region has
> > finished, you flush it so that any updated contents go back to the pages
> > themselves before the next iteration begins.
> > 
> > Does this look right to people?  I've verified it fixes the issues on
> > parisc.
> > 
> > James
> > 
> > ---
> > 
> > diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
> > index 996dd89..bde1911 100644
> > --- a/fs/nfs/dir.c
> > +++ b/fs/nfs/dir.c
> > @@ -587,12 +587,16 @@ int nfs_readdir_xdr_to_array(nfs_readdir_descriptor_t *desc, struct page *page,
> >  		if (status < 0)
> >  			break;
> >  		pglen = status;
> > +
> > +		invalidate_kernel_vmap_range(pages_ptr, pglen);
> > +
> >  		status = nfs_readdir_page_filler(desc, &entry, pages_ptr, page, pglen);
> >  		if (status < 0) {
> >  			if (status == -ENOSPC)
> >  				status = 0;
> >  			break;
> >  		}
> > +		flush_kernel_vmap_range(pages_ptr, pglen);
> 
> Why is this line needed? We're not writing through the virtual mapping.

If you're not altering it, it isn't ... the problem on parisc is that
invalidate is a nop for us because flush does it all, but I can fix
that.

James

> We checked using just the invalidate_kernel_vmap_range(), and that
> appeared to suffice to fix the problem on ARM.
> 
> Cheers
>   Trond



  reply	other threads:[~2011-01-06 17:51 UTC|newest]

Thread overview: 82+ 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
2011-01-05 19:36   ` James Bottomley
2011-01-05 19:49     ` Linus Torvalds
2011-01-05 20:35       ` James Bottomley
2011-01-05 20:00     ` Russell King - ARM Linux
2011-01-05 20:33       ` James Bottomley
2011-01-05 20:48         ` Linus Torvalds
2011-01-05 21:04           ` Russell King - ARM Linux
2011-01-05 21:08             ` Linus Torvalds
2011-01-05 21:16               ` Trond Myklebust
2011-01-05 21:30                 ` Linus Torvalds
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 [this message]
2011-01-06 17:55                           ` Linus Torvalds
2011-01-07 18:53                             ` Trond Myklebust
2011-01-07 19:02                               ` Russell King - ARM Linux
2011-01-07 19:11                                 ` James Bottomley
2011-01-08 16:49                                   ` Trond Myklebust
2011-01-08 23:15                                     ` Trond Myklebust
2011-01-10 10:50                                       ` Uwe Kleine-König
2011-01-10 16:25                                         ` Trond Myklebust
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 19:25                                               ` Uwe Kleine-König
2011-01-10 19:29                                                 ` Trond Myklebust
2011-01-10 19:31                                                   ` James Bottomley
2011-01-10 19:34                                                   ` Linus Torvalds
2011-01-10 20:15                                                     ` Trond Myklebust
2011-01-10 12:44                                       ` Marc Kleine-Budde
2011-01-07 19:13                                 ` Trond Myklebust
2011-01-07 19:05                               ` James Bottomley
2011-01-06 18:05                         ` Russell King - ARM Linux
2011-01-06 18:14                           ` James Bottomley
2011-01-06 18:25                             ` James Bottomley
2011-01-06 21:07                               ` James Bottomley
2011-01-06 20:19                         ` John Stoffel
2011-01-05 23:28                     ` Linus Torvalds
2011-01-05 23:59                       ` Russell King - ARM Linux
2011-01-05 21:16           ` James Bottomley
  -- strict thread matches above, loose matches on Subject: below --
2010-12-31  3:17 George Spelvin
2010-12-31  4:32 ` Trond Myklebust
2011-01-01  1:03   ` George Spelvin
2011-01-01  1:18     ` Trond Myklebust
2011-01-01  5:44       ` George Spelvin
     [not found] <AANLkTi=-dNeeDjcSoznKtwcaNyw1mMXSqepFY89R2i+2@mail.gmail.com>
     [not found] ` <20101230171453.GA5787@pengutronix.de>
2010-12-30 17:59   ` Trond Myklebust
2010-12-30 19:18     ` Uwe Kleine-König
2011-01-03 21:38       ` Uwe Kleine-König
2011-01-04  0:22         ` Trond Myklebust
2011-01-05  8:40           ` Uwe Kleine-König
2011-01-05 11:05             ` Uwe Kleine-König
2011-01-05 11:27               ` Russell King - ARM Linux
2011-01-05 12:14                 ` Marc Kleine-Budde
2011-01-05 13:02                   ` Nori, Sekhar
2011-01-05 15:34                     ` Russell King - ARM Linux
2011-01-05 13:40                 ` Uwe Kleine-König
2011-01-05 14:29                   ` Jim Rees
2011-01-05 14:42                     ` Marc Kleine-Budde
2011-01-05 15:38                       ` Jim Rees
2011-01-05 14:53                   ` Trond Myklebust
2011-01-05 15:01                     ` Marc Kleine-Budde
2011-01-05 15:14                       ` Trond Myklebust
2011-01-05 15:29                         ` Trond Myklebust
2011-01-05 15:39                           ` Marc Kleine-Budde
2011-01-05 15:52                         ` Russell King - ARM Linux
2011-01-05 17:17                           ` Trond Myklebust
2011-01-05 17:26                             ` Russell King - ARM Linux
2011-01-05 18:12                               ` Trond Myklebust
2011-01-05 18:27                                 ` Russell King - ARM Linux
2011-01-05 18:55                                   ` Trond Myklebust
2011-01-05 19:07                                     ` Russell King - ARM Linux
2011-01-14  2:25                     ` Andy Isaacson
2011-01-14  2:40                       ` Trond Myklebust
2011-01-14  4:22                         ` Andy Isaacson
     [not found]   ` <AANLkTikvZF6Q1k0rETLHUffkUT3grxAh3FoB_0vs96B8@mail.gmail.com>
2010-12-30 18:24     ` Trond Myklebust
2010-12-30 18:50       ` Linus Torvalds
2010-12-30 19:25         ` Trond Myklebust
2010-12-30 20:02           ` Linus Torvalds

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=1294336295.22825.168.camel@mulgrave.site \
    --to=james.bottomley@hansenpartnership.com \
    --cc=Trond.Myklebust@netapp.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).