From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>
Cc: Bernd Schubert <bs@q-leap.de>,
Randy Dunlap <randy.dunlap@oracle.com>,
linux-kernel@vger.kernel.org,
"J. Bruce Fields" <bfields@fieldses.org>,
brian@clusterfs.com
Subject: Re: patch: improve generic_file_buffered_write() (2nd try 1/2)
Date: Sat, 8 Sep 2007 17:14:09 +1000 [thread overview]
Message-ID: <200709081714.10278.nickpiggin@yahoo.com.au> (raw)
In-Reply-To: <87hcm6chtb.fsf@informatik.uni-tuebingen.de>
On Saturday 08 September 2007 07:00, Goswin von Brederlow wrote:
> Nick Piggin <nickpiggin@yahoo.com.au> writes:
> > Anyway, there are fixes for this deadlock in Andrew's -mm tree, but
> > also a workaround for the NFSD problem in git commit 29dbb3fc. Did
> > you try a later kernel to see if it is fixed there?
>
> I had a chance to look up that commit (git clone took a while so sorry
> for writing 2 mails). It is present in 2.6.23-rc5 so I already noticed
> it when merging our patch in 2.6.23-rc5.
>
> Upon closer reading of the patch though I see that it will indeed
> prevent writes by the nfsd to be split smaller than PAGE_SIZE and it
> will cause filemap_copy_from_user[_iovec] to be called with a source
> spanning multwhat to do in cambridge pubiple pages.
OK, good.
> So the commit 29dbb3fc should have a simmilar, slightly better even,
> gain for the nfsd and other kernel space segments. But it will not
> improve writes from user space, where ~14% of the commits were saved
> during a days work for me.
>
>
> Now I have a question about fault_in_pages_readable(). Can I call that
> for multiple pages and then call __grab_cache_page() without risking
> one of the pages from getting lost again and causing a deadlock?
No. The existing mainline code is buggy, and it is just hoping that
the userspace page does not get paged out between the fault_in_pages
and the subsequent copy_from_user.
If you do multiple fault_in_pages_readable(), you probably have less
chance of deadlocking, but on the 2nd call, you might still have to
wait for a long time to page in, during which time the 1st page may get
paged out.
But there is a proper solution in -mm with the write_begin aop.
prev parent reply other threads:[~2007-09-07 21:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-05 13:45 patch: improve generic_file_buffered_write() Bernd Schubert
2007-09-05 15:35 ` Randy Dunlap
2007-09-05 17:41 ` patch: improve generic_file_buffered_write() (2nd try 1/2) Bernd Schubert
2007-09-05 17:49 ` patch: improve generic_file_buffered_write() (2nd try 2/2) Bernd Schubert
2007-09-08 4:15 ` patch: improve generic_file_buffered_write() (2nd try 1/2) Nick Piggin
2007-09-07 20:01 ` Goswin von Brederlow
2007-09-08 6:28 ` Nick Piggin
2007-09-07 21:12 ` Goswin von Brederlow
2007-09-08 7:25 ` Nick Piggin
2007-09-08 7:31 ` Nick Piggin
2007-09-08 9:43 ` Goswin von Brederlow
2007-09-07 20:12 ` Nick Piggin
2007-09-07 21:00 ` Goswin von Brederlow
2007-09-08 7:14 ` Nick Piggin [this message]
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=200709081714.10278.nickpiggin@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=bfields@fieldses.org \
--cc=brederlo@informatik.uni-tuebingen.de \
--cc=brian@clusterfs.com \
--cc=bs@q-leap.de \
--cc=linux-kernel@vger.kernel.org \
--cc=randy.dunlap@oracle.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
all inboxes | Powered by JetHome®