[lkml]   [2000]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] Cache alias issues for swapped page
NIIBE Yutaka writes:
> (2) Flush is needed at try_to_swap
> When swap out, flushing is needed for physical tag too.
> diff -ruN linux-2.4.0-test8-pre6/mm/vmscan.c linux/mm/vmscan.c
> */
> + flush_page_to_ram(page);
> flush_cache_page(vma, address);

I'm concerned about this. It is my understanding that just before this
point, there shouldn't be any data in the cache for the kernels direct
mapped page (only the user space mapping), so why doesn't
flush_cache_page(vma, address) clean/invalidate the cache?

Also, I believe that the use of flush_page_to_ram() is wrong here, since
this seems to be intended to be used when the kernel has been writing to
its direct mapped version of the page, which is should not have been (if
it has, then the act of writing is a bug, not the apparantly missing call).

I'm also looking at the SH4 cache code in test8. flush_cache_page()
appears to invalidate out all cache entries whose physical tag
corresponds to "page". flush_page_to_ram() unsets the "updated" bit
on the physical tags. So, flush_cache_page() is a superset of
flush_page_to_ram() - I don't see the problem here.
|_____| ------------------------------------------------- ---+---+-
| | Russell King --- ---
| | | | / / |
| +-+-+ --- -+-
/ | THE developer of ARM Linux |+| /|\
/ | | | --- |
+-+-+ ------------------------------------------------- /\\\ |
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:38    [W:0.044 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site