All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bob Liu <bob.liu@oracle.com>
To: Vasiliy Tolstov <v.tolstov@selfip.ru>
Cc: xen-devel@lists.xen.org
Subject: Re: tmem frontswap without swap file
Date: Mon, 24 Feb 2014 11:32:44 +0800	[thread overview]
Message-ID: <530ABD5C.10506@oracle.com> (raw)
In-Reply-To: <CACaajQvU5KKiHMH66UL+XDTEdx-VLNY-UggQOAnBGuQkM7coFg@mail.gmail.com>



On 02/21/2014 12:35 PM, Vasiliy Tolstov wrote:
> 2014-02-20 9:52 GMT+04:00 Vasiliy Tolstov <v.tolstov@selfip.ru>:
>> Hello. I have some problems with swap files in domU - i have ssd disks
>> that caches all io and if user use swap, ssd may fail very often.
>> Is that possible to use tmem frontswap without swap file at all? And
>> transparently push swap pages to tmem?
> 
> 
> Okay as i see it can;'t be possible.
> Another question - is that possible to reserve tmem to domains at specific size?
> For example i need to get 20Gb for one domain and 10Gb for another.
> But if second domain very hungry it can't
> eaten all memory
> 

Two types of page can be stored in tmem: persistent_page and ephemeral_page.

Persistent pages are swapped-out pages, whose date can't be dropped by
tmem. The rule for persistent pages is:
'current_domain_pages +  persistent_pages have to smaller than
domain->max_pages'.

Ephemeral pages are clean pagecache pages, those pages have a copy in
disk already.
The amount number of ephemeral pages are not limited, but XEN host will
reclaim those pages if under memory pressure.
There is a tmem parameter 'weight' which can be used to control how many
ephemeral_pages should be reclaimed between domains.

-- 
Regards,
-Bob

  reply	other threads:[~2014-02-24  3:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-20  5:52 tmem frontswap without swap file Vasiliy Tolstov
2014-02-21  4:35 ` Vasiliy Tolstov
2014-02-24  3:32   ` Bob Liu [this message]
2014-02-24 11:01     ` Vasiliy Tolstov
2014-02-25  4:52       ` Bob Liu
2014-02-25  5:05         ` Vasiliy Tolstov
2014-02-25  5:26           ` Bob Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=530ABD5C.10506@oracle.com \
    --to=bob.liu@oracle.com \
    --cc=v.tolstov@selfip.ru \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.