linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: MinChan Kim <minchan.kim@gmail.com>
To: Nick Piggin <npiggin@suse.de>
Cc: Matthew Wilcox <matthew@wil.cx>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-fsdevel@vger.kernel.org, akpm@linux-foundation.org
Subject: Re: [PATCH] Remove needless flush_dcache_page call
Date: Fri, 16 Jan 2009 15:16:57 +0900	[thread overview]
Message-ID: <20090116061657.GC6515@barrios-desktop> (raw)
In-Reply-To: <20090116061341.GB22810@wotan.suse.de>

On Fri, Jan 16, 2009 at 07:13:41AM +0100, Nick Piggin wrote:
> On Fri, Jan 16, 2009 at 03:08:30PM +0900, MinChan Kim wrote:
> > On Thu, Jan 15, 2009 at 10:57:30PM -0700, Matthew Wilcox wrote:
> > > Most I/O devices will do DMA to the page in question and thus the kernel
> > > hasn't written to it and the CPU won't have the data in cache.  For the
> > > few devices which can't do DMA, it's the responsibility of the device
> > > driver to call flush_dcache_page() (or some other flushing primitive).
> > 
> > Hmm.. Now I am confusing. 
> > If devicer driver or with DMA makes sure cache consistency,
> > Why filesystem code have to handle it ?
> 
> Because the filesystem is accessing the page directly rathe rthan going to
> IO.
> 
> Basically, whoever reads or writes the page is responsible to avoid user
> aliases. You see these calls in the VM for anonymous pages, in bounce
> buffer layers, in filesystems that read or write from pages that are
> exposed to userspace (ie. metadata generally need not be flushed because
> it will not be mmapped by userspace).

Totally, understand.
Thanks for kind answering to my poor question in patience.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2009-01-16  6:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-16  5:28 [PATCH] Remove needless flush_dcache_page call MinChan Kim
2009-01-16  5:33 ` Matthew Wilcox
2009-01-16  5:51   ` MinChan Kim
2009-01-16  5:57     ` Matthew Wilcox
2009-01-16  6:08       ` MinChan Kim
2009-01-16  6:13         ` Nick Piggin
2009-01-16  6:16           ` MinChan Kim [this message]
2009-01-16  5:59     ` Nick Piggin
2009-01-16  6:01       ` Matthew Wilcox

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=20090116061657.GC6515@barrios-desktop \
    --to=minchan.kim@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=matthew@wil.cx \
    --cc=npiggin@suse.de \
    /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;
as well as URLs for NNTP newsgroup(s).