[{"id":1764223,"web_url":"http://patchwork.ozlabs.org/comment/1764223/","msgid":"<20170906160553.GM6175@ovn.org>","list_archive_url":null,"date":"2017-09-06T16:05:53","subject":"Re: [ovs-dev] [PATCH v2] ovs-atomic-msvc: Add atomics x64 builds","submitter":{"id":67603,"url":"http://patchwork.ozlabs.org/api/people/67603/","name":"Ben Pfaff","email":"blp@ovn.org"},"content":"On Wed, Sep 06, 2017 at 01:39:45AM +0300, Alin Gabriel Serdean wrote:\n> This patch enables atomics on x64 builds.\n> \n> Reuse the atomics defined for x86 and add atomics for 64 bit reads/writes.\n> \n> Before this patch the cmap test gives us:\n> $ ./tests/ovstest.exe test-cmap benchmark 10000000 3 1\n> Benchmarking with n=10000000, 3 threads, 1.00% mutations, batch size 1:\n> cmap insert:  20100 ms\n> cmap iterate:  2967 ms\n> batch search: 10929 ms\n> cmap destroy: 13489 ms\n> \n> cmap insert:  20079 ms\n> cmap iterate:  2953 ms\n> cmap search:  10559 ms\n> cmap destroy: 13486 ms\n> \n> hmap insert:   2021 ms\n> hmap iterate:  1162 ms\n> hmap search:   5152 ms\n> hmap destroy:  1158 ms\n> \n> After this change we have:\n> $ ./tests/ovstest.exe test-cmap benchmark 10000000 3 1\n> Benchmarking with n=10000000, 3 threads, 1.00% mutations, batch size 1:\n> cmap insert:   2953 ms\n> cmap iterate:   267 ms\n> batch search:  2193 ms\n> cmap destroy:  2037 ms\n> \n> cmap insert:   2909 ms\n> cmap iterate:   267 ms\n> cmap search:   2167 ms\n> cmap destroy:  2087 ms\n> \n> hmap insert:   1853 ms\n> hmap iterate:  1086 ms\n> hmap search:   4395 ms\n> hmap destroy:  1140 ms\n> \n> We should probably revisit this file and investigate it further to see if\n> we can squeeze more performance.\n> \n> As a side effect fix tests on x64 because usage of `ovs-atomic-pthreads.h`\n> is currently broken.\n> \n> Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>\n> Suggested-by: Ben Pfaff <blp@ovn.org>\n> ---\n> v2: Change commit message.\n> ---\n>  lib/ovs-atomic-msvc.h | 12 ++++++++++++\n>  lib/ovs-atomic.h      |  2 +-\n>  2 files changed, 13 insertions(+), 1 deletion(-)\n\nNice and simple.\n\nAcked-by: Ben Pfaff <blp@ovn.org>","headers":{"Return-Path":"<ovs-dev-bounces@openvswitch.org>","X-Original-To":["incoming@patchwork.ozlabs.org","dev@openvswitch.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","ovs-dev@mail.linuxfoundation.org"],"Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=openvswitch.org\n\t(client-ip=140.211.169.12; helo=mail.linuxfoundation.org;\n\tenvelope-from=ovs-dev-bounces@openvswitch.org;\n\treceiver=<UNKNOWN>)","Received":["from mail.linuxfoundation.org (mail.linuxfoundation.org\n\t[140.211.169.12])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xnT2z5Plgz9sRV\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  7 Sep 2017 02:06:03 +1000 (AEST)","from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id ADE79B4B;\n\tWed,  6 Sep 2017 16:06:00 +0000 (UTC)","from smtp1.linuxfoundation.org (smtp1.linux-foundation.org\n\t[172.17.192.35])\n\tby mail.linuxfoundation.org (Postfix) with ESMTPS id 95723B13\n\tfor <dev@openvswitch.org>; Wed,  6 Sep 2017 16:05:59 +0000 (UTC)","from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net\n\t[217.70.183.195])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id 3E5D7127\n\tfor <dev@openvswitch.org>; Wed,  6 Sep 2017 16:05:59 +0000 (UTC)","from ovn.org (unknown [208.91.2.3])\n\t(Authenticated sender: blp@ovn.org)\n\tby relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 87C66A80D3;\n\tWed,  6 Sep 2017 18:05:56 +0200 (CEST)"],"X-Greylist":"domain auto-whitelisted by SQLgrey-1.7.6","X-Originating-IP":"208.91.2.3","Date":"Wed, 6 Sep 2017 09:05:53 -0700","From":"Ben Pfaff <blp@ovn.org>","To":"Alin Gabriel Serdean <aserdean@ovn.org>","Message-ID":"<20170906160553.GM6175@ovn.org>","References":"<20170905223945.10908-1-aserdean@ovn.org>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20170905223945.10908-1-aserdean@ovn.org>","User-Agent":"Mutt/1.5.23 (2014-03-12)","X-Spam-Status":"No, score=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW\n\tautolearn=disabled version=3.3.1","X-Spam-Checker-Version":"SpamAssassin 3.3.1 (2010-03-16) on\n\tsmtp1.linux-foundation.org","Cc":"dev@openvswitch.org","Subject":"Re: [ovs-dev] [PATCH v2] ovs-atomic-msvc: Add atomics x64 builds","X-BeenThere":"ovs-dev@openvswitch.org","X-Mailman-Version":"2.1.12","Precedence":"list","List-Id":"<ovs-dev.openvswitch.org>","List-Unsubscribe":"<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>","List-Archive":"<http://mail.openvswitch.org/pipermail/ovs-dev/>","List-Post":"<mailto:ovs-dev@openvswitch.org>","List-Help":"<mailto:ovs-dev-request@openvswitch.org?subject=help>","List-Subscribe":"<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"ovs-dev-bounces@openvswitch.org","Errors-To":"ovs-dev-bounces@openvswitch.org"}},{"id":1764360,"web_url":"http://patchwork.ozlabs.org/comment/1764360/","msgid":"<002401d32750$80979100$81c6b300$@ovn.org>","list_archive_url":null,"date":"2017-09-06T20:41:21","subject":"Re: [ovs-dev] [PATCH v2] ovs-atomic-msvc: Add atomics x64 builds","submitter":{"id":72181,"url":"http://patchwork.ozlabs.org/api/people/72181/","name":"Alin-Gabriel Serdean","email":"aserdean@ovn.org"},"content":"Thanks for the quick review.\n\nI applied it on master.\n\nAlin.\n\n> -----Original Message-----\n> From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev-\n> bounces@openvswitch.org] On Behalf Of Ben Pfaff\n> Sent: Wednesday, September 6, 2017 7:06 PM\n> To: Alin Gabriel Serdean <aserdean@ovn.org>\n> Cc: dev@openvswitch.org\n> Subject: Re: [ovs-dev] [PATCH v2] ovs-atomic-msvc: Add atomics x64 builds\n> \n> On Wed, Sep 06, 2017 at 01:39:45AM +0300, Alin Gabriel Serdean wrote:\n> > This patch enables atomics on x64 builds.\n> >\n> > Reuse the atomics defined for x86 and add atomics for 64 bit\nreads/writes.\n> >\n> > Before this patch the cmap test gives us:\n> > $ ./tests/ovstest.exe test-cmap benchmark 10000000 3 1 Benchmarking\n> > with n=10000000, 3 threads, 1.00% mutations, batch size 1:\n> > cmap insert:  20100 ms\n> > cmap iterate:  2967 ms\n> > batch search: 10929 ms\n> > cmap destroy: 13489 ms\n> >\n> > cmap insert:  20079 ms\n> > cmap iterate:  2953 ms\n> > cmap search:  10559 ms\n> > cmap destroy: 13486 ms\n> >\n> > hmap insert:   2021 ms\n> > hmap iterate:  1162 ms\n> > hmap search:   5152 ms\n> > hmap destroy:  1158 ms\n> >\n> > After this change we have:\n> > $ ./tests/ovstest.exe test-cmap benchmark 10000000 3 1 Benchmarking\n> > with n=10000000, 3 threads, 1.00% mutations, batch size 1:\n> > cmap insert:   2953 ms\n> > cmap iterate:   267 ms\n> > batch search:  2193 ms\n> > cmap destroy:  2037 ms\n> >\n> > cmap insert:   2909 ms\n> > cmap iterate:   267 ms\n> > cmap search:   2167 ms\n> > cmap destroy:  2087 ms\n> >\n> > hmap insert:   1853 ms\n> > hmap iterate:  1086 ms\n> > hmap search:   4395 ms\n> > hmap destroy:  1140 ms\n> >\n> > We should probably revisit this file and investigate it further to see\n> > if we can squeeze more performance.\n> >\n> > As a side effect fix tests on x64 because usage of\n> > `ovs-atomic-pthreads.h` is currently broken.\n> >\n> > Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>\n> > Suggested-by: Ben Pfaff <blp@ovn.org>\n> > ---\n> > v2: Change commit message.\n> > ---\n> >  lib/ovs-atomic-msvc.h | 12 ++++++++++++\n> >  lib/ovs-atomic.h      |  2 +-\n> >  2 files changed, 13 insertions(+), 1 deletion(-)\n> \n> Nice and simple.\n> \n> Acked-by: Ben Pfaff <blp@ovn.org>\n> _______________________________________________\n> dev mailing list\n> dev@openvswitch.org\n> https://mail.openvswitch.org/mailman/listinfo/ovs-dev","headers":{"Return-Path":"<ovs-dev-bounces@openvswitch.org>","X-Original-To":["incoming@patchwork.ozlabs.org","dev@openvswitch.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","ovs-dev@mail.linuxfoundation.org"],"Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=openvswitch.org\n\t(client-ip=140.211.169.12; helo=mail.linuxfoundation.org;\n\tenvelope-from=ovs-dev-bounces@openvswitch.org;\n\treceiver=<UNKNOWN>)","Received":["from mail.linuxfoundation.org (mail.linuxfoundation.org\n\t[140.211.169.12])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xnb8p0XFdz9t2v\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  7 Sep 2017 06:41:30 +1000 (AEST)","from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id 4C7F2AD6;\n\tWed,  6 Sep 2017 20:41:27 +0000 (UTC)","from smtp1.linuxfoundation.org (smtp1.linux-foundation.org\n\t[172.17.192.35])\n\tby mail.linuxfoundation.org (Postfix) with ESMTPS id 6C282AD6\n\tfor <dev@openvswitch.org>; Wed,  6 Sep 2017 20:41:25 +0000 (UTC)","from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net\n\t[217.70.183.197])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id D7F301E2\n\tfor <dev@openvswitch.org>; Wed,  6 Sep 2017 20:41:24 +0000 (UTC)","from cloudbasealin (unknown [79.114.121.216])\n\t(Authenticated sender: aserdean@ovn.org)\n\tby relay5-d.mail.gandi.net (Postfix) with ESMTPSA id AB2FB41C093;\n\tWed,  6 Sep 2017 22:41:22 +0200 (CEST)"],"X-Greylist":"domain auto-whitelisted by SQLgrey-1.7.6","X-Originating-IP":"79.114.121.216","From":"<aserdean@ovn.org>","To":"\"'Ben Pfaff'\" <blp@ovn.org>, \"'Alin Gabriel Serdean'\" <aserdean@ovn.org>","References":"<20170905223945.10908-1-aserdean@ovn.org>\n\t<20170906160553.GM6175@ovn.org>","In-Reply-To":"<20170906160553.GM6175@ovn.org>","Date":"Wed, 6 Sep 2017 23:41:21 +0300","Message-ID":"<002401d32750$80979100$81c6b300$@ovn.org>","MIME-Version":"1.0","X-Mailer":"Microsoft Outlook 16.0","Thread-Index":"AQHTJpfzgbblmGb6KUubaQ3zjXLIYqKn5VCAgABuKOA=","Content-Language":"ro","X-Spam-Status":"No, score=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW\n\tautolearn=disabled version=3.3.1","X-Spam-Checker-Version":"SpamAssassin 3.3.1 (2010-03-16) on\n\tsmtp1.linux-foundation.org","Cc":"dev@openvswitch.org","Subject":"Re: [ovs-dev] [PATCH v2] ovs-atomic-msvc: Add atomics x64 builds","X-BeenThere":"ovs-dev@openvswitch.org","X-Mailman-Version":"2.1.12","Precedence":"list","List-Id":"<ovs-dev.openvswitch.org>","List-Unsubscribe":"<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>","List-Archive":"<http://mail.openvswitch.org/pipermail/ovs-dev/>","List-Post":"<mailto:ovs-dev@openvswitch.org>","List-Help":"<mailto:ovs-dev-request@openvswitch.org?subject=help>","List-Subscribe":"<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"ovs-dev-bounces@openvswitch.org","Errors-To":"ovs-dev-bounces@openvswitch.org"}}]