lkml.org 
[lkml]   [1998]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: new swap cache regime
On Sun, 27 Sep 1998, Linus Torvalds wrote:

>If the only problem is that we cannot do a "swapoff()" on the device, we
>should just make swapoff() know about the swap-cache, and walk the page
>list. That's fairly easy to do, and implies zero overhead for the exit()
>case.

swapoff() just know about the swap cache.

The good point of this my new patch is that the swap cache pages that I am
freeing at exit(2) time can' t be useful anymore. Usually the _cache_
contains data and not _garbage_.

Having garbage in the cache will cause that shrink_mmap() will eventually
free an useful cache page instead of doing the right thing -> freeing a
cache page that contains garbage.

If you don' t like to change swap_free() (for exit(2) performance)
another solution would be to add the shrink_swap_cache() in
try_to_free_page (implemented a bit different than it was at first) that
will be able to remove _only_the_garbage_ in the swap cache. This way
garbage swap cache pages will have a major probabilty to be freed I think.

This is my thought but I can be totally wrong because I don' t know
many things in the kernel...

Andrea[s] Arcangeli


-
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:44    [W:0.057 / U:1.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site