All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Lalancette <clalance@redhat.com>
To: Keir Fraser <keir.fraser@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: Latency spike during page_scrub_softirq
Date: Fri, 03 Jul 2009 09:32:08 +0200	[thread overview]
Message-ID: <4A4DB3F8.9020903@redhat.com> (raw)
In-Reply-To: <C6728D15.88B5%keir.fraser@eu.citrix.com>

Keir Fraser wrote:
> On 02/07/2009 15:47, "Chris Lalancette" <clalance@redhat.com> wrote:
> 
>> There are a couple of solutions that I can think of:
>> 1)  Just clear the pages inside free_domheap_pages().  I tried this with a
>> 64GB
>> guest as mentioned above, and I didn't see any ill effects from doing so.  It
>> seems like this might actually be a valid way to go, although then a single
>> CPU
>> is doing all of the work of freeing the pages (might be a problem on UP
>> systems).
> 
> Now that domain destruction is preemptible all the way back up to libxc, I
> think the page-scrub queue is not so much required. And it seems it never
> worked very well anyway! I will remove it.
> 
> This may make 'xm destroy' operations take a while, but actually this may be
> more sensibly handled by punting the destroy hypercall into another thread
> at dom0 userspace level, rather than doing the shonky 'scheduling' we
> attempt in Xen itself right now.

Yep, agreed, and I see you've committed as c/s 19886.  Except...

diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
...
@@ -1247,10 +1220,7 @@ void free_domheap_pages(struct page_info
             for ( i = 0; i < (1 << order); i++ )
             {
                 page_set_owner(&pg[i], NULL);
-                spin_lock(&page_scrub_lock);
-                page_list_add(&pg[i], &page_scrub_list);
-                scrub_pages++;
-                spin_unlock(&page_scrub_lock);
+                scrub_one_page(&pg[i]);
             }
         }
     }

This hunk actually needs to free the page as well, with free_heap_pages().

-- 
Chris Lalancette

  reply	other threads:[~2009-07-03  7:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-02 14:47 Latency spike during page_scrub_softirq Chris Lalancette
2009-07-02 15:13 ` Keir Fraser
2009-07-03  7:32   ` Chris Lalancette [this message]
2009-07-03  7:48     ` Keir Fraser

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=4A4DB3F8.9020903@redhat.com \
    --to=clalance@redhat.com \
    --cc=keir.fraser@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /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.