Swap usage discussion
Alan Dayley
plug-devel@lists.PLUG.phoenix.az.us
Fri Jun 18 09:46:02 2004
Ed Skinner said:
> A couple of comments:
Thank you.
> * Code pages can be "dropped" and not swapped out, just abandoned,
> because the content is unchanged and, if needed, Linux can simply go
--[clip]--
I have not come to this in my VM manager code study. This is a good
thing, at least for workstation and non-real-time applications, as you
point out. Thank you.
> * For the Linux boxes I'm using (as a "user" -- I'd call these
> "workstations" and not embedded systems [obviously]), my general rule
--[clip]--
I am not yet aware of many of the details of the target environment. They
have not responded to my queries yet. Adding as much RAM as possible is
certainly a good idea.
> (The xosview program is in the RedHat distributions [and others?] and
> will let you watch paging and other busy-ness indicators in real-time.)
I will add xosview to the list of helpful tools. Thanks.
> * Most embedded systems have no swap. It's turned off and the system has
> to have enough RAM to do all the assigned work. In earlier kernels
--[clip]--
> that RAM is under-utilized. It's a trade-off between robustness and
> cost effectiveness.]
The target system, while embedded in that it is a specialized system for a
specific use, is not necessarily resource starved as something like a
smart toaster would be. It is more like hiding a full PC inside a piece
of equipment. That said, the customer is already experimenting with no
swap area operaton. They just want to define all the characteristics of
the alternative; using swap.
> * Finally, you may read some descriptions that confuse "swap" and
> "paging" and others that use the terms as they were originally
--[clip]--
The distinction between paging and swap is not lost on me. The book I am
using as a code guide, "Understanding the Linux Virtual Memory Manager"
explains it like this:
"Linux actually implements paging as modern hardware supports it, but
traditionally has called it swapping in discussions and documentation. To
be consistent with the Linux usage of the word, we, too, will refer to it
as swapping." p. 179
In fact, the kernel source code function names mostly have the word "swap"
in them when they do in fact implement paging operations. Thank you for
the pointer and definition.
> * And if you're still reading at this point, you're probably a "hacker"
> in the original sense of the word (like me). Fun stuff!
That may be true. I am also still reading so that I can do my job. You
could have droned on for hours and I would still have been reading
(maybe).
Alan