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

Re: [Xen-devel] [PATCH] Global virq for low memory situations



>>> On 24.02.12 at 18:18, "Andres Lagar-Cavilla" <andres@xxxxxxxxxxxxxxxx> 
>>> wrote:
>>>>> On 23.02.12 at 20:59, Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx> 
>>>>> wrote:
>>> +{
>>> +    unsigned int order;
>>> +    unsigned long long threshold;
>>> +
>>> +    /* Dom0 has already been allocated by now. So check we won't
>>> +     * be complaining immediately with whatever's left of the heap. */
>>> +    threshold = min(opt_low_mem_virq, (unsigned long long)
>>> +                          (total_avail_pages << PAGE_SHIFT));
>>
>> The cast needs to be on total_avail_pages, not the result of the
>> shift. Also, unsigned long long is the wrong type (paddr_t was
>> invented for this very purpose).
>>
>> Further, the initial threshold should clearly be *below* the currently
>> available amount (e.g. at half of it).
> 
> That's debatable. Let's set aside the semantics of what is "really" or
> "dangerously" low, and assume the admin knows what he/she is doing when
> setting the threshold in the command line. If the amount of available
> memory is below that threshold, then the moment an allocation happens we
> need to warn.

My comment wasn't about command line specified values - those
certainly should be obeyed to. But the threshold chosen when there
was nothing said on the command line should imo not result in an
immediate warning.

>>>  /* Architecture-specific VIRQ definitions. */
>>>  #define VIRQ_ARCH_0    16
>>
>> Given that this new vIRQ ought to be handled in user space, do you
>> have an implementation ready to contribute as well?
> 
> I have my little daemon that I use for this. It's nothing you would not
> expect: listen for the virq, balloon dom0 down a bit. I can throw it into
> the tree, although I don't know where. Or I can post it to the list for
> posterity. Ideally all "memory management daemons" out there that find it
> useful would pick it up -- certainly the hope is for squeezed to do that,
> but I view that as a separate effort.

At least posting it would be nice, so people could make suggestions
as to where it might go in the tree, and in what shape.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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