From: Bob Liu <bob.liu@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: George.Dunlap@eu.citrix.com, andrew.cooper3@citrix.com,
ian.campbell@citrix.com,
xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: A good way to speed up the xl destroy time(guest page scrubbing)
Date: Mon, 08 Dec 2014 17:28:16 +0800 [thread overview]
Message-ID: <54856F30.7000407@oracle.com> (raw)
In-Reply-To: <548570B2020000780004D99C@mail.emea.novell.com>
On 12/08/2014 04:34 PM, Jan Beulich wrote:
>>>> On 07.12.14 at 14:43, <bob.liu@oracle.com> wrote:
>
>> On 12/05/2014 08:24 PM, Jan Beulich wrote:
>>>>>> On 05.12.14 at 11:00, <bob.liu@oracle.com> wrote:
>>>> 5. Potential workaround
>>>> 5.1 Use per-cpu list in idle_loop()
>>>> Delist a batch of pages from heap_list to a per-cpu list, then scrub the
>>>> per-cpu list and free back to heap_list.
>>>>
>>>> But Jan disagree with this solution:
>>>> "You should really drop the idea of removing pages temporarily.
>>>> All you need to do is make sure a page being allocated and getting
>>>> simultaneously scrubbed by another CPU won't get passed to the
>>>> caller until the scrubbing finished."
>>>
>>> So you don't mention any downsides to this approach. If there are
>>> any, please name them. If there aren't, what's the reason not to
>>> go this route?
>>
>> The reason was what you suggested was not very specific, I still have no
>> idea how to implement a patch which can "make sure a page being
>> allocated and getting simultaneously scrubbed by another CPU won't get
>> passed to the caller until the scrubbing finished".
>
> The scrubbing code would need to mark the page, and the allocation
> code would need to spin on such marked pages until the mark clears.
>
Thanks a lot, it's more clear!
Then do you think it is safe to iterate the heap list without spin lock
in the scrubbing code?
Konrad also suggested a similar way which was skip marked pages(instead
of spin) in the allocator, but I always got panic during
page_list_for_each(&heap_list) in the scrubbing code if without locking
the heap list.
The panic happend in page_list_next(), I think that's because alloc/free
path modified the heap list.
--
Regards,
-Bob
next prev parent reply other threads:[~2014-12-08 9:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <546F1033.7030005@oracle.com>
2014-12-05 10:00 ` A good way to speed up the xl destroy time(guest page scrubbing) Bob Liu
2014-12-05 12:24 ` Jan Beulich
2014-12-07 13:43 ` Bob Liu
2014-12-08 8:34 ` Jan Beulich
2014-12-08 9:28 ` Bob Liu [this message]
2014-12-08 9:36 ` Jan Beulich
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=54856F30.7000407@oracle.com \
--to=bob.liu@oracle.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.campbell@citrix.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.