From: Bob Liu <bob.liu@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Bob Liu <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 v2 3/3] xen: use idle vcpus to scrub pages
Date: Thu, 24 Jul 2014 10:08:11 +0800 [thread overview]
Message-ID: <53D06A8B.7010804@oracle.com> (raw)
In-Reply-To: <53CF80400200007800024F2B@mail.emea.novell.com>
On 07/23/2014 03:28 PM, Jan Beulich wrote:
>>>> On 15.07.14 at 11:16, <bob.liu@oracle.com> wrote:
>> After so many days I haven't make a workable solution if don't remove
>> pages temporarily. The hardest part is iterating the heap free list
>> without holding heap_lock because if holding the lock it might be heavy
>> lock contention.
>> So do you think it's acceptable if fixed all other concerns about this
>> patch?
>
> No, I don't think so. Instead I'm of the opinion that you may have
> worked in the wrong direction: Rather than not taking the heap lock
> at all, it may also be sufficient to shrink the lock holding time (i.e.
> avoid long loops with the lock held).
>
But I still think have to drop pages from heap list temporarily else
heap lock must be taken for a long time to get rid of E.g. below race
condition.
A: alloc path B: idle loop
spin_lock(&heap_lock)
page_list_for_each( pg, &heap(node, zone, order) )
if _PGC_need_scrub is set, break;
spin_unlock(&heap_lock)
if ( test_bit(_PGC_need_scrub, pg)
^^^^
spin_lock(&heap_lock)
delist page
spin_unlock(&heap_lock)
write data to this page
scrub_one_page(pg)
^^^ will clean useful data
--
Regards,
-Bob
next prev parent reply other threads:[~2014-07-24 2:08 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-30 13:39 [PATCH v2 1/3] xen: delay page scrubbing to allocation path Bob Liu
2014-06-30 13:39 ` [PATCH v2 2/3] xen: introduce function merge_free_trunks Bob Liu
2014-06-30 15:58 ` Jan Beulich
2014-07-01 8:14 ` Bob Liu
2014-07-01 8:27 ` Jan Beulich
2014-06-30 13:39 ` [PATCH v2 3/3] xen: use idle vcpus to scrub pages Bob Liu
2014-07-01 9:12 ` Jan Beulich
2014-07-01 12:25 ` Bob Liu
2014-07-01 12:59 ` Jan Beulich
2014-07-02 6:27 ` Bob Liu
2014-07-07 12:20 ` Bob Liu
2014-07-15 9:16 ` Bob Liu
2014-07-23 0:38 ` Konrad Rzeszutek Wilk
2014-07-23 1:30 ` Bob Liu
2014-07-23 7:28 ` Jan Beulich
2014-07-24 2:08 ` Bob Liu [this message]
2014-07-24 6:24 ` Jan Beulich
2014-07-25 0:42 ` Bob Liu
2014-07-25 6:51 ` Jan Beulich
2014-07-25 7:28 ` Bob Liu
2014-07-25 7:36 ` Jan Beulich
2014-07-25 8:18 ` Bob Liu
2014-07-25 8:28 ` Jan Beulich
2014-06-30 15:56 ` [PATCH v2 1/3] xen: delay page scrubbing to allocation path Jan Beulich
2014-07-01 8:12 ` 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=53D06A8B.7010804@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=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 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).