All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bill Davidsen <davidsen@tmr.com>
To: Peter Staubach <staubach@redhat.com>
Cc: Hugh Dickins <hugh@veritas.com>,
	Linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: open(O_DIRECT) on a tmpfs?
Date: Thu, 04 Jan 2007 13:11:01 -0500	[thread overview]
Message-ID: <459D4335.2090500@tmr.com> (raw)
In-Reply-To: <459D3F4A.5070904@redhat.com>

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 O_DIRECT, assuming 
>>> that the
>>> data will not be read from cache due to application pattern or the 
>>> data being
>>> much larger than physical memory.
>>>     
>>
>> 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.
>
> I suppose that one could also argue that the backing store for tmpfs
> is the memory itself and thus, O_DIRECT could or should be supported. 

I suspect that many applications don't try to distinguish an open error 
beyond pass/fail. If the application actually tried to correct errors, 
like creating missing directories, it might, but if the error is going 
to be reported to the user and treated as fatal there's probably no 
logic to tell "can't do it" from "could if you asked the right way."

I always thought the difference between Linux and Windows was the "big 
brother" attitude. If someone wants to use O_DIRECT and tmpfs, and the 
system can allow it, why have code to block it because someone thinks 
they know better how the users should do things.

-- 
bill davidsen <davidsen@tmr.com>
  CTO TMR Associates, Inc
  Doing interesting things with small computers since 1979


  reply	other threads:[~2007-01-04 18:10 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 [this message]
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
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=459D4335.2090500@tmr.com \
    --to=davidsen@tmr.com \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=staubach@redhat.com \
    /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.