From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7528AA0C4E; Mon, 25 Oct 2021 18:23:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E5E4D40E32; Mon, 25 Oct 2021 18:23:35 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 74C804003E for ; Mon, 25 Oct 2021 18:23:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635179013; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ljlaY3zM0BKmNGN1mlTwVu+U5g4viAtYyYLRjZRtnTA=; b=GD5dmzMyI1i0nfGZ5QKHlNoa9L1QkQrpgLT/sd2IsJwYhqGwyzJNTsWi84GSlRrReKhA5C hQ+eCnuuufh/3v/6lj9L/jDKT18HhIvpNLD2TnX+2JKnHWl4EkwKhfaMUpN/EohvZf9Vli W17mLYXjeS512YSpjO5VL0ZmfjTCAVQ= Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-594-24WsVJDdNK2dEFA7zwX-Qg-1; Mon, 25 Oct 2021 12:23:30 -0400 X-MC-Unique: 24WsVJDdNK2dEFA7zwX-Qg-1 Received: by mail-lj1-f199.google.com with SMTP id l22-20020a2e8696000000b0021174f030e5so1199070lji.6 for ; Mon, 25 Oct 2021 09:23:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ljlaY3zM0BKmNGN1mlTwVu+U5g4viAtYyYLRjZRtnTA=; b=Nm8t9H+oUnl5TOQoQx9x+jyMyxyNduvm+5Y9e1M1fcsfj9/374nCvA23ErWT34LXB1 GDCrbueoEoZIXFWP32EQ+TnYXVv1nOQaPq4OHU3OQIc9MYdfnRniOqm5I7+k/r/ceAZg Jyw+vuyWSWQHQnTvsc9ctckqgxaeCEjmIe6Kz0rAd5PIG+0XId8juT5nZfXCncstJMxI DGBRD+lR7QVc1Ky31w2s+T8Mqbv2NNBMC3R7nj09UVJs9Dxdsicu1YlYikARSxLpIftQ 7PgUkaeX4mGIIBmd+f78m4nSSPZEXwDPP/mHslOcoFO0AcfYVrhEDBI6QGPopeV0lp3Q zn1Q== X-Gm-Message-State: AOAM532/RrAafkhUvoYgtVPaZvLPLdiKE7YY+MnDmClKUc/20LpHiG40 TWAO5XqvKVW7sqO4z3qUvD53BvkzQgdgQvmp2E3DIkwrzqWanfoQD5IrRZJuRMEWm+QYb+FKM6E oJoK5sDtidpTQ0aMnNoA= X-Received: by 2002:ac2:4d56:: with SMTP id 22mr4535805lfp.265.1635179008689; Mon, 25 Oct 2021 09:23:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPBAkJ3v/pAUuOgjWv1KbAiyx08YRcsTZ5gA3KQDZB5uEyNpZ3KR67jRsWZr/nX7IC03k80IeECRHd/lPqnow= X-Received: by 2002:ac2:4d56:: with SMTP id 22mr4535776lfp.265.1635179008395; Mon, 25 Oct 2021 09:23:28 -0700 (PDT) MIME-Version: 1.0 References: <20210224212018.17576-1-honnappa.nagarahalli@arm.com> <20211025045237.19878-1-honnappa.nagarahalli@arm.com> In-Reply-To: <20211025045237.19878-1-honnappa.nagarahalli@arm.com> From: David Marchand Date: Mon, 25 Oct 2021 18:23:16 +0200 Message-ID: To: Honnappa Nagarahalli Cc: dev , "Ananyev, Konstantin" , Feifei Wang , "Ruifeng Wang (Arm Technology China)" , nd Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v3 0/4] Use correct memory ordering in eal functions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, Oct 25, 2021 at 6:53 AM Honnappa Nagarahalli wrote: > > v3: > a) Added Fixes, Cc:stable#dpdk.org in 1/6 > b) Merged 3/6 & 4/6 and moved after the first commit in the series > c) Merged 2/6 & 5/6 as they need to be in a single commit > d) Removed use of volatile in 6/6 (Konstantin) > > rte_eal_remote_launch and rte_eal_wait_lcore need to provide > correct memory ordering to address the data communication from > main core to worker core. > > There are 2 use cases: > 1) All the store operations (meant for worker) by main core > should be visible to worker core before the worker core runs the > assigned function > > 2) All the store operations by the worker core should be visible > to the main core after rte_eal_wait_lcore returns. > > For the data that needs to be communicated to the worker after > the rte_eal_remote_launch returns, load-acquire and store-release > semantics should be used. > > For the main to worker communication, the pointer to function > to execute is used as the guard variable. Hence, resetting of > the function pointer is important. > > For the worker to main communication, the existing code uses the > lcore state as the guard variable. However, it looks like > the FINISHED state is not really required. Hence the FINISHED state > is removed before using the state as the guard variable. > > Honnappa Nagarahalli (4): > eal: reset lcore function pointer and argument > eal: lcore state FINISHED is not required > eal: ensure correct memory ordering > test/ring: use relaxed barriers for ring stress test > > app/test/test_ring_stress_impl.h | 18 +++---- > drivers/event/dpaa2/dpaa2_eventdev_selftest.c | 2 +- > drivers/event/octeontx/ssovf_evdev_selftest.c | 2 +- > drivers/event/sw/sw_evdev_selftest.c | 4 +- > examples/l2fwd-keepalive/main.c | 3 +- > lib/eal/common/eal_common_launch.c | 13 ++--- > lib/eal/freebsd/eal_thread.c | 45 +++++++++++++---- > lib/eal/include/rte_launch.h | 21 ++++---- > lib/eal/include/rte_service.h | 4 +- > lib/eal/linux/eal_thread.c | 48 +++++++++++++------ > lib/eal/windows/eal_thread.c | 48 +++++++++++++------ > 11 files changed, 132 insertions(+), 76 deletions(-) Tweaked commit titles, removed deprecation notice and updated release notes in patch 2. Series applied, thanks. -- David Marchand