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

Re: [Xen-devel] [PATCH 4/4] xen: use idle vcpus to scrub pages



>>> Bob Liu <bob.liu@xxxxxxxxxx> 06/18/14 3:18 AM >>>
>On 06/17/2014 09:01 PM, Jan Beulich wrote:
>>>>> On 17.06.14 at 13:49, <lliubbo@xxxxxxxxx> wrote:
>>> --- a/xen/common/domain.c
>>> +++ b/xen/common/domain.c
>>> @@ -587,12 +587,14 @@ int domain_kill(struct domain *d)
>>>          d->tmem_client = NULL;
>>>          /* fallthrough */
>>>      case DOMDYING_dying:
>>> +        enable_idle_scrub = 0;
>>>          rc = domain_relinquish_resources(d);
>>>          if ( rc != 0 )
>>>          {
>>>              BUG_ON(rc != -EAGAIN);
>>>              break;
>>>          }
>>> +        enable_idle_scrub = 1;
>>>          for_each_vcpu ( d, v )
>>>              unmap_vcpu_info(v);
>>>          d->is_dying = DOMDYING_dead;
>> 
>> ???
>
>enable_idle_scrub is a rough way to disable idle vcpu scrubbing, so that
>domain_relinquish_resources() can get "&heap_lock" faster and make xl
>destroy return quickly.

If such a hack is really necessary, it requires a decent code comment. But I
don't think it's needed, as long as you keep down the lock holding time on the
scrubber side.

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®.