DPDK patches and discussions
 help / color / mirror / Atom feed
From: Joyce Kong <joyce.kong@arm.com>
To: dev@dpdk.org
Cc: nd@arm.com, stephen@networkplumber.org,
	jerin.jacob@caviumnetworks.com, konstantin.ananyev@intel.com,
	thomas@monjalon.net, honnappa.nagarahalli@arm.com,
	gavin.hu@arm.com
Subject: [dpdk-dev] [PATCH v8 0/3] ticketlock: implement ticketlock and add test case
Date: Mon, 25 Mar 2019 19:11:06 +0800	[thread overview]
Message-ID: <1553512269-146074-1-git-send-email-joyce.kong@arm.com> (raw)
Message-ID: <20190325111106.hl7MCkjLGs_vCHILPMPSqkyYuTdsm5-wgit_-LoZaHQ@z> (raw)
In-Reply-To: <1547802943-18711-1-git-send-email-joyce.kong@arm.com>

v8:
    1. Enhance functional test for ticketlock by adding extra verification to ensure correct locking in MT env.
    2. Amortize the cost of getting time in test case.
    (Suggested by Konstantin Ananyev)

v7:
    1. Modify trylock to compare both current and next fields to gurantee the lock
    being obtained only if tl->current==1(lock is free).
    As within the trylock function, suppose next==curr=1, then this thread will
    experience really long context switch, and next time it continues its
    execution and tl->next wraps around to 1 again and tl_couurent==0(lock
    held by another thread),this trylock will return a success, that means
    two threads holding the lock. (Suggested by Konstantin Ananyev)
    2. Let all archs use generic ticketlock implementation.

v6:
    Add rte_ticketlock.h in lib/librte_eal/common/include/arch/arm/.
    Sort header inside ticketlock files by alphabetical order.

v5:
    Change the variants inside rte_ticket_lock from unint to uint16_t for binary
    compatibility with the plain spin lock(suggested by Honnappa Nagarahalli)).

v4:
    Change some assignment operation in recursive ticket lock to __atomic.

V3:
    1.Update ticketlock intrduction(suggested by Honnappa Nagarahalli).
    2.Change the implementation of rte_ticketlock_trylock to CAS(suggested by Honnappa Nagarahalli).

V2:
    1.Update commit message(suggested by Jerin Jacob).
    2.Add ticketlock test cases(suggested by Jerin Jacob).

V1:
    Implement ticket lock to improve lock fairness and prdictability.

    As shown on thundex-2 platform:
    *** ticketlock_autotest with this patch ***
        Core [0] count = 496
        Core [1] count = 495
        Core [2] count = 498
        ...
        Core [209] count = 488
        Core [210] count = 490
        Core [211] count = 474

Joyce Kong (3):
  eal/ticketlock: ticket based to improve fairness
  eal/ticketlock: enable generic ticketlock on all arch
  test/ticketlock: add ticket lock test case

 MAINTAINERS                                        |   5 +
 app/test/Makefile                                  |   1 +
 app/test/autotest_data.py                          |   6 +
 app/test/meson.build                               |   1 +
 app/test/test_ticketlock.c                         | 319 +++++++++++++++++++++
 doc/api/doxy-api-index.md                          |   1 +
 lib/librte_eal/common/Makefile                     |   2 +-
 .../common/include/arch/arm/rte_ticketlock.h       |  22 ++
 .../common/include/arch/ppc_64/rte_ticketlock.h    |  18 ++
 .../common/include/arch/x86/rte_ticketlock.h       |  18 ++
 .../common/include/generic/rte_ticketlock.h        | 215 ++++++++++++++
 lib/librte_eal/common/meson.build                  |   1 +
 12 files changed, 608 insertions(+), 1 deletion(-)
 create mode 100644 app/test/test_ticketlock.c
 create mode 100644 lib/librte_eal/common/include/arch/arm/rte_ticketlock.h
 create mode 100644 lib/librte_eal/common/include/arch/ppc_64/rte_ticketlock.h
 create mode 100644 lib/librte_eal/common/include/arch/x86/rte_ticketlock.h
 create mode 100644 lib/librte_eal/common/include/generic/rte_ticketlock.h

-- 
2.7.4


  parent reply	other threads:[~2019-03-25 11:11 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-13 14:46 [dpdk-dev] [PATCH v1] ticketlock: ticket based to improve fairness Gavin Hu
2019-01-14  7:59 ` [dpdk-dev] [EXT] " Jerin Jacob Kollanukkaran
2019-01-14 16:57   ` Gavin Hu (Arm Technology China)
2019-01-14 23:36 ` [dpdk-dev] " Honnappa Nagarahalli
2019-01-18  9:15 ` [dpdk-dev] [PATCH v2 1/2] " Joyce Kong
2019-01-25  8:37   ` [dpdk-dev] [PATCH v3 0/2] ticketlock: implement ticketlock and add test case Joyce Kong
2019-02-19 10:48     ` [dpdk-dev] [PATCH v4 " Joyce Kong
2019-03-11  5:52       ` [dpdk-dev] [PATCH v5 " Joyce Kong
2019-02-19 10:48     ` [dpdk-dev] [PATCH v4 1/2] ticketlock: ticket based to improve fairness Joyce Kong
2019-03-11  5:52       ` [dpdk-dev] [PATCH v5 1/2] eal/ticketlock: " Joyce Kong
2019-03-13  9:41         ` Jerin Jacob Kollanukkaran
2019-03-15  6:57           ` Joyce Kong (Arm Technology China)
2019-03-15  6:57             ` Joyce Kong (Arm Technology China)
2019-03-13 15:36         ` Jerin Jacob Kollanukkaran
2019-03-15  6:58           ` Joyce Kong (Arm Technology China)
2019-03-15  6:58             ` Joyce Kong (Arm Technology China)
2019-02-19 10:48     ` [dpdk-dev] [PATCH v4 2/2] test/ticketlock: add ticket lock test case Joyce Kong
2019-03-11  5:52       ` [dpdk-dev] [PATCH v5 " Joyce Kong
2019-03-13 13:31         ` Jerin Jacob Kollanukkaran
2019-03-15  6:57           ` Joyce Kong (Arm Technology China)
2019-03-15  6:57             ` Joyce Kong (Arm Technology China)
2019-01-25  8:37   ` [dpdk-dev] [PATCH v3 1/2] ticketlock: ticket based to improve fairness Joyce Kong
2019-01-25  8:37   ` [dpdk-dev] [PATCH v3 2/2] test/ticketlock: add ticket lock test case Joyce Kong
2019-03-15  6:56   ` [dpdk-dev] [PATCH v6 0/2] ticketlock: implement ticketlock and add " Joyce Kong
2019-03-15  6:56     ` Joyce Kong
2019-03-15  6:56   ` [dpdk-dev] [PATCH v6 1/2] eal/ticketlock: ticket based to improve fairness Joyce Kong
2019-03-15  6:56     ` Joyce Kong
2019-03-15 12:55     ` Ananyev, Konstantin
2019-03-15 12:55       ` Ananyev, Konstantin
2019-03-19  9:44       ` Gavin Hu (Arm Technology China)
2019-03-19  9:44         ` Gavin Hu (Arm Technology China)
2019-03-19 10:15         ` Ananyev, Konstantin
2019-03-19 10:15           ` Ananyev, Konstantin
2019-03-20  5:11           ` Gavin Hu (Arm Technology China)
2019-03-20  5:11             ` Gavin Hu (Arm Technology China)
2019-03-20  9:47             ` Ananyev, Konstantin
2019-03-20  9:47               ` Ananyev, Konstantin
2019-03-22  2:04               ` Gavin Hu (Arm Technology China)
2019-03-22  2:04                 ` Gavin Hu (Arm Technology China)
2019-03-15  6:56   ` [dpdk-dev] [PATCH v6 2/2] test/ticketlock: add ticket lock test case Joyce Kong
2019-03-15  6:56     ` Joyce Kong
2019-03-21  9:13   ` [dpdk-dev] [PATCH v7 0/3] ticketlock: implement ticketlock and add " Joyce Kong
2019-03-21  9:13     ` Joyce Kong
2019-03-21  9:13   ` [dpdk-dev] [PATCH v7 2/3] eal/ticketlock: enable generic ticketlock on all arch Joyce Kong
2019-03-21  9:13     ` Joyce Kong
2019-03-21  9:13   ` [dpdk-dev] [PATCH v7 3/3] test/ticketlock: add ticket lock test case Joyce Kong
2019-03-21  9:13     ` Joyce Kong
2019-03-22 11:38     ` Ananyev, Konstantin
2019-03-22 11:38       ` Ananyev, Konstantin
2019-03-25 10:25       ` Joyce Kong (Arm Technology China)
2019-03-25 10:25         ` Joyce Kong (Arm Technology China)
2019-03-21  9:15   ` [dpdk-dev] [PATCH v7 1/3] eal/ticketlock: ticket based to improve fairness Joyce Kong
2019-03-21  9:15     ` Joyce Kong
2019-03-22 10:56     ` Ananyev, Konstantin
2019-03-22 10:56       ` Ananyev, Konstantin
2019-03-25 11:11   ` Joyce Kong [this message]
2019-03-25 11:11     ` [dpdk-dev] [PATCH v8 0/3] ticketlock: implement ticketlock and add test case Joyce Kong
2019-03-27 11:20     ` Ananyev, Konstantin
2019-03-27 11:20       ` Ananyev, Konstantin
2019-03-28 14:02       ` Thomas Monjalon
2019-03-28 14:02         ` Thomas Monjalon
2019-03-25 11:11   ` [dpdk-dev] [PATCH v8 1/3] eal/ticketlock: ticket based to improve fairness Joyce Kong
2019-03-25 11:11     ` Joyce Kong
2019-03-25 11:11   ` [dpdk-dev] [PATCH v8 2/3] eal/ticketlock: enable generic ticketlock on all arch Joyce Kong
2019-03-25 11:11     ` Joyce Kong
2019-03-25 11:11   ` [dpdk-dev] [PATCH v8 3/3] test/ticketlock: add ticket lock test case Joyce Kong
2019-03-25 11:11     ` Joyce Kong
2019-04-08 20:18     ` David Marchand
2019-04-08 20:18       ` David Marchand
2019-04-14 20:37       ` Thomas Monjalon
2019-04-14 20:37         ` Thomas Monjalon
2019-04-15  9:07         ` Joyce Kong (Arm Technology China)
2019-04-15  9:07           ` Joyce Kong (Arm Technology China)
2019-01-18  9:15 ` [dpdk-dev] [PATCH v2 2/2] " Joyce Kong

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=1553512269-146074-1-git-send-email-joyce.kong@arm.com \
    --to=joyce.kong@arm.com \
    --cc=dev@dpdk.org \
    --cc=gavin.hu@arm.com \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=nd@arm.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /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).