Re: [RFC PATCH] mm: thp: make swap configurable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andrea

On Mon, Oct 10, 2011 at 10:18 PM, Andrea Arcangeli <aarcange@xxxxxxxxxx> wrote:
> Hi Bob,
>
> On Mon, Oct 10, 2011 at 09:58:06PM +0800, Bob Liu wrote:
>> Currently THP do swap by default, user has no control of it.
>> But some applications are swap sensitive, this patch add a boot param
>> and sys file to make it configurable.
>
> Why don't you use mlock or swapoff -a? I doubt we want to handle THP
> pages differently from regular pages with regard to swap or anything
> else, the value is to behave as close as possible to regular
> pages. What you want you can already achieve by other means I think.
>

Thanks for your reply.

Yes, mlock() can do it but it will require a lot of changes in every
user application.
If some of the applications are hugh and complicated(even not opensource), it's
hard to modify them.
Add this patch can make things simple and thp more flexible.

For using swapoff -a, it will disable swap for 4k normal pages.

A simple use case is like this:
a lot of swap sensitive apps run on a machine, it will use thp so we
need to disable swap.
But  this apps are hugh and complicated, it's hard to modify them by mlock().

In addition, there are also some normal and not swap sensitive apps
which don't use thp run on
the same machine, we can still reclaim their memory by swap when lack
of memory.

-- 
Thanks,
--Bob

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]