Re: open(O_DIRECT) on a tmpfs?

2007-01-08 Thread Bill Davidsen
Denis Vlasenko wrote: On Friday 05 January 2007 17:20, Bill Davidsen wrote: Denis Vlasenko wrote: But O_DIRECT is _not_ about cache. At least I think it was not about cache initially, it was more about DMAing data directly from/to application address space to/from disks, saving

Re: open(O_DIRECT) on a tmpfs?

2007-01-08 Thread Bill Davidsen
Denis Vlasenko wrote: On Friday 05 January 2007 17:20, Bill Davidsen wrote: Denis Vlasenko wrote: But O_DIRECT is _not_ about cache. At least I think it was not about cache initially, it was more about DMAing data directly from/to application address space to/from disks, saving

Re: open(O_DIRECT) on a tmpfs?

2007-01-05 Thread Denis Vlasenko
On Friday 05 January 2007 17:20, Bill Davidsen wrote: > Denis Vlasenko wrote: > > But O_DIRECT is _not_ about cache. At least I think it was not about > > cache initially, it was more about DMAing data directly from/to > > application address space to/from disks, saving memcpy's and double > >

Re: open(O_DIRECT) on a tmpfs?

2007-01-05 Thread Bill Davidsen
Denis Vlasenko wrote: On Thursday 04 January 2007 17:19, Bill Davidsen wrote: Hugh Dickins wrote: In many cases the use of O_DIRECT is purely to avoid impact on cache used by other applications. An application which writes a large quantity of data will have less impact on other

Re: open(O_DIRECT) on a tmpfs?

2007-01-05 Thread Jesper Juhl
On 05/01/07, Jesper Juhl <[EMAIL PROTECTED]> wrote: On 04/01/07, Hua Zhong <[EMAIL PROTECTED]> wrote: > > I see that as a good argument _not_ to allow O_DIRECT on > > tmpfs, which inevitably impacts cache, even if O_DIRECT were > > requested. > > > > But I'd also expect any app requesting

Re: open(O_DIRECT) on a tmpfs?

2007-01-05 Thread Jesper Juhl
On 04/01/07, Hua Zhong <[EMAIL PROTECTED]> wrote: > I see that as a good argument _not_ to allow O_DIRECT on > tmpfs, which inevitably impacts cache, even if O_DIRECT were > requested. > > But I'd also expect any app requesting O_DIRECT in that way, > as a caring citizen, to fall back to going

Re: open(O_DIRECT) on a tmpfs?

2007-01-05 Thread Helge Hafting
Hugh Dickins wrote: On Thu, 4 Jan 2007, Hua Zhong wrote: So I'd argue that it makes more sense to support O_DIRECT on tmpfs as the memory IS the backing store. A few more voices in favour and I'll be persuaded. Perhaps I'm out of date: when O_DIRECT came in, just a few filesystems

Re: open(O_DIRECT) on a tmpfs?

2007-01-05 Thread Michael Tokarev
Hugh Dickins wrote: > On Thu, 4 Jan 2007, Michael Tokarev wrote: >> I wonder why open() with O_DIRECT (for example) bit set is >> disallowed on a tmpfs (again, for example) filesystem, >> returning EINVAL. [] > p.s. You said "O_DIRECT (for example)" - what other open > flag do you think tmpfs

Re: open(O_DIRECT) on a tmpfs?

2007-01-05 Thread Michael Tokarev
Hugh Dickins wrote: On Thu, 4 Jan 2007, Michael Tokarev wrote: I wonder why open() with O_DIRECT (for example) bit set is disallowed on a tmpfs (again, for example) filesystem, returning EINVAL. [] p.s. You said O_DIRECT (for example) - what other open flag do you think tmpfs should support

Re: open(O_DIRECT) on a tmpfs?

2007-01-05 Thread Helge Hafting
Hugh Dickins wrote: On Thu, 4 Jan 2007, Hua Zhong wrote: So I'd argue that it makes more sense to support O_DIRECT on tmpfs as the memory IS the backing store. A few more voices in favour and I'll be persuaded. Perhaps I'm out of date: when O_DIRECT came in, just a few filesystems

Re: open(O_DIRECT) on a tmpfs?

2007-01-05 Thread Jesper Juhl
On 04/01/07, Hua Zhong [EMAIL PROTECTED] wrote: I see that as a good argument _not_ to allow O_DIRECT on tmpfs, which inevitably impacts cache, even if O_DIRECT were requested. But I'd also expect any app requesting O_DIRECT in that way, as a caring citizen, to fall back to going without

Re: open(O_DIRECT) on a tmpfs?

2007-01-05 Thread Jesper Juhl
On 05/01/07, Jesper Juhl [EMAIL PROTECTED] wrote: On 04/01/07, Hua Zhong [EMAIL PROTECTED] wrote: I see that as a good argument _not_ to allow O_DIRECT on tmpfs, which inevitably impacts cache, even if O_DIRECT were requested. But I'd also expect any app requesting O_DIRECT in that

Re: open(O_DIRECT) on a tmpfs?

2007-01-05 Thread Bill Davidsen
Denis Vlasenko wrote: On Thursday 04 January 2007 17:19, Bill Davidsen wrote: Hugh Dickins wrote: In many cases the use of O_DIRECT is purely to avoid impact on cache used by other applications. An application which writes a large quantity of data will have less impact on other

Re: open(O_DIRECT) on a tmpfs?

2007-01-05 Thread Denis Vlasenko
On Friday 05 January 2007 17:20, Bill Davidsen wrote: Denis Vlasenko wrote: But O_DIRECT is _not_ about cache. At least I think it was not about cache initially, it was more about DMAing data directly from/to application address space to/from disks, saving memcpy's and double allocations.

RE: open(O_DIRECT) on a tmpfs?

2007-01-04 Thread Chen, Kenneth W
Hugh Dickins wrote on Thursday, January 04, 2007 11:14 AM > On Thu, 4 Jan 2007, Hua Zhong wrote: > > So I'd argue that it makes more sense to support O_DIRECT > > on tmpfs as the memory IS the backing store. > > A few more voices in favour and I'll be persuaded. Perhaps I'm > out of date: when

Re: open(O_DIRECT) on a tmpfs?

2007-01-04 Thread Nick Piggin
Denis Vlasenko wrote: On Thursday 04 January 2007 17:19, Bill Davidsen wrote: Hugh Dickins wrote: In many cases the use of O_DIRECT is purely to avoid impact on cache used by other applications. An application which writes a large quantity of data will have less impact on other applications

Re: open(O_DIRECT) on a tmpfs?

2007-01-04 Thread Denis Vlasenko
On Thursday 04 January 2007 17:19, Bill Davidsen wrote: > Hugh Dickins wrote: > In many cases the use of O_DIRECT is purely to avoid impact on cache > used by other applications. An application which writes a large quantity > of data will have less impact on other applications by using O_DIRECT,

Re: open(O_DIRECT) on a tmpfs?

2007-01-04 Thread Mark Lord
Hugh Dickins wrote: On Thu, 4 Jan 2007, Hua Zhong wrote: So I'd argue that it makes more sense to support O_DIRECT on tmpfs as the memory IS the backing store. A few more voices in favour and I'll be persuaded. I see no reason to restrict it as is currently done. Policy belongs in

RE: open(O_DIRECT) on a tmpfs?

2007-01-04 Thread Hugh Dickins
On Thu, 4 Jan 2007, Hua Zhong wrote: > > So I'd argue that it makes more sense to support O_DIRECT > on tmpfs as the memory IS the backing store. A few more voices in favour and I'll be persuaded. Perhaps I'm out of date: when O_DIRECT came in, just a few filesystems supported it, and it was

RE: open(O_DIRECT) on a tmpfs?

2007-01-04 Thread Hua Zhong
> I see that as a good argument _not_ to allow O_DIRECT on > tmpfs, which inevitably impacts cache, even if O_DIRECT were > requested. > > But I'd also expect any app requesting O_DIRECT in that way, > as a caring citizen, to fall back to going without O_DIRECT > when it's not supported.

Re: open(O_DIRECT) on a tmpfs?

2007-01-04 Thread Bill Davidsen
Peter Staubach wrote: Hugh Dickins wrote: On Thu, 4 Jan 2007, Bill Davidsen wrote: In many cases the use of O_DIRECT is purely to avoid impact on cache used by other applications. An application which writes a large quantity of data will have less impact on other applications by using

Re: open(O_DIRECT) on a tmpfs?

2007-01-04 Thread Peter Staubach
Hugh Dickins wrote: On Thu, 4 Jan 2007, Bill Davidsen wrote: In many cases the use of O_DIRECT is purely to avoid impact on cache used by other applications. An application which writes a large quantity of data will have less impact on other applications by using O_DIRECT, assuming that the

Re: open(O_DIRECT) on a tmpfs?

2007-01-04 Thread Hugh Dickins
On Thu, 4 Jan 2007, Bill Davidsen wrote: > > In many cases the use of O_DIRECT is purely to avoid impact on cache used by > other applications. An application which writes a large quantity of data will > have less impact on other applications by using O_DIRECT, assuming that the > data will not

Re: open(O_DIRECT) on a tmpfs?

2007-01-04 Thread Bill Davidsen
Hugh Dickins wrote: On Thu, 4 Jan 2007, Michael Tokarev wrote: I wonder why open() with O_DIRECT (for example) bit set is disallowed on a tmpfs (again, for example) filesystem, returning EINVAL. Because it would be (a very small amount of) work and bloat to support O_DIRECT on tmpfs; because

Re: open(O_DIRECT) on a tmpfs?

2007-01-04 Thread Bodo Eggert
Michael Tokarev <[EMAIL PROTECTED]> wrote: > I wonder why open() with O_DIRECT (for example) bit set is > disallowed on a tmpfs (again, for example) filesystem, > returning EINVAL. > > Yes, the question may seems strange a bit, because of two > somewhat conflicting reasons. First, there's no

Re: open(O_DIRECT) on a tmpfs?

2007-01-04 Thread Hugh Dickins
On Thu, 4 Jan 2007, Michael Tokarev wrote: > I wonder why open() with O_DIRECT (for example) bit set is > disallowed on a tmpfs (again, for example) filesystem, > returning EINVAL. Because it would be (a very small amount of) work and bloat to support O_DIRECT on tmpfs; because that work didn't

Re: open(O_DIRECT) on a tmpfs?

2007-01-04 Thread Hugh Dickins
On Thu, 4 Jan 2007, Michael Tokarev wrote: I wonder why open() with O_DIRECT (for example) bit set is disallowed on a tmpfs (again, for example) filesystem, returning EINVAL. Because it would be (a very small amount of) work and bloat to support O_DIRECT on tmpfs; because that work didn't seem

Re: open(O_DIRECT) on a tmpfs?

2007-01-04 Thread Bodo Eggert
Michael Tokarev [EMAIL PROTECTED] wrote: I wonder why open() with O_DIRECT (for example) bit set is disallowed on a tmpfs (again, for example) filesystem, returning EINVAL. Yes, the question may seems strange a bit, because of two somewhat conflicting reasons. First, there's no reason to

Re: open(O_DIRECT) on a tmpfs?

2007-01-04 Thread Bill Davidsen
Hugh Dickins wrote: On Thu, 4 Jan 2007, Michael Tokarev wrote: I wonder why open() with O_DIRECT (for example) bit set is disallowed on a tmpfs (again, for example) filesystem, returning EINVAL. Because it would be (a very small amount of) work and bloat to support O_DIRECT on tmpfs; because

Re: open(O_DIRECT) on a tmpfs?

2007-01-04 Thread Hugh Dickins
On Thu, 4 Jan 2007, Bill Davidsen wrote: In many cases the use of O_DIRECT is purely to avoid impact on cache used by other applications. An application which writes a large quantity of data will have less impact on other applications by using O_DIRECT, assuming that the data will not be

Re: open(O_DIRECT) on a tmpfs?

2007-01-04 Thread Peter Staubach
Hugh Dickins wrote: On Thu, 4 Jan 2007, Bill Davidsen wrote: In many cases the use of O_DIRECT is purely to avoid impact on cache used by other applications. An application which writes a large quantity of data will have less impact on other applications by using O_DIRECT, assuming that the

Re: open(O_DIRECT) on a tmpfs?

2007-01-04 Thread Bill Davidsen
Peter Staubach wrote: Hugh Dickins wrote: On Thu, 4 Jan 2007, Bill Davidsen wrote: In many cases the use of O_DIRECT is purely to avoid impact on cache used by other applications. An application which writes a large quantity of data will have less impact on other applications by using

RE: open(O_DIRECT) on a tmpfs?

2007-01-04 Thread Hua Zhong
I see that as a good argument _not_ to allow O_DIRECT on tmpfs, which inevitably impacts cache, even if O_DIRECT were requested. But I'd also expect any app requesting O_DIRECT in that way, as a caring citizen, to fall back to going without O_DIRECT when it's not supported. According

RE: open(O_DIRECT) on a tmpfs?

2007-01-04 Thread Hugh Dickins
On Thu, 4 Jan 2007, Hua Zhong wrote: So I'd argue that it makes more sense to support O_DIRECT on tmpfs as the memory IS the backing store. A few more voices in favour and I'll be persuaded. Perhaps I'm out of date: when O_DIRECT came in, just a few filesystems supported it, and it was

Re: open(O_DIRECT) on a tmpfs?

2007-01-04 Thread Mark Lord
Hugh Dickins wrote: On Thu, 4 Jan 2007, Hua Zhong wrote: So I'd argue that it makes more sense to support O_DIRECT on tmpfs as the memory IS the backing store. A few more voices in favour and I'll be persuaded. I see no reason to restrict it as is currently done. Policy belongs in

Re: open(O_DIRECT) on a tmpfs?

2007-01-04 Thread Denis Vlasenko
On Thursday 04 January 2007 17:19, Bill Davidsen wrote: Hugh Dickins wrote: In many cases the use of O_DIRECT is purely to avoid impact on cache used by other applications. An application which writes a large quantity of data will have less impact on other applications by using O_DIRECT,

Re: open(O_DIRECT) on a tmpfs?

2007-01-04 Thread Nick Piggin
Denis Vlasenko wrote: On Thursday 04 January 2007 17:19, Bill Davidsen wrote: Hugh Dickins wrote: In many cases the use of O_DIRECT is purely to avoid impact on cache used by other applications. An application which writes a large quantity of data will have less impact on other applications

RE: open(O_DIRECT) on a tmpfs?

2007-01-04 Thread Chen, Kenneth W
Hugh Dickins wrote on Thursday, January 04, 2007 11:14 AM On Thu, 4 Jan 2007, Hua Zhong wrote: So I'd argue that it makes more sense to support O_DIRECT on tmpfs as the memory IS the backing store. A few more voices in favour and I'll be persuaded. Perhaps I'm out of date: when O_DIRECT