Re: [RFC] VFS: File System Mount Wide O_DIRECT Support

2012-09-04 Thread Zach Brown
> > The idea is simple, leave the desicion for the file system user to enable > > file system mount > > wide O_DIRECT support with a new mount option, for example, > I believe a better approach to your problem is actually to enable > loopback device driver to use direct IO. Someone was actuall

Re: [RFC] VFS: File System Mount Wide O_DIRECT Support

2012-09-04 Thread Matthew Wilcox
On Tue, Sep 04, 2012 at 06:57:14AM -0400, Christoph Hellwig wrote: > On Tue, Sep 04, 2012 at 06:17:47PM +0800, Li Wang wrote: > > For file system created on file-backed loop device, there will be > > two-levels of > > page cache present, which typically doubles the memory consumption. > > And t

Re: [RFC] VFS: File System Mount Wide O_DIRECT Support

2012-09-04 Thread Jan Kara
On Tue 04-09-12 18:17:47, Li Wang wrote: > For file system created on file-backed loop device, there will be two-levels > of > page cache present, which typically doubles the memory consumption. > In many cases, it is beneficial to turn on the O_DIRECT option while > performing > the upper fil

Re: [RFC] VFS: File System Mount Wide O_DIRECT Support

2012-09-04 Thread Christoph Hellwig
On Tue, Sep 04, 2012 at 06:17:47PM +0800, Li Wang wrote: > For file system created on file-backed loop device, there will be two-levels > of > page cache present, which typically doubles the memory consumption. And the right fix is to not use buffer I/O on the backing file instead of hacks like

[RFC] VFS: File System Mount Wide O_DIRECT Support

2012-09-04 Thread Li Wang
For file system created on file-backed loop device, there will be two-levels of page cache present, which typically doubles the memory consumption. In many cases, it is beneficial to turn on the O_DIRECT option while performing the upper file system file IO, to bypass the upper page cache, which