linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@digeo.com>
To: "David S. Miller" <davem@redhat.com>
Cc: rmk@arm.linux.org.uk, LW@KARO-electronics.de,
	linux-kernel@vger.kernel.org, torvalds@transmeta.com
Subject: Re: [patch] cache flush bug in mm/filemap.c (all kernels >= 2.5.30(at least))
Date: Fri, 23 May 2003 02:12:04 -0700	[thread overview]
Message-ID: <20030523021204.4e3a4954.akpm@digeo.com> (raw)
In-Reply-To: <1053676924.30675.2.camel@rth.ninka.net>

"David S. Miller" <davem@redhat.com> wrote:
>
> On Thu, 2003-05-22 at 07:11, Russell King wrote:
> > We seem to have flush_icache_page() in install_page() - I wonder whether
> > we should also have flush_dcache_page() in there as well.
> ...
> > Maybe someone more knowledgeable of the VM layer can comment.
> 
> I am not sure of the exact environment install_page() is meant
> to run in, does it always know that no mapping exists at that
> address?

No, it does not - there could have been a different page mapped at that
virtual address.

> If not, something (either there or higher up) needs to be doing
> a flush_cache_page(...) at a minimum.

install_page() did a flush_cache_page() in zap_pte(), if it found there was
already a page mapped by the pte.

That flush_cache_page() was added 28 March 2003.  2.5.30 does not have it.

What's that flush_icache_page() doing in there?  The fine document makes
one suspect it is wrong.


install_page() is prefaulting pages into pagetables, so perhaps it should
have an update_mmu_cache()?

diff -puN mm/fremap.c~install_page-flushing mm/fremap.c
--- 25/mm/fremap.c~install_page-flushing	2003-05-23 02:01:52.000000000 -0700
+++ 25-akpm/mm/fremap.c	2003-05-23 02:09:03.000000000 -0700
@@ -84,7 +84,7 @@ int install_page(struct mm_struct *mm, s
 	pte_unmap(pte);
 	if (flush)
 		flush_tlb_page(vma, addr);
-
+	update_mmu_cache(vma, addr, *pte);
 	spin_unlock(&mm->page_table_lock);
 	pte_chain_free(pte_chain);
 	return 0;

_


  reply	other threads:[~2003-05-23  8:56 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-22 12:34 [patch] cache flush bug in mm/filemap.c (all kernels >= 2.5.30(at least)) LW
2003-05-22 14:03 ` Russell King
2003-05-22 14:11 ` Russell King
2003-05-23  8:02   ` David S. Miller
2003-05-23  9:12     ` Andrew Morton [this message]
2003-05-23  9:49       ` David S. Miller
2003-05-23 10:04         ` Andrew Morton
2003-05-23 10:15           ` David S. Miller
2003-05-23  8:20   ` Lothar Wassmann
2003-05-23  9:24     ` Andrew Morton
2003-05-23 10:04       ` Lothar Wassmann
2003-05-23 10:45         ` Andrew Morton
2003-05-23 11:22           ` Paul Mackerras
2003-05-23 16:54           ` Russell King
2003-05-23 17:31             ` Hugh Dickins
2003-05-23 18:29               ` Andrew Morton
2003-05-23 18:34                 ` Russell King
2003-05-26  3:19                   ` David S. Miller
2003-05-26  5:07                     ` Mika Penttilä
2003-05-26  5:08                       ` David S. Miller
2003-05-26  5:36                         ` Mika Penttilä
2003-05-26  5:36                           ` David S. Miller
2003-05-26 13:18                             ` Roman Zippel
2003-05-26 22:34                               ` David S. Miller
2003-05-27 10:53                                 ` Roman Zippel
2003-05-27 21:22                                   ` David S. Miller
2003-05-28 16:35                                     ` Roman Zippel
2003-05-28 22:47                                       ` David S. Miller
2003-05-29  0:12                                         ` Roman Zippel
2003-05-29  1:37                                           ` David S. Miller
2003-05-29  7:13                                             ` Russell King
2003-05-29  7:15                                               ` David S. Miller
2003-05-29 17:49                                             ` Roman Zippel
2003-05-29 21:09                                               ` David S. Miller
2003-05-26  8:55                     ` Russell King
2003-05-26 13:08                       ` Lothar Wassmann
2003-05-26 22:19                         ` Russell King
2003-05-26 13:25                       ` Jens Axboe
2003-05-26 22:35                       ` David S. Miller
2003-05-26  3:20                   ` David S. Miller
2003-05-23 11:13         ` Russell King
2003-05-23 12:46           ` Lothar Wassmann
2003-05-23 15:42             ` Hugh Dickins
2003-05-25 17:10               ` David Woodhouse
2003-05-26 11:44               ` Lothar Wassmann

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=20030523021204.4e3a4954.akpm@digeo.com \
    --to=akpm@digeo.com \
    --cc=LW@KARO-electronics.de \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    --cc=torvalds@transmeta.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 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).