public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Staubach <staubach@redhat.com>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>,
	NFS list <linux-nfs@vger.kernel.org>
Subject: [PATCH] out of order WRITE requests
Date: Tue, 13 Jan 2009 17:31:30 -0500	[thread overview]
Message-ID: <496D1642.6060608@redhat.com> (raw)

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

Hi.

Attached is a patch which addresses a continuing problem with
the NFS client generating out of order WRITE requests.  While
this is compliant with all of the current protocol
specifications, there are servers in the market which can not
handle out of order WRITE requests very well.  Also, this may
lead to sub-optimal block allocations in the underlying file
system on the server.  This may cause the read throughputs to
be reduced when reading the file from the server.

There has been a lot of work recently done to address out of
order issues on a systemic level.  However, the NFS client is
still susceptible to the problem.  Out of order WRITE
requests can occur when pdflush is in the middle of writing
out pages while the process dirtying the pages calls 
generic_file_buffered_write which calls
generic_perform_write which calls
balance_dirty_pages_rate_limited which ends up calling
writeback_inodes which ends up calling back into the NFS
client to writes out dirty pages for the same file that
pdflush happens to be working with.

The attached patch supplies synchronization in the NFS client
code itself.  The entry point in the NFS client for both of
the code paths mentioned is nfs_writepages, so serializing
there resolves this issue.

My testing, informal, showed no degradation in WRITE
throughput.

    Thanx...

       ps

Signed-off-by: Peter Staubach <staubach@redhat.com>

[-- Attachment #2: sync_writes.devel --]
[-- Type: text/plain, Size: 195 bytes --]

The original MIME headers for this attachment are:
Content-Type: text/plain;
 name="sync_writes.devel"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="sync_writes.devel"


             reply	other threads:[~2009-01-13 22:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-13 22:31 Peter Staubach [this message]
2009-01-13 22:53 ` [PATCH] out of order WRITE requests Trond Myklebust
2009-01-13 23:07   ` Trond Myklebust
2009-01-14 15:38   ` Peter Staubach

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=496D1642.6060608@redhat.com \
    --to=staubach@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=trond.myklebust@fys.uio.no \
    /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