lkml.org 
[lkml]   [1999]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: SwapCache bug?
Hi,

> > Also in do_wp_page(), what happens to a swap-cached page whose reference
> > count is greater than 2? There looks like a missing default case which
> > does a swap_free().
>
> No, that is very much deliberate: there may well be other processes
> around which still refer to the copy on disk, so we want to do a COW and
> keep the swap cache copy present. (This catches the case of a
> partially-swapped-out process which keeps forking: if one child swaps a
> page in, then we do a COW and the next child to access that page will
> find its copy already in cache.)

I agree there maybe other processes around which refer to the disk copy,
but isn't there a need to decrement the reference count for this disk
copy on a COW? ie. do a swap_free() when the page ref count is greater
than 2 - not to free the disk-copy, but to keep the swap_map counter
correct.

Mark



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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