public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@citrix.com>
To: Bob Liu <lliubbo@gmail.com>
Cc: <konrad.wilk@oracle.com>, <xen-devel@lists.xenproject.org>,
	Bob Liu <bob.liu@oracle.com>, <linux-kernel@vger.kernel.org>
Subject: Re: [Xen-devel] [PATCH] drivers: xen-selfballoon: consider slab pages
Date: Mon, 4 Nov 2013 17:22:50 +0000	[thread overview]
Message-ID: <5277D7EA.9000801@citrix.com> (raw)
In-Reply-To: <1383568764-30478-1-git-send-email-bob.liu@oracle.com>

On 04/11/13 12:39, Bob Liu wrote:
> Currently the goal_page in xen-selfballon doesn't consider much about pages used
> in kernel space.
> A typical usage is slab pages, without consider slab pages the goal_page result
> may be too rough and lead extra memory pressure to guest os.

Can you provide some real world figures where the calculatation got it
wrong? What was the resultant behavior?  Swap death? OOM killer?

> Signed-off-by: Bob Liu <bob.liu@oracle.com>
> ---
>  drivers/xen/xen-selfballoon.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/xen/xen-selfballoon.c b/drivers/xen/xen-selfballoon.c
> index 21e18c1..4814759 100644
> --- a/drivers/xen/xen-selfballoon.c
> +++ b/drivers/xen/xen-selfballoon.c
> @@ -191,6 +191,8 @@ static void selfballoon_process(struct work_struct *work)
>  		tgt_pages = cur_pages; /* default is no change */
>  		goal_pages = vm_memory_committed() +
>  				totalreserve_pages +
> +				global_page_state(NR_SLAB_RECLAIMABLE) +

Does SLAB_RECLAIMABLE want to be included here?  Unless I'm
misunderstanding here, SLAB_RECLAIMABLE is effectively free.

> +				global_page_state(NR_SLAB_UNRECLAIMABLE) +

This bit looks fine to me.

>  				MB2PAGES(selfballoon_reserved_mb);
>  #ifdef CONFIG_FRONTSWAP
>  		/* allow space for frontswap pages to be repatriated */

David

  parent reply	other threads:[~2013-11-04 17:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-04 12:39 [PATCH] drivers: xen-selfballoon: consider slab pages Bob Liu
2013-11-04 15:13 ` Konrad Rzeszutek Wilk
2013-11-04 17:22 ` David Vrabel [this message]
2013-11-05  3:30   ` [Xen-devel] " Bob Liu
2013-11-05 10:33     ` David Vrabel

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=5277D7EA.9000801@citrix.com \
    --to=david.vrabel@citrix.com \
    --cc=bob.liu@oracle.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lliubbo@gmail.com \
    --cc=xen-devel@lists.xenproject.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox