From: Helge Hafting <helge.hafting@aitel.hist.no>
To: Hugh Dickins <hugh@veritas.com>
Cc: Hua Zhong <hzhong@gmail.com>,
Christoph Hellwig <hch@infradead.com>,
"'Bill Davidsen'" <davidsen@tmr.com>,
"'Linux-kernel'" <linux-kernel@vger.kernel.org>
Subject: Re: open(O_DIRECT) on a tmpfs?
Date: Fri, 05 Jan 2007 15:38:55 +0100 [thread overview]
Message-ID: <459E62FF.4010404@aitel.hist.no> (raw)
In-Reply-To: <Pine.LNX.4.64.0701041911470.27405@blonde.wat.veritas.com>
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
next prev parent reply other threads:[~2007-01-05 14:47 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-04 11:52 open(O_DIRECT) on a tmpfs? Michael Tokarev
2007-01-04 13:08 ` Hugh Dickins
2007-01-04 16:19 ` Bill Davidsen
2007-01-04 17:09 ` Hugh Dickins
2007-01-04 17:54 ` Peter Staubach
2007-01-04 18:11 ` Bill Davidsen
2007-01-04 18:41 ` Hua Zhong
2007-01-04 19:14 ` Hugh Dickins
2007-01-04 19:35 ` Mark Lord
2007-01-05 6:57 ` Chen, Kenneth W
2007-01-05 14:38 ` Helge Hafting [this message]
2007-01-05 14:58 ` Jesper Juhl
2007-01-05 14:59 ` Jesper Juhl
2007-01-04 22:17 ` Denis Vlasenko
2007-01-05 5:30 ` Nick Piggin
2007-01-05 16:20 ` Bill Davidsen
2007-01-06 0:30 ` Denis Vlasenko
2007-01-08 19:42 ` Bill Davidsen
2007-01-05 11:49 ` Michael Tokarev
[not found] <7zzqw-SS-27@gated-at.bofh.it>
2007-01-04 14:47 ` Bodo Eggert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=459E62FF.4010404@aitel.hist.no \
--to=helge.hafting@aitel.hist.no \
--cc=davidsen@tmr.com \
--cc=hch@infradead.com \
--cc=hugh@veritas.com \
--cc=hzhong@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.