Re: swap hint

From: KAMEZAWA Hiroyuki
Date: Mon Apr 20 2009 - 23:03:37 EST


On Mon, 20 Apr 2009 16:11:14 +0100
"Wil" <nodenet@xxxxxxxxxxx> wrote:

> I've noticed that when running a VM such as qemu/vbox with approx 75% of
> physical memory allocated with the default swappiness the swap file usage
> will rise to approximately the same amount. Although setting swappiness to 0
> seems to prevent this, running with this setting seems counter intuitive.
> I'm wondering if the following is or would be possible
>
> 1. Provide page hint to prevent swapping of certain pages. This would
> presumably allow applications running in the remaining host memory to use
> the swap file efficiently.
> 2. Provide user space controls to prevent a certain process (or the memory
> it allocates) being swapped.
>
> I'm not sure if memory ballooning will cover the above as I couldn't find
> details of anything similar but would think that having some tunability for
> special cases such as VMs would be useful especially if you could pick guest
> performance / host memory usage on a per VM basis. I note that xen does seem
> to do something along these lines as standard.
>
> Will Wiseman
>

Can't memory cgroup be a help for your case?

- Documentation/cgroup/memory.txt

Thanks,
-Kame

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