lkml.org 
[lkml]   [2001]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Is swap == 2 * RAM a permanent thing?
Date
> The reason is that the Linux 2.4 kernel no longer reclaims swap
> space on swapin (2.2 reclaimed swap space on write access, which
> lead to fragmented swap space in lots of workloads).
>
> This means that a lot of memory ends up "duplicated" in RAM and
> in swap.
>
> I plan on doing some code to reclaim swap space when we run out,
> but Linus doesn't seem to like that idea very much. His argument
> (when you're OOM, you should just fail instead of limp along)
> makes a lot of sense, however, and the reclaiming of swap space
> isn't really high on my TODO list ...
>
> OTOH, for people who have swap < RAM and use it just as a small
> overflow area, Linus' argument falls short, so I guess some time
> in the future we will have code to reclaim swap space when needed.

I have some questions on this.

1) If a process uses swap space and then later (after being paged
into memory -- or even not) it completes, is killed, etc., is
the swap space reclaimed then?

2) If a process uses swap, is paged into memory, and is then swapped
out again, does it re-use the same swap as before?

If the answer to either question is no, then IMHO, that's a pretty
serious design flaw.

Regards,

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

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