mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: NIIBE Yutaka <gniibe@m17n.org>
To: "David S. Miller" <davem@redhat.com>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Cache issues
Date: Mon, 2 Jul 2001 20:23:58 +0900 (JST)	[thread overview]
Message-ID: <200107021123.f62BNwj02290@mule.m17n.org> (raw)
In-Reply-To: <200106291418.f5TEI0i09541@mule.m17n.org>
In-Reply-To: <200106270051.f5R0pkl19282@mule.m17n.org> <Pine.LNX.4.21.0106270710050.1291-100000@freak.distro.conectiva> <200106280007.f5S07qQ04446@mule.m17n.org> <20010628012349.L1554@redhat.com> <200106280041.f5S0fDr05278@mule.m17n.org> <15162.32433.598824.599520@pizda.ninka.net> <200106280104.f5S14XA05644@mule.m17n.org> <200106291418.f5TEI0i09541@mule.m17n.org>

NIIBE Yutaka wrote:
 > I don't see any reason why we need to flush the cache here.
 > 
 > --- v2.4.6-pre5/mm/memory.c	Mon Jun 25 18:48:10 2001
 > +++ kernel/mm/memory.c	Tue Jun 26 14:48:15 2001
 > @@ -1109,8 +1109,6 @@ static int do_swap_page(struct mm_struct
 >  			return -1;
 >  		}
 >  		wait_on_page(page);
 > -		flush_page_to_ram(page);
 > -		flush_icache_page(vma, page);
 >  	}
 >  
 >  	/*

I've looked thorough all flush_page_to_ram and flush_icache_page calls.
If the architecture support follows the rule of Documentation/cachetlb.txt, 
I think that all the occurrences of flush_page_to_ram and
flush_icache_page are (almost) bogus now.

We have two issues yet:

(1) include/linux/highmem.h:memclear_highpage_flush
    We need to call flush_dcache_page here to remove flush_page_to_ram

(2) kernel/ptrace.c
    We need to call flush_dcache_page here too.
    Special care would be needed here.  I think that we cannot defer
    the flushing here.  There's the case where page->mapping ==
    &swapper_space, thus mapping->i_mmap == NULL 
    && mapping->i_mmap_shared == NULL.

Besides, flush_cache_page in mm/memory.c:{break_cow,do_wp_page}	are
redundant for SH-4.  SH-4's cache is direct mapped, virtually indexed
phisically tagged, so we don't need to flush anything.
-- 

  reply	other threads:[~2001-07-02 11:24 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-12 23:21 [PATCH] swapin flush cache bug Marcelo Tosatti
2001-02-13  9:50 ` Russell King
2001-02-13 10:53 ` NIIBE Yutaka
2001-02-13 11:16   ` Russell King
2001-02-13 11:26   ` Alan Cox
2001-02-13 23:50   ` NIIBE Yutaka
2001-02-14  2:08   ` NIIBE Yutaka
2001-02-14 10:12     ` Marcelo Tosatti
2001-06-27  0:51     ` NIIBE Yutaka
2001-06-27 10:11       ` Marcelo Tosatti
2001-06-28  0:42         ` David S. Miller
2001-06-28  0:07       ` NIIBE Yutaka
2001-06-27 22:41         ` Marcelo Tosatti
2001-06-28  0:23         ` Stephen C. Tweedie
2001-06-28  0:47           ` David S. Miller
2001-06-28  1:10             ` David S. Miller
2001-06-29 14:18             ` NIIBE Yutaka
2001-07-02 22:47               ` Cache issues David S. Miller
2001-06-28  0:41         ` [PATCH] swapin flush cache bug NIIBE Yutaka
2001-06-28  1:04           ` NIIBE Yutaka
2001-07-02 11:23             ` NIIBE Yutaka [this message]
2001-07-03  0:04               ` Cache issues NIIBE Yutaka
2001-06-28  0:46         ` [PATCH] swapin flush cache bug David S. Miller

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=200107021123.f62BNwj02290@mule.m17n.org \
    --to=gniibe@m17n.org \
    --cc=davem@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®