linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NIIBE Yutaka <gniibe@m17n.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: rmk@arm.linux.org.uk (Russell King),
	marcelo@conectiva.com.br (Marcelo Tosatti),
	torvalds@transmeta.com (Linus Torvalds),
	linux-kernel@vger.kernel.org (lkml)
Subject: Re: [PATCH] swapin flush cache bug
Date: Wed, 14 Feb 2001 11:08:07 +0900 (JST)	[thread overview]
Message-ID: <200102140208.LAA18226@mule.m17n.org> (raw)
In-Reply-To: <E14Sdb6-0001V5-00@the-village.bc.nu>
In-Reply-To: <200102131053.TAA11808@mule.m17n.org> <E14Sdb6-0001V5-00@the-village.bc.nu>

Alan Cox wrote:
 > Ok we need to handle that case a bit more intelligently so those flushes dont
 > get into other ports code paths. 

Possibly at fs/buffer.c:end_buffer_io_async?

We need to flush the cache when I/O was READ or READA.  Is there any
way for end_buffer_io_async to distinguish which I/O (READ or WRITE)
has been done?

--------------------------------------
Problem with write-back cache.

(1) Page got swapped out

           Swap out
   [ Disk ] <---- P [ Page ]

(2) Page got swapped in asynchronously, possibly by read-ahead

           Swap in
   [ Disk ] ----> P [ Page ]
	          K

   The I/O from disk goes through kernel virtual address K.
   We have cache entries indexed by K.

(3) Page fault occurs at user space U

   [ Disk ]       P [ Page ] <----- U
		  K

   The control goes to do_swap_page, found the page at
   lookup_swap_cache.

   If K and U indexes differently, we have cache alias issues, 
   we need to flush the entries indexed by K.
-- 

  parent reply	other threads:[~2001-02-14  2:09 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 [this message]
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             ` Cache issues NIIBE Yutaka
2001-07-03  0:04               ` 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=200102140208.LAA18226@mule.m17n.org \
    --to=gniibe@m17n.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    --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).