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

Re: [Xen-devel] [PATCH 0 of 4] Handling of (some) low memory conditions

  • To: "Jan Beulich" <JBeulich@xxxxxxxx>
  • From: "Andres Lagar-Cavilla" <andres@xxxxxxxxxxxxxxxx>
  • Date: Thu, 16 Feb 2012 06:40:58 -0800
  • Cc: andres@xxxxxxxxxxxxxx, xen-devel <xen-devel@xxxxxxxxxxxxx>, tim@xxxxxxx, adin@xxxxxxxxxxxxxx
  • Delivery-date: Thu, 16 Feb 2012 14:42:00 +0000
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=lagarcavilla.org; h=message-id :in-reply-to:references:date:subject:from:to:cc:reply-to :mime-version:content-type:content-transfer-encoding; q=dns; s= lagarcavilla.org; b=cueAi5BlA7BA1SvIjuO4TlT+6ZEOYN8GnALMkl4sbSNY EN37wwf04g9DKTKLlQKEyQSO6eHTH0NyZxf3OFqqMNtw3jUuZv9FV+VwAM/LBqqs QPgkNw3EIaTsVJt/MQq/0omXGMUOrM4YiMm14kT2qYjTZb30P7W29+T3+USG3AM=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

>>>> On 16.02.12 at 04:57, Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
>>>> wrote:
>> - Add a VIRQ that the hypervisor can emit when reaching a low memory
>> threshold.
> In this patch, which didn't make it to my inbox yet, you will want to
> change this
> +    if ( (total_avail_pages << PAGE_SHIFT) <= opt_low_mem_virq )
> to
>     if ( total_avail_pages <= PFN_DOWN(opt_low_mem_virq) )
> to avoid the case (on 32-bit hypervisors) where total_avail_pages,
> being just 'long', would get significant bits shifted out.
> I'm further wondering whether the default value shouldn't be set
> dynamically based on available memory and/or taking into account
> an eventual dom0_mem= option.

I can cap or get rid of the threshold (and the virq) if it doesn't make
sense with respect to total memory. I'm not sure about integrating
dom0_mem, since dom0's footprint is also a quantity manipulated by the
receiver of the virq.

> Finally, rate limiting will be needed for sending the vIRQ - currently,
> once below the threshold you're sending one on each and every
> allocation (which may become harmful if the listener can't really do
> anything about the situation).

All three are sensible. I'll look into printk rate-limiting for inspiration.
> Jan

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.