xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Andres Lagar-Cavilla" <andres@lagarcavilla.org>
To: Tim Deegan <tim@xen.org>
Cc: adin@gridcentric.ca, andres@gridcentric.ca, keir.xen@gmail.com,
	xen-devel@lists.xen.org
Subject: Re: [PATCH 1 of 3] x86/mm/sharing: Clean ups for relinquishing shared pages on destroy
Date: Wed, 18 Apr 2012 06:06:26 -0700	[thread overview]
Message-ID: <2f4abfcbe8cf5d301c8d75ed984605a3.squirrel@webmail.lagarcavilla.org> (raw)
In-Reply-To: <20120418124201.GF7013@ocelot.phlegethon.org>

> At 10:16 -0400 on 12 Apr (1334225772), Andres Lagar-Cavilla wrote:
>>  xen/arch/x86/domain.c             |  16 ++++++++++++-
>>  xen/arch/x86/mm/mem_sharing.c     |  45
>> +++++++++++++++++++++++++++++++++++++++
>>  xen/arch/x86/mm/p2m.c             |   4 +++
>>  xen/include/asm-arm/mm.h          |   4 +++
>>  xen/include/asm-x86/domain.h      |   1 +
>>  xen/include/asm-x86/mem_sharing.h |  10 ++++++++
>>  xen/include/asm-x86/p2m.h         |   4 +++
>>  7 files changed, 82 insertions(+), 2 deletions(-)
>>
>>
>> When a domain is destroyed, its pages are freed in relinquish_resources
>> in a
>> preemptible mode, in the context of a synchronous domctl.
>>
>> P2m entries pointing to shared pages are, however, released during p2m
>> cleanup
>> in an RCU callback, and in non-preemptible mode.
>>
>> This is an O(n) operation for a very large n, which may include actually
>> freeing shared pages for which the domain is the last holder.
>>
>> To improve responsiveness, move this operation to the preemtible portion
>> of
>> domain destruction, during the synchronous domain_kill hypercall. And
>> remove
>> the bulk of the work from the RCU callback.
>>
>> Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
>
> I've applied this as a bug-fix.  The other two seem more like new
> development and I'm less happy about taking them before 4.2

Thanks for applying this one.

Can I ask you to reconsider on the other two? Right now I can freeze up
the hypervisor for several minutes (without these two patches). Soft
lockups start popping up in dom0. I've had two instances in which the
block IO driver bails out and the dom0 file system becomes read-only,
forcing host reboot. It's a horrible performance regression this is
fixing.

Thanks,
Andres
>
> Cheers,
>
> Tim.
>

  reply	other threads:[~2012-04-18 13:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-12 14:16 [PATCH 0 of 3] RFC: x86 memory sharing performance improvements Andres Lagar-Cavilla
2012-04-12 14:16 ` [PATCH 1 of 3] x86/mm/sharing: Clean ups for relinquishing shared pages on destroy Andres Lagar-Cavilla
2012-04-18 12:42   ` Tim Deegan
2012-04-18 13:06     ` Andres Lagar-Cavilla [this message]
2012-04-12 14:16 ` [PATCH 2 of 3] x86/mem_sharing: modularize reverse map for shared frames Andres Lagar-Cavilla
2012-04-18 14:05   ` Tim Deegan
2012-04-18 14:19     ` Andres Lagar-Cavilla
2012-04-12 14:16 ` [PATCH 3 of 3] x86/mem_sharing: For shared pages with many references, use a hash table instead of a list Andres Lagar-Cavilla
2012-04-18 15:35   ` Tim Deegan
2012-04-18 16:18     ` Andres Lagar-Cavilla
2012-04-24 19:33       ` Andres Lagar-Cavilla

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=2f4abfcbe8cf5d301c8d75ed984605a3.squirrel@webmail.lagarcavilla.org \
    --to=andres@lagarcavilla.org \
    --cc=adin@gridcentric.ca \
    --cc=andres@gridcentric.ca \
    --cc=keir.xen@gmail.com \
    --cc=tim@xen.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).