From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Subject: [PATCH 00/11 v2] Push file_update_time() into .page_mkwrite Date: Thu, 1 Mar 2012 12:41:34 +0100 Message-ID: <1330602103-8851-1-git-send-email-jack@suse.cz> Cc: linux-mm@kvack.org, LKML , Al Viro , linux-fsdevel@vger.kernel.org, dchinner@redhat.com, Jan Kara , Jaya Kumar , Sage Weil , ceph-devel@vger.kernel.org, Steve French , linux-cifs@vger.kernel.org, Eric Van Hensbergen , Ron Minnich , Latchesar Ionkov , v9fs-developer@lists.sourceforge.net, Miklos Szeredi , fuse-devel@lists.sourceforge.net, Steven Whitehouse , cluster-devel@redhat.com, Greg Kroah-Hartman To: Andrew Morton Return-path: Sender: owner-linux-mm@kvack.org List-Id: linux-cifs.vger.kernel.org Hello, to provide reliable support for filesystem freezing, filesystems need to have complete control over when metadata is changed. In particular, file_update_time() calls from page fault code make it impossible for filesystems to prevent inodes from being dirtied while the filesystem is frozen. To fix the issue, this patch set changes page fault code to call file_update_time() only when ->page_mkwrite() callback is not provided. If the callback is provided, it is the responsibility of the filesystem to perform update of i_mtime / i_ctime if needed. We also push file_update_time() call to all existing ->page_mkwrite() implementations if the time update does not obviously happen by other means. If you know your filesystem does not need update of modification times in ->page_mkwrite() handler, please speak up and I'll drop the patch for your filesystem. As a side note, an alternative would be to remove call of file_update_time() from page fault code altogether and require all filesystems needing it to do that in their ->page_mkwrite() implementation. That is certainly possible although maybe slightly inefficient and would require auditting 100+ vm_operations_structs *shiver*. Changes since v1: * Dropped patches for filesystems which don't need them * Added some acks * Improved sysfs patch by Alex Elder's suggestion Andrew, would you be willing to merge these patches via your tree? Honza CC: Jaya Kumar CC: Sage Weil CC: ceph-devel@vger.kernel.org CC: Steve French CC: linux-cifs@vger.kernel.org CC: Eric Van Hensbergen CC: Ron Minnich CC: Latchesar Ionkov CC: v9fs-developer@lists.sourceforge.net CC: Miklos Szeredi CC: fuse-devel@lists.sourceforge.net CC: Steven Whitehouse CC: cluster-devel@redhat.com CC: Greg Kroah-Hartman -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Subject: [PATCH 4/9] cifs: Push file_update_time() into cifs_page_mkwrite() Date: Thu, 1 Mar 2012 12:41:38 +0100 Message-ID: <1330602103-8851-5-git-send-email-jack@suse.cz> References: <1330602103-8851-1-git-send-email-jack@suse.cz> Cc: linux-mm@kvack.org, LKML , Al Viro , linux-fsdevel@vger.kernel.org, dchinner@redhat.com, Jan Kara , Steve French , linux-cifs@vger.kernel.org To: Andrew Morton Return-path: In-Reply-To: <1330602103-8851-1-git-send-email-jack@suse.cz> Sender: owner-linux-mm@kvack.org List-Id: linux-cifs.vger.kernel.org CC: Steve French CC: linux-cifs@vger.kernel.org Signed-off-by: Jan Kara --- fs/cifs/file.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 4dd9283..8e3b23b 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -2425,6 +2425,9 @@ cifs_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) { struct page *page = vmf->page; + /* Update file times before taking page lock */ + file_update_time(vma->vm_file); + lock_page(page); return VM_FAULT_LOCKED; } -- 1.7.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Subject: Re: [PATCH 00/11 v2] Push file_update_time() into .page_mkwrite Date: Thu, 1 Mar 2012 13:23:19 +0100 Message-ID: <20120301122319.GE4385@quack.suse.cz> References: <1330602103-8851-1-git-send-email-jack@suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-mm@kvack.org, LKML , Al Viro , linux-fsdevel@vger.kernel.org, dchinner@redhat.com, Jan Kara , Jaya Kumar , Sage Weil , ceph-devel@vger.kernel.org, Steve French , linux-cifs@vger.kernel.org, Eric Van Hensbergen , Ron Minnich , Latchesar Ionkov , v9fs-developer@lists.sourceforge.net, Miklos Szeredi , fuse-devel@lists.sourceforge.net, Steven Whitehouse , cluster-devel@redhat.com, Greg Kroah-Hartman To: Andrew Morton Return-path: Content-Disposition: inline In-Reply-To: <1330602103-8851-1-git-send-email-jack@suse.cz> Sender: owner-linux-mm@kvack.org List-Id: linux-cifs.vger.kernel.org Bah, the subject should have been 0/9... Sorry. Honza On Thu 01-03-12 12:41:34, Jan Kara wrote: > Hello, > > to provide reliable support for filesystem freezing, filesystems need to have > complete control over when metadata is changed. In particular, > file_update_time() calls from page fault code make it impossible for > filesystems to prevent inodes from being dirtied while the filesystem is > frozen. > > To fix the issue, this patch set changes page fault code to call > file_update_time() only when ->page_mkwrite() callback is not provided. If the > callback is provided, it is the responsibility of the filesystem to perform > update of i_mtime / i_ctime if needed. We also push file_update_time() call > to all existing ->page_mkwrite() implementations if the time update does not > obviously happen by other means. If you know your filesystem does not need > update of modification times in ->page_mkwrite() handler, please speak up and > I'll drop the patch for your filesystem. > > As a side note, an alternative would be to remove call of file_update_time() > from page fault code altogether and require all filesystems needing it to do > that in their ->page_mkwrite() implementation. That is certainly possible > although maybe slightly inefficient and would require auditting 100+ > vm_operations_structs *shiver*. > > Changes since v1: > * Dropped patches for filesystems which don't need them > * Added some acks > * Improved sysfs patch by Alex Elder's suggestion > > Andrew, would you be willing to merge these patches via your tree? > > Honza > > CC: Jaya Kumar > CC: Sage Weil > CC: ceph-devel@vger.kernel.org > CC: Steve French > CC: linux-cifs@vger.kernel.org > CC: Eric Van Hensbergen > CC: Ron Minnich > CC: Latchesar Ionkov > CC: v9fs-developer@lists.sourceforge.net > CC: Miklos Szeredi > CC: fuse-devel@lists.sourceforge.net > CC: Steven Whitehouse > CC: cluster-devel@redhat.com > CC: Greg Kroah-Hartman > -- > To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Jan Kara SUSE Labs, CR -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Layton Subject: Re: [PATCH 4/9] cifs: Push file_update_time() into cifs_page_mkwrite() Date: Thu, 1 Mar 2012 07:25:37 -0500 Message-ID: <20120301072537.502bd918@tlielax.poochiereds.net> References: <1330602103-8851-1-git-send-email-jack@suse.cz> <1330602103-8851-5-git-send-email-jack@suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Andrew Morton , linux-mm@kvack.org, LKML , Al Viro , linux-fsdevel@vger.kernel.org, dchinner@redhat.com, Steve French , linux-cifs@vger.kernel.org To: Jan Kara Return-path: In-Reply-To: <1330602103-8851-5-git-send-email-jack@suse.cz> Sender: owner-linux-mm@kvack.org List-Id: linux-cifs.vger.kernel.org On Thu, 1 Mar 2012 12:41:38 +0100 Jan Kara wrote: > CC: Steve French > CC: linux-cifs@vger.kernel.org > Signed-off-by: Jan Kara > --- > fs/cifs/file.c | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/fs/cifs/file.c b/fs/cifs/file.c > index 4dd9283..8e3b23b 100644 > --- a/fs/cifs/file.c > +++ b/fs/cifs/file.c > @@ -2425,6 +2425,9 @@ cifs_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) > { > struct page *page = vmf->page; > > + /* Update file times before taking page lock */ > + file_update_time(vma->vm_file); > + > lock_page(page); > return VM_FAULT_LOCKED; > } Sorry, I meant to comment on this earlier... I think we can probably drop this patch. cifs doesn't currently set S_NOCMTIME on all inodes (only when MS_NOATIME is set currently), but I think that it probably should. Timestamps should be the purview of the server. -- Jeff Layton -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Subject: Re: [PATCH 4/9] cifs: Push file_update_time() into cifs_page_mkwrite() Date: Thu, 1 Mar 2012 13:30:35 +0100 Message-ID: <20120301123035.GF4385@quack.suse.cz> References: <1330602103-8851-1-git-send-email-jack@suse.cz> <1330602103-8851-5-git-send-email-jack@suse.cz> <20120301072537.502bd918@tlielax.poochiereds.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jan Kara , Andrew Morton , linux-mm@kvack.org, LKML , Al Viro , linux-fsdevel@vger.kernel.org, dchinner@redhat.com, Steve French , linux-cifs@vger.kernel.org To: Jeff Layton Return-path: Content-Disposition: inline In-Reply-To: <20120301072537.502bd918@tlielax.poochiereds.net> Sender: owner-linux-mm@kvack.org List-Id: linux-cifs.vger.kernel.org On Thu 01-03-12 07:25:37, Jeff Layton wrote: > On Thu, 1 Mar 2012 12:41:38 +0100 > Jan Kara wrote: > > > CC: Steve French > > CC: linux-cifs@vger.kernel.org > > Signed-off-by: Jan Kara > > --- > > fs/cifs/file.c | 3 +++ > > 1 files changed, 3 insertions(+), 0 deletions(-) > > > > diff --git a/fs/cifs/file.c b/fs/cifs/file.c > > index 4dd9283..8e3b23b 100644 > > --- a/fs/cifs/file.c > > +++ b/fs/cifs/file.c > > @@ -2425,6 +2425,9 @@ cifs_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) > > { > > struct page *page = vmf->page; > > > > + /* Update file times before taking page lock */ > > + file_update_time(vma->vm_file); > > + > > lock_page(page); > > return VM_FAULT_LOCKED; > > } > > Sorry, I meant to comment on this earlier... > > I think we can probably drop this patch. cifs doesn't currently set > S_NOCMTIME on all inodes (only when MS_NOATIME is set currently), but I > think that it probably should. Timestamps should be the purview of the > server. OK, thanks for letting me know. Patch dropped. Honza -- Jan Kara SUSE Labs, CR -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ted Ts'o Subject: Re: [PATCH 00/11 v2] Push file_update_time() into .page_mkwrite Date: Thu, 1 Mar 2012 18:29:42 -0500 Message-ID: <20120301232942.GH32588@thunk.org> References: <1330602103-8851-1-git-send-email-jack@suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andrew Morton , linux-mm@kvack.org, LKML , Al Viro , linux-fsdevel@vger.kernel.org, dchinner@redhat.com, Jaya Kumar , Sage Weil , ceph-devel@vger.kernel.org, Steve French , linux-cifs@vger.kernel.org, Eric Van Hensbergen , Ron Minnich , Latchesar Ionkov , v9fs-developer@lists.sourceforge.net, Miklos Szeredi , fuse-devel@lists.sourceforge.net, Steven Whitehouse , cluster-devel@redhat.com, Greg Kroah-Hartman To: Jan Kara Return-path: Content-Disposition: inline In-Reply-To: <1330602103-8851-1-git-send-email-jack@suse.cz> Sender: owner-linux-mm@kvack.org List-Id: linux-cifs.vger.kernel.org On Thu, Mar 01, 2012 at 12:41:34PM +0100, Jan Kara wrote: > > To fix the issue, this patch set changes page fault code to call > file_update_time() only when ->page_mkwrite() callback is not provided. If the > callback is provided, it is the responsibility of the filesystem to perform > update of i_mtime / i_ctime if needed. We also push file_update_time() call > to all existing ->page_mkwrite() implementations if the time update does not > obviously happen by other means. If you know your filesystem does not need > update of modification times in ->page_mkwrite() handler, please speak up and > I'll drop the patch for your filesystem. I don't know if this introductory text is going to be saved anywhere permanent, such as the merge commit (since git now has the ability to have much more informative merge descriptions). But if it is going to be preserved, it might be worth mentioning that if the filesystem uses block_page_mkpage(), it will handled automatically for them since the patch series does push the call to file_update_time(0 into __block_page_mkpage(). - Ted -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Subject: Re: [PATCH 00/11 v2] Push file_update_time() into .page_mkwrite Date: Fri, 2 Mar 2012 10:41:22 +0100 Message-ID: <20120302094122.GA1744@quack.suse.cz> References: <1330602103-8851-1-git-send-email-jack@suse.cz> <20120301232942.GH32588@thunk.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jan Kara , Andrew Morton , linux-mm@kvack.org, LKML , Al Viro , linux-fsdevel@vger.kernel.org, dchinner@redhat.com, Jaya Kumar , Sage Weil , ceph-devel@vger.kernel.org, Steve French , linux-cifs@vger.kernel.org, Eric Van Hensbergen , Ron Minnich , Latchesar Ionkov , v9fs-developer@lists.sourceforge.net, Miklos Szeredi , fuse-devel@lists.sourceforge.net, Steven Whitehouse , cluster-devel@redhat.com, Greg Kroah-Hartman To: Ted Ts'o Return-path: Content-Disposition: inline In-Reply-To: <20120301232942.GH32588@thunk.org> Sender: owner-linux-mm@kvack.org List-Id: linux-cifs.vger.kernel.org On Thu 01-03-12 18:29:42, Ted Tso wrote: > On Thu, Mar 01, 2012 at 12:41:34PM +0100, Jan Kara wrote: > > > > To fix the issue, this patch set changes page fault code to call > > file_update_time() only when ->page_mkwrite() callback is not provided. If the > > callback is provided, it is the responsibility of the filesystem to perform > > update of i_mtime / i_ctime if needed. We also push file_update_time() call > > to all existing ->page_mkwrite() implementations if the time update does not > > obviously happen by other means. If you know your filesystem does not need > > update of modification times in ->page_mkwrite() handler, please speak up and > > I'll drop the patch for your filesystem. > > I don't know if this introductory text is going to be saved anywhere > permanent, such as the merge commit (since git now has the ability to > have much more informative merge descriptions). But if it is going to > be preserved, it might be worth mentioning that if the filesystem uses > block_page_mkpage(), it will handled automatically for them since the > patch series does push the call to file_update_time(0 into > __block_page_mkpage(). Good point, added to description. Honza -- Jan Kara SUSE Labs, CR -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Lutomirski Subject: Re: [PATCH 00/11 v2] Push file_update_time() into .page_mkwrite Date: Thu, 08 Mar 2012 15:12:56 -0800 Message-ID: <4F593CF8.2000105@amacapital.net> References: <1330602103-8851-1-git-send-email-jack@suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Andrew Morton , linux-mm@kvack.org, LKML , Al Viro , linux-fsdevel@vger.kernel.org, dchinner@redhat.com, Jaya Kumar , Sage Weil , ceph-devel@vger.kernel.org, Steve French , linux-cifs@vger.kernel.org, Eric Van Hensbergen , Ron Minnich , Latchesar Ionkov , v9fs-developer@lists.sourceforge.net, Miklos Szeredi , fuse-devel@lists.sourceforge.net, Steven Whitehouse , cluster-devel@redhat.com, Greg Kroah-Hartman To: Jan Kara Return-path: In-Reply-To: <1330602103-8851-1-git-send-email-jack@suse.cz> Sender: owner-linux-mm@kvack.org List-Id: linux-cifs.vger.kernel.org On 03/01/2012 03:41 AM, Jan Kara wrote: > Hello, > > to provide reliable support for filesystem freezing, filesystems need to have > complete control over when metadata is changed. In particular, > file_update_time() calls from page fault code make it impossible for > filesystems to prevent inodes from being dirtied while the filesystem is > frozen. > > To fix the issue, this patch set changes page fault code to call > file_update_time() only when ->page_mkwrite() callback is not provided. If the > callback is provided, it is the responsibility of the filesystem to perform > update of i_mtime / i_ctime if needed. We also push file_update_time() call > to all existing ->page_mkwrite() implementations if the time update does not > obviously happen by other means. If you know your filesystem does not need > update of modification times in ->page_mkwrite() handler, please speak up and > I'll drop the patch for your filesystem. > > As a side note, an alternative would be to remove call of file_update_time() > from page fault code altogether and require all filesystems needing it to do > that in their ->page_mkwrite() implementation. That is certainly possible > although maybe slightly inefficient and would require auditting 100+ > vm_operations_structs *shiver*. IMO updating file times should happen when changes get written out, not when a page is made writable, for two reasons: 1. Correctness. With the current approach, it's very easy for files to be changed after the last mtime update -- any changes between mkwrite and actual writeback won't affect mtime. 2. Performance. I have an application (presumably guessable from my email address) for which blocking in page_mkwrite is an absolute show-stopper. (In fact it's so bad that we reverted back to running on Windows until I hacked up a kernel to not do this.) I have an incorrect patch [1] to fix it, but I haven't gotten around to a real fix. (I also have stable pages reverted in my kernel. Some day I'll submit a patch to make it a filesystem option. Or maybe it should even be a block device / queue property like the alignment offset and optimal io size -- there are plenty of block device and file combinations which don't benefit at all from stable pages.) I'd prefer if file_update_time in page_mkwrite didn't proliferate. A better fix is probably to introduce a new inode flag, update it when a page is undirtied, and then dirty and write the inode from the writeback path. (Kind of like my patch, but with an inode flag instead of a page flag, and with the file_update_time done from the fs.) [1] http://patchwork.ozlabs.org/patch/122516/ --Andy -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Subject: Re: [PATCH 00/11 v2] Push file_update_time() into .page_mkwrite Date: Fri, 9 Mar 2012 09:19:52 +0100 Message-ID: <20120309081952.GA21038@quack.suse.cz> References: <1330602103-8851-1-git-send-email-jack@suse.cz> <4F593CF8.2000105@amacapital.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jan Kara , Andrew Morton , linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, LKML , Al Viro , linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, dchinner-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, Jaya Kumar , Sage Weil , ceph-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Steve French , linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Eric Van Hensbergen , Ron Minnich , Latchesar Ionkov , v9fs-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Miklos Szeredi , fuse-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Steven Whitehouse , cluster-devel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, Greg Kroah-Hartman To: Andy Lutomirski Return-path: Content-Disposition: inline In-Reply-To: <4F593CF8.2000105-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org> Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Hello, On Thu 08-03-12 15:12:56, Andy Lutomirski wrote: > On 03/01/2012 03:41 AM, Jan Kara wrote: > > Hello, > > > > to provide reliable support for filesystem freezing, filesystems need to have > > complete control over when metadata is changed. In particular, > > file_update_time() calls from page fault code make it impossible for > > filesystems to prevent inodes from being dirtied while the filesystem is > > frozen. > > > > To fix the issue, this patch set changes page fault code to call > > file_update_time() only when ->page_mkwrite() callback is not provided. If the > > callback is provided, it is the responsibility of the filesystem to perform > > update of i_mtime / i_ctime if needed. We also push file_update_time() call > > to all existing ->page_mkwrite() implementations if the time update does not > > obviously happen by other means. If you know your filesystem does not need > > update of modification times in ->page_mkwrite() handler, please speak up and > > I'll drop the patch for your filesystem. > > > > As a side note, an alternative would be to remove call of file_update_time() > > from page fault code altogether and require all filesystems needing it to do > > that in their ->page_mkwrite() implementation. That is certainly possible > > although maybe slightly inefficient and would require auditting 100+ > > vm_operations_structs *shiver*. > > > > IMO updating file times should happen when changes get written out, not > when a page is made writable, for two reasons: > > 1. Correctness. With the current approach, it's very easy for files to > be changed after the last mtime update -- any changes between mkwrite > and actual writeback won't affect mtime. > > 2. Performance. I have an application (presumably guessable from my > email address) for which blocking in page_mkwrite is an absolute > show-stopper. (In fact it's so bad that we reverted back to running on > Windows until I hacked up a kernel to not do this.) I have an incorrect > patch [1] to fix it, but I haven't gotten around to a real fix. (I also > have stable pages reverted in my kernel. Some day I'll submit a patch > to make it a filesystem option. Or maybe it should even be a block > device / queue property like the alignment offset and optimal io size -- > there are plenty of block device and file combinations which don't > benefit at all from stable pages.) > > I'd prefer if file_update_time in page_mkwrite didn't proliferate. A > better fix is probably to introduce a new inode flag, update it when a > page is undirtied, and then dirty and write the inode from the writeback > path. (Kind of like my patch, but with an inode flag instead of a page > flag, and with the file_update_time done from the fs.) > > [1] http://patchwork.ozlabs.org/patch/122516/ Andy, I'm aware of your problems. Just firstly, I wouldn't like to complicate the filesystem freezing patch set even more by improving unrelated things. And secondly, I think these changes won't make fixing your problem harder. I'd even argue it will be easier because you can do conversion filesystem by filesystem. Getting lock ordering and other things right for all filesystems at once is much harded. Honza -- Jan Kara SUSE Labs, CR