From: guangrong.xiao@gmail.com To: pbonzini@redhat.com, mst@redhat.com, mtosatti@redhat.com Cc: kvm@vger.kernel.org, quintela@redhat.com, Xiao Guangrong <xiaoguangrong@tencent.com>, qemu-devel@nongnu.org, peterx@redhat.com, dgilbert@redhat.com, wei.w.wang@intel.com, cota@braap.org, jiang.biao2@zte.com.cn Subject: [PATCH v2 0/5] migration: improve multithreads Date: Tue, 6 Nov 2018 20:20:20 +0800 [thread overview] Message-ID: <20181106122025.3487-1-xiaoguangrong@tencent.com> (raw) From: Xiao Guangrong <xiaoguangrong@tencent.com> Changelog in v2: These changes are based on Paolo's suggestion: 1) rename the lockless multithreads model to threaded workqueue 2) hugely improve the internal design, that make all the request be a large array, properly partition it, assign requests to threads respectively and use bitmaps to sync up threads and the submitter, after that ptr_ring and spinlock are dropped 3) introduce event wait for the submitter These changes are based on Emilio's review: 4) make more detailed description for threaded workqueue 5) add a benchmark for threaded workqueue The previous version can be found at https://marc.info/?l=kvm&m=153968821910007&w=2 There's the simple performance measurement comparing these two versions, the environment is the same as we listed in the previous version. Use 8 threads to compress the data in the source QEMU - with compress-wait-thread = off total time busy-ratio -------------------------------------------------- v1 125066 0.38 v2 120444 0.35 - with compress-wait-thread = on total time busy-ratio -------------------------------------------------- v1 164426 0 v2 142609 0 The v2 win slightly. Xiao Guangrong (5): bitops: introduce change_bit_atomic util: introduce threaded workqueue migration: use threaded workqueue for compression migration: use threaded workqueue for decompression tests: add threaded-workqueue-bench include/qemu/bitops.h | 13 + include/qemu/threaded-workqueue.h | 94 +++++++ migration/ram.c | 538 ++++++++++++++------------------------ tests/Makefile.include | 5 +- tests/threaded-workqueue-bench.c | 256 ++++++++++++++++++ util/Makefile.objs | 1 + util/threaded-workqueue.c | 466 +++++++++++++++++++++++++++++++++ 7 files changed, 1030 insertions(+), 343 deletions(-) create mode 100644 include/qemu/threaded-workqueue.h create mode 100644 tests/threaded-workqueue-bench.c create mode 100644 util/threaded-workqueue.c -- 2.14.5
WARNING: multiple messages have this Message-ID (diff)
From: guangrong.xiao@gmail.com To: pbonzini@redhat.com, mst@redhat.com, mtosatti@redhat.com Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, dgilbert@redhat.com, peterx@redhat.com, wei.w.wang@intel.com, jiang.biao2@zte.com.cn, eblake@redhat.com, quintela@redhat.com, cota@braap.org, Xiao Guangrong <xiaoguangrong@tencent.com> Subject: [Qemu-devel] [PATCH v2 0/5] migration: improve multithreads Date: Tue, 6 Nov 2018 20:20:20 +0800 [thread overview] Message-ID: <20181106122025.3487-1-xiaoguangrong@tencent.com> (raw) From: Xiao Guangrong <xiaoguangrong@tencent.com> Changelog in v2: These changes are based on Paolo's suggestion: 1) rename the lockless multithreads model to threaded workqueue 2) hugely improve the internal design, that make all the request be a large array, properly partition it, assign requests to threads respectively and use bitmaps to sync up threads and the submitter, after that ptr_ring and spinlock are dropped 3) introduce event wait for the submitter These changes are based on Emilio's review: 4) make more detailed description for threaded workqueue 5) add a benchmark for threaded workqueue The previous version can be found at https://marc.info/?l=kvm&m=153968821910007&w=2 There's the simple performance measurement comparing these two versions, the environment is the same as we listed in the previous version. Use 8 threads to compress the data in the source QEMU - with compress-wait-thread = off total time busy-ratio -------------------------------------------------- v1 125066 0.38 v2 120444 0.35 - with compress-wait-thread = on total time busy-ratio -------------------------------------------------- v1 164426 0 v2 142609 0 The v2 win slightly. Xiao Guangrong (5): bitops: introduce change_bit_atomic util: introduce threaded workqueue migration: use threaded workqueue for compression migration: use threaded workqueue for decompression tests: add threaded-workqueue-bench include/qemu/bitops.h | 13 + include/qemu/threaded-workqueue.h | 94 +++++++ migration/ram.c | 538 ++++++++++++++------------------------ tests/Makefile.include | 5 +- tests/threaded-workqueue-bench.c | 256 ++++++++++++++++++ util/Makefile.objs | 1 + util/threaded-workqueue.c | 466 +++++++++++++++++++++++++++++++++ 7 files changed, 1030 insertions(+), 343 deletions(-) create mode 100644 include/qemu/threaded-workqueue.h create mode 100644 tests/threaded-workqueue-bench.c create mode 100644 util/threaded-workqueue.c -- 2.14.5
next reply other threads:[~2018-11-06 12:20 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-11-06 12:20 guangrong.xiao [this message] 2018-11-06 12:20 ` [Qemu-devel] [PATCH v2 0/5] migration: improve multithreads guangrong.xiao 2018-11-06 12:20 ` [PATCH v2 1/5] bitops: introduce change_bit_atomic guangrong.xiao 2018-11-06 12:20 ` [Qemu-devel] " guangrong.xiao 2018-11-06 12:20 ` [PATCH v2 2/5] util: introduce threaded workqueue guangrong.xiao 2018-11-06 12:20 ` [Qemu-devel] " guangrong.xiao 2018-11-13 18:38 ` Emilio G. Cota 2018-11-13 18:38 ` [Qemu-devel] " Emilio G. Cota 2018-11-20 10:25 ` Xiao Guangrong 2018-11-20 10:25 ` [Qemu-devel] " Xiao Guangrong 2018-11-20 16:33 ` Emilio G. Cota 2018-11-20 16:33 ` [Qemu-devel] " Emilio G. Cota 2018-11-06 12:20 ` [PATCH v2 3/5] migration: use threaded workqueue for compression guangrong.xiao 2018-11-06 12:20 ` [Qemu-devel] " guangrong.xiao 2018-11-06 12:20 ` [PATCH v2 4/5] migration: use threaded workqueue for decompression guangrong.xiao 2018-11-06 12:20 ` [Qemu-devel] " guangrong.xiao 2018-11-06 12:20 ` [PATCH v2 5/5] tests: add threaded-workqueue-bench guangrong.xiao 2018-11-06 12:20 ` [Qemu-devel] " guangrong.xiao 2018-11-07 2:52 ` [PATCH v2 0/5] migration: improve multithreads no-reply 2018-11-07 2:52 ` [Qemu-devel] " no-reply 2018-11-12 3:07 ` Xiao Guangrong 2018-11-12 3:07 ` [Qemu-devel] " Xiao Guangrong 2018-11-20 18:27 ` Paolo Bonzini 2018-11-20 18:27 ` [Qemu-devel] " Paolo Bonzini
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=20181106122025.3487-1-xiaoguangrong@tencent.com \ --to=guangrong.xiao@gmail.com \ --cc=cota@braap.org \ --cc=dgilbert@redhat.com \ --cc=jiang.biao2@zte.com.cn \ --cc=kvm@vger.kernel.org \ --cc=mst@redhat.com \ --cc=mtosatti@redhat.com \ --cc=pbonzini@redhat.com \ --cc=peterx@redhat.com \ --cc=qemu-devel@nongnu.org \ --cc=quintela@redhat.com \ --cc=wei.w.wang@intel.com \ --cc=xiaoguangrong@tencent.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: linkBe 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.