All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <juergen.gross@ts.fujitsu.com>
To: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH] cpupools: retry cpupool-destroy if domain in cpupool is dying
Date: Wed, 07 May 2014 15:23:01 +0200	[thread overview]
Message-ID: <536A33B5.7000908@ts.fujitsu.com> (raw)
In-Reply-To: <CAFLBxZYgbQx3v9FU+7cqpLmGwXCQHs3jtE9e9vLzk=4Wtd9z7Q@mail.gmail.com>

On 07.05.2014 15:10, George Dunlap wrote:
> On Wed, May 7, 2014 at 8:52 AM, Juergen Gross
> <juergen.gross@ts.fujitsu.com> wrote:
>> When a cpupool is destroyed just after the last domain has been stopped the
>> domain might already be removed from the cpupool without having decremented
>> the domain count of the cpupool. This will result in rejection of the
>> cpupool-destroy operation.
>
> I'm a bit confused.  What's the sched_move_domain() for, then?  If
> we're going to handle "dying domains" by doing a retry, could we just
> get rid of it?

The sched_move_domain() is still needed for cases where a domain stays
dying for a longer time, e.g. when a dom0 process is still referencing
some of it's memory pages. This may be a rare situation, but being unable
to use a physical cpu for another cpupool just because of this case is
worse than this little piece of code, IMO.


Juergen

>
>   -George
>
>> It is easy to detect this situation and to return EAGAIN in this case which
>> is already handled in libxc by doing a retry.
>>
>> Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
>> ---
>>   xen/common/cpupool.c |    2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/xen/common/cpupool.c b/xen/common/cpupool.c
>> index 4a0e569..ac833f0 100644
>> --- a/xen/common/cpupool.c
>> +++ b/xen/common/cpupool.c
>> @@ -348,6 +348,8 @@ static int cpupool_unassign_cpu(struct cpupool *c, unsigned int cpu)
>>               cpupool0->n_dom++;
>>           }
>>           rcu_read_unlock(&domlist_read_lock);
>> +        if ( (c->n_dom > 0) && !ret )
>> +            ret = -EAGAIN;
>>           if ( ret )
>>               goto out;
>>       }
>> --
>> 1.7.10.4
>>
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xen.org
>> http://lists.xen.org/xen-devel
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
>
>


-- 
Juergen Gross                 Principal Developer Operating Systems
PSO PM&D ES&S SWE OS6                  Telephone: +49 (0) 89 62060 2932
Fujitsu                                   e-mail: juergen.gross@ts.fujitsu.com
Mies-van-der-Rohe-Str. 8                Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html

  reply	other threads:[~2014-05-07 13:23 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-07  7:52 [PATCH] cpupools: retry cpupool-destroy if domain in cpupool is dying Juergen Gross
2014-05-07 13:10 ` George Dunlap
2014-05-07 13:23   ` Juergen Gross [this message]
2014-05-08 15:10     ` George Dunlap
2014-05-09  5:01       ` Juergen Gross
2014-05-12 10:50         ` George Dunlap
2014-05-12 10:54           ` George Dunlap
2014-05-12 11:31           ` Juergen Gross
  -- strict thread matches above, loose matches on Subject: below --
2014-05-12 11:49 Juergen Gross
2014-05-14  9:16 ` George Dunlap
2014-05-14  9:48   ` George Dunlap
2014-05-14  9:50     ` George Dunlap
2014-05-14 12:28       ` Tim Deegan
2014-05-14  9:56   ` Juergen Gross
2014-05-14 10:15     ` Jan Beulich
2014-05-14 10:19       ` George Dunlap
2014-05-14 10:35       ` Juergen Gross
2014-05-14 12:28         ` Jan Beulich
2014-05-14 13:05           ` Juergen Gross
2014-05-14 13:13             ` Jan Beulich
2014-05-14 13:22               ` Juergen Gross

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=536A33B5.7000908@ts.fujitsu.com \
    --to=juergen.gross@ts.fujitsu.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=xen-devel@lists.xen.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.