All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <jbeulich@suse.com>
To: bob.liu@oracle.com
Cc: lliubbo@gmail.com, keir@xen.org, ian.campbell@citrix.com,
	George.Dunlap@eu.citrix.com, andrew.cooper3@citrix.com,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH 4/4] xen: use idle vcpus to scrub pages
Date: Wed, 18 Jun 2014 11:42:25 +0100	[thread overview]
Message-ID: <53A17B2102000078000B6994@mail.emea.novell.com> (raw)
In-Reply-To: <53A0E8CE.7050304@oracle.com>

>>> Bob Liu <bob.liu@oracle.com> 06/18/14 3:18 AM >>>
>On 06/17/2014 09:01 PM, Jan Beulich wrote:
>>>>> On 17.06.14 at 13:49, <lliubbo@gmail.com> 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

  reply	other threads:[~2014-06-18 10:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-17 11:49 [PATCH 1/4] xen: asm-x86: introduce PGC_need_scrub page flag Bob Liu
2014-06-17 11:49 ` [PATCH 2/4] xen: introduce an "scrub" free page list Bob Liu
2014-06-17 12:36   ` Jan Beulich
2014-06-18  0:54     ` Bob Liu
2014-06-18 13:18       ` Konrad Rzeszutek Wilk
2014-06-17 11:49 ` [PATCH 3/4] xen: separate a function merge_free_trunks from Bob Liu
2014-06-17 12:39   ` Jan Beulich
2014-06-17 11:49 ` [PATCH 4/4] xen: use idle vcpus to scrub pages Bob Liu
2014-06-17 13:01   ` Jan Beulich
2014-06-18  1:18     ` Bob Liu
2014-06-18 10:42       ` Jan Beulich [this message]
2014-06-17 12:35 ` [PATCH 1/4] xen: asm-x86: introduce PGC_need_scrub page flag Jan Beulich
2014-06-17 12:46 ` Julien Grall
2014-06-18  0:55   ` Bob Liu

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=53A17B2102000078000B6994@mail.emea.novell.com \
    --to=jbeulich@suse.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=bob.liu@oracle.com \
    --cc=ian.campbell@citrix.com \
    --cc=keir@xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.