lkml.org 
[lkml]   [2007]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: open(O_DIRECT) on a tmpfs?
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 supported
> it, and it was perfectly normal for open O_DIRECT to be failed; but
> I wouldn't want tmpfs to stand out now as a lone obstacle.
>
Having tmpfs suppoting O_DIRECT makes sense.
For me, O_DIRECT says "write directly to the device
and don't return till its done." Which is what tmpfs
always do anyway.

The support could probably be as simple as ignoring
the flag entirely, mask it away in open() or something like that.


Arguments about "O_DIRECT says don't cache it and tmpfs
_is_ the cache" don't work. O_DIRECT says "write straight
to the device" and the device just happens to be pagecache
memory. The tmpfs file sure isn't cached elsewhere in
addition to its tmpfs pages.

Helge Hafting

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-01-05 15:51    [W:1.083 / U:27.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site