From: Jan Beulich <jbeulich@suse.com> To: Dmitry Isaikin <isaikin-dmitry@yandex.ru> Cc: Andrew Cooper <andrew.cooper3@citrix.com>, George Dunlap <george.dunlap@citrix.com>, Ian Jackson <iwj@xenproject.org>, Julien Grall <julien@xen.org>, Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>, xen-devel@lists.xenproject.org Subject: Re: [PATCH v1] domctl: hold domctl lock while domain is destroyed Date: Thu, 16 Sep 2021 14:30:39 +0200 [thread overview] Message-ID: <22a4b3c7-7faa-607b-244a-0ab99d7ccfa9@suse.com> (raw) In-Reply-To: <2e7044de3cd8a6768a20250e61fe262f3a018724.1631790362.git.isaikin-dmitry@yandex.ru> On 16.09.2021 13:10, Dmitry Isaikin wrote: > From: Dmitry Isaykin <isaikin-dmitry@yandex.ru> > > This significantly speeds up concurrent destruction of multiple domains on x86. This effectively is a simplistic revert of 228ab9992ffb ("domctl: improve locking during domain destruction"). There it was found to actually improve things; now you're claiming the opposite. It'll take more justification, clearly identifying that you actually revert an earlier change, and an explanation why then you don't revert that change altogether. You will want to specifically also consider the cleaning up of huge VMs, where use of the (global) domctl lock may hamper progress of other (parallel) operations on the system. > I identify the place taking the most time: > > do_domctl(case XEN_DOMCTL_destroydomain) > -> domain_kill() > -> domain_relinquish_resources() > -> relinquish_memory(d, &d->page_list, PGT_l4_page_table) > > My reference setup: Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz, Xen 4.14. > > I use this command for test: > > for i in $(seq 1 5) ; do xl destroy test-vm-${i} & done > > Without holding the lock all calls of `relinquish_memory(d, &d->page_list, PGT_l4_page_table)` > took on my setup (for HVM with 2GB of memory) about 3 seconds for each destroying domain. > > With holding the lock it took only 100 ms. I'm further afraid I can't make the connection. Do you have an explanation for why there would be such a massive difference? What would prevent progress of relinquish_memory() with the domctl lock not held? Jan
next prev parent reply other threads:[~2021-09-16 12:31 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-09-16 11:10 Dmitry Isaikin 2021-09-16 12:30 ` Jan Beulich [this message] 2021-09-16 13:08 ` Roger Pau Monné 2021-09-16 17:52 ` Andrew Cooper 2021-09-17 6:17 ` Jan Beulich 2021-09-17 9:27 ` Julien Grall 2021-09-17 9:41 ` Andrew Cooper 2021-09-17 9:47 ` Jan Beulich 2021-09-17 16:01 ` Julien Grall 2021-09-20 8:19 ` 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=22a4b3c7-7faa-607b-244a-0ab99d7ccfa9@suse.com \ --to=jbeulich@suse.com \ --cc=andrew.cooper3@citrix.com \ --cc=george.dunlap@citrix.com \ --cc=isaikin-dmitry@yandex.ru \ --cc=iwj@xenproject.org \ --cc=julien@xen.org \ --cc=sstabellini@kernel.org \ --cc=wl@xen.org \ --cc=xen-devel@lists.xenproject.org \ --subject='Re: [PATCH v1] domctl: hold domctl lock while domain is destroyed' \ /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
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.