xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Andres Lagar-Cavilla" <andres@lagarcavilla.org>
To: Dan Magenheimer <dan.magenheimer@oracle.com>
Cc: xen-devel@lists.xensource.com, ian.campbell@citrix.com,
	andres@gridcentric.ca, tim@xen.org, jbeulich@suse.com,
	ian.jackson@citrix.com, adin@gridcentric.ca
Subject: Re: [PATCH 1 of 2] Global virq for low memory situations
Date: Tue, 28 Feb 2012 20:17:35 -0800	[thread overview]
Message-ID: <ab105e3149d7b9bd1331fb2ec99ae983.squirrel@webmail.lagarcavilla.org> (raw)
In-Reply-To: <7e6a9e72-e028-4f3e-a474-76be9babe3c5@default>

>> From: Andres Lagar-Cavilla [mailto:andres@lagarcavilla.org]
>> Sent: Tuesday, February 28, 2012 2:56 PM
>> To: xen-devel@lists.xensource.com
>> Cc: ian.campbell@citrix.com; andres@gridcentric.ca; tim@xen.org;
>> JBeulich@suse.com;
>> ian.jackson@citrix.com; adin@gridcentric.ca
>> Subject: [Xen-devel] [PATCH 1 of 2] Global virq for low memory
>> situations
>>
>>  xen/common/page_alloc.c  |  92
>> ++++++++++++++++++++++++++++++++++++++++++++++++
>>  xen/include/public/xen.h |   1 +
>>  2 files changed, 93 insertions(+), 0 deletions(-)
>>
>>
>> When a low memory threshold on the Xen heap is reached, we fire a global
>> dom0
>> virq. If someone's listening, they can free up some more memory. The low
>> threshold is configurable via the command line token
>> 'low_mem_virq_limit", and
>> defaults to 64MiB.
>>
>> We define a new virq VIRQ_ENOMEM. Potential listeners include squeezed,
>> xenballoond, or anything else that can be fired through xencommons.
>>
>> We error-check the low mem virq against initial available heap (after
>> dom0
>> allocation), to avoid firing immediately.
>>
>> Virq issuing is controlled by a hysteresis algorithm: when memory dips
>> below a
>> threshold, the virq is issued and the next virq will fire when memory
>> shrinks
>> another order of magnitude. The virq will not fire again in the current
>> "band"
>> until memory grows over the next higher order of magnitude.
>>
>> Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
>
> Sorry to be late to the party here, but does this take into
> account any fragmentation, i.e. does it reflect that allocations
> of order==0 will succeed but order>0 might fail?  Should it?

Not really concerned about fragmentation. Simply looking at overall count.
Andres

>
> Or maybe Jan's recent work has eliminated all but the corner
> cases of order>0 allocations?  (/me crosses fingers)
>
> Thanks,
> Dan
>

  reply	other threads:[~2012-02-29  4:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-28 21:56 [PATCH 0 of 2] Virq for low memory condition, V3 Andres Lagar-Cavilla
2012-02-28 21:56 ` [PATCH 1 of 2] Global virq for low memory situations Andres Lagar-Cavilla
2012-02-28 23:50   ` Dan Magenheimer
2012-02-29  4:17     ` Andres Lagar-Cavilla [this message]
2012-02-29  8:54     ` Jan Beulich
2012-02-29  8:53   ` Jan Beulich
2012-02-28 21:56 ` [PATCH 2 of 2] Lowmemd: Simple demo code to show use of VIRQ_ENOMEM Andres Lagar-Cavilla
2012-02-29  8:57   ` Jan Beulich
  -- strict thread matches above, loose matches on Subject: below --
2012-03-01  2:25 [PATCH 0 of 2] Virq for low memory condition, V4 Andres Lagar-Cavilla
2012-03-01  2:25 ` [PATCH 1 of 2] Global virq for low memory situations Andres Lagar-Cavilla
2012-03-01 19:19   ` Dan Magenheimer
2012-03-01 19:26     ` Andres Lagar-Cavilla
2012-03-01 21:08       ` Dan Magenheimer
2012-03-06 20:03 [PATCH 0 of 2] Virq for low memory conditions, V5 Andres Lagar-Cavilla
2012-03-06 20:03 ` [PATCH 1 of 2] Global virq for low memory situations Andres Lagar-Cavilla

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=ab105e3149d7b9bd1331fb2ec99ae983.squirrel@webmail.lagarcavilla.org \
    --to=andres@lagarcavilla.org \
    --cc=adin@gridcentric.ca \
    --cc=andres@gridcentric.ca \
    --cc=dan.magenheimer@oracle.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xensource.com \
    /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;
as well as URLs for NNTP newsgroup(s).