Re: patch: improve generic_file_buffered_write() (2nd try 1/2)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Nick Piggin
Date: Friday, September 7, 2007 - 9:15 pm

On Thursday 06 September 2007 03:41, Bernd Schubert wrote:


Minor nit: when resubmitting a patch, you should include everything
(ie. the full changelog of problem statement and fix description) in a
single mail. It's just a bit easier...

So I believe the problem is that for a multi-segment iovec, we currently
prepare_write/commit_write once for each segment, right? We do this
because there is a nasty deadlock in the VM (copy_from_user being
called with a page locked), and copying multiple segs dramatically
increases the chances that one of these copies will cause a page fault
and thus potentially deadlock.

The fix you have I don't think can work because a filesystem must be
notified of the modification _before_ it has happened. (If I understand
correctly, you are skipping the prepare_write potentially until after
some data is copied?).

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?

Thanks,
Nick

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
patch: improve generic_file_buffered_write(), Bernd Schubert, (Wed Sep 5, 6:45 am)
Re: patch: improve generic_file_buffered_write(), Randy Dunlap, (Wed Sep 5, 8:35 am)
Re: patch: improve generic_file_buffered_write() (2nd try 1/2), Goswin von Brederlow, (Fri Sep 7, 1:01 pm)
Re: patch: improve generic_file_buffered_write() (2nd try 1/2), Goswin von Brederlow, (Fri Sep 7, 2:00 pm)
Re: patch: improve generic_file_buffered_write() (2nd try 1/2), Nick Piggin, (Fri Sep 7, 9:15 pm)