public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Naval Saini <navalnovel@gmail.com>,
	linux-arch@vger.kernel.org,
	linux-arm-kernel@lists.arm.linux.org.uk,
	linux-kernel@vger.kernel.org, naval.saini@nxp.com
Subject: Re: O_DIRECT patch for processors with VIPT cache for mainline kernel (specifically arm in our case)
Date: Wed, 19 Nov 2008 20:43:15 +0000	[thread overview]
Message-ID: <20081119204315.GB17209@flint.arm.linux.org.uk> (raw)
In-Reply-To: <200811191740.23638.nickpiggin@yahoo.com.au>

On Wed, Nov 19, 2008 at 05:40:23PM +1100, Nick Piggin wrote:
> It would be interesting to know exactly what problem you are seeing.
> 
> ARM I think is supposed to handle aliasing problems by flushing
> caches at appropriate points. It would be nice to know what's going
> wrong and whether we can cover those holes.

I think there's a problem here: the existing cache handling API is
designed around the MM's manipulation of page tables.  It is generally
not designed to handle aliasing between multiple mappings of the same
page, except with one exception: page cache pages mmap'd into userspace,
which is handled via flush_dcache_page().

O_DIRECT on ARM is probably completely untested for the most part.  It's
not something that is encountered very often, and as such gets zero
testing.  I've certainly never had the tools to be able to test it out,
so even on VIVT it's probably completely buggy.  Bear in mind that most
of my modern platforms use MTD (either cramfs or in the rare case jffs2)
so I'm not sure that I could sensibly even test O_DIRECT - isn't O_DIRECT
for use with proper block devices?

As it's probably clear, I've no clue of the O_DIRECT implementation or
how it's supposed to work.  At a guess, it probably needs a new cache
handling API to be designed, since the existing flush_cache_(range|page)
are basically no-ops on VIPT.  Or maybe we need some way to mark the
userspace pages as being write-through or uncacheable depending on the
features we have available on the processor.  Or something.  Don't know.

So, what is O_DIRECT, and where can I find some information about it?
I don't see anything in Documentation/ describing it.

  parent reply	other threads:[~2008-11-19 20:43 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <d8dd82df0811180606w503563ach8650ab07dcd0a35c@mail.gmail.com>
2008-11-19  6:40 ` O_DIRECT patch for processors with VIPT cache for mainline kernel (specifically arm in our case) Nick Piggin
2008-11-19  6:40   ` Nick Piggin
2008-11-19 20:43   ` Russell King - ARM Linux [this message]
2008-11-20  6:59     ` Nick Piggin
2008-11-20  6:59       ` Nick Piggin
2008-11-20  9:19       ` Russell King - ARM Linux
2008-11-20  9:19         ` Russell King - ARM Linux
2008-11-20 10:55         ` Naval Saini
2008-11-21 17:10         ` Catalin Marinas
2008-11-20 12:28       ` Dmitry Adamushko
2008-11-20 13:25         ` Nick Piggin
2008-11-20 13:25           ` Nick Piggin
2008-11-20 13:55           ` Ralf Baechle
2008-11-20 15:27             ` Matthew Wilcox
2008-11-20 15:27               ` Matthew Wilcox
2008-11-20 17:17               ` Ralf Baechle
2008-11-20 17:40                 ` Matthew Wilcox
2008-11-20 19:30                   ` Russell King - ARM Linux
2008-11-20 19:30                     ` Russell King - ARM Linux
2008-11-20 16:30             ` Russell King - ARM Linux
2008-11-20 16:30               ` Russell King - ARM Linux
2008-11-20 13:59           ` Dmitry Adamushko
2008-11-20 13:59             ` Dmitry Adamushko

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=20081119204315.GB17209@flint.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=naval.saini@nxp.com \
    --cc=navalnovel@gmail.com \
    --cc=nickpiggin@yahoo.com.au \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox