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 4A972428CB; Tue, 4 Apr 2023 09:45:17 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 21DFC410FA; Tue, 4 Apr 2023 09:45:17 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id E1B9840EE3 for ; Tue, 4 Apr 2023 09:45:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680594314; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iyD6F9D2LWJlSdZHSyZjGKR80XA3PNZLGR2z4yggQnQ=; b=CgEcNVGpdIH1l2k+Wmlqhy2dfq6BW8Q/DykU9rodKgSWv4cZ6h1ABkXKyTVHba/gzSvABZ tD557xxpNVJ7ESTive2UP0Xf6R4ikNlTFMgeQQASg//hy54Mp9969a+hNQ8qjEkcS6TAMd vH1aPCfsZl65rbXdBf3d7SrARi+/eSM= Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-205-Os8jpHN8Nvu-50eWX-3vzA-1; Tue, 04 Apr 2023 03:45:13 -0400 X-MC-Unique: Os8jpHN8Nvu-50eWX-3vzA-1 Received: by mail-pg1-f200.google.com with SMTP id g1-20020a636b01000000b00513e01ebb14so1889030pgc.9 for ; Tue, 04 Apr 2023 00:45:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680594312; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iyD6F9D2LWJlSdZHSyZjGKR80XA3PNZLGR2z4yggQnQ=; b=U2/RWmQvOGyoCuxR7DRdK8GhFxkx9RY9TbkfKfNAqe0squupShzlcKhlsRB2yN5KBm C09hof57ndHMQbNz79j/9DkDBxowCjhfE24lWs5O6QZyRf+5aepTP77hK6lZZRysvGsD Pxu02Q8uBO139qnxW5jW4Zqm6mGS4XXtA53q0Wvw2EnvKXCBwgSr22b54FoJ9c098aeK SGFGjxZ82F1TnComq78+G+igMeSJVVTgGOpMWl1T+1pL9bB/3jbWcPxA6EYfvwJxJ6NR lt9/l4GIWXx2vClTRIgz2HjZy98/BS6pLsn5Hs68/Ng3E/ODkzeTzlXLN47E1wN7P1ya J7VQ== X-Gm-Message-State: AAQBX9cYVQ++gLSgjNXEXUwrjJASdHsyuBrvWq3R3NATw2rAMLJSYZkY qA+ALzqIKCEJzAKpO+SjPYD1Z4wOHCG5ukLqRW/JweLOu8f5wpriHXabil1DJG4vL/DykA/q6v+ tS44huBLVo2vvWYt3raw= X-Received: by 2002:a63:1c3:0:b0:513:5162:a692 with SMTP id 186-20020a6301c3000000b005135162a692mr5946587pgb.5.1680594312071; Tue, 04 Apr 2023 00:45:12 -0700 (PDT) X-Google-Smtp-Source: AKy350ZbXTc4UP6dhMSqgiVtL3osw3hb8tXObhCJP0B6AMqDKw2w/qhs7N5Fsdbk3mixAsH04AEhZCqcXTJLAktQXb0= X-Received: by 2002:a63:1c3:0:b0:513:5162:a692 with SMTP id 186-20020a6301c3000000b005135162a692mr5946576pgb.5.1680594311701; Tue, 04 Apr 2023 00:45:11 -0700 (PDT) MIME-Version: 1.0 References: <20230224081642.2566619-1-david.marchand@redhat.com> <20230224151143.3274897-1-david.marchand@redhat.com> <095511d4-4fbb-47a8-a8a5-f2a3b932c01f@app.fastmail.com> <20230403153656.GA6670@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> In-Reply-To: <20230403153656.GA6670@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> From: David Marchand Date: Tue, 4 Apr 2023 09:45:00 +0200 Message-ID: Subject: Re: [PATCH v2 00/20] Enable lock annotations on most libraries and drivers To: Tyler Retzlaff Cc: dev@dpdk.org, Thomas Monjalon , =?UTF-8?Q?Ga=C3=ABtan_Rivet?= X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 On Mon, Apr 3, 2023 at 5:37=E2=80=AFPM Tyler Retzlaff wrote: > > On Mon, Apr 03, 2023 at 12:52:06PM +0200, David Marchand wrote: > > Hello Tyler, > > > > On Thu, Mar 2, 2023 at 9:52=E2=80=AFAM David Marchand wrote: > > > On Mon, Feb 27, 2023 at 5:13 PM Ga=C3=ABtan Rivet wr= ote: > > > > Ah ok, so if I understand correctly, DPDK would need to declare som= e > > > > '__rte_lockable rte_mutex' and associated functions for transparent= support, > > > > to wrap above the pthread API. > > > > > > Yes, this is what I had in mind for the mid/long term but it was too > > > late for 23.03 after -rc1. > > > > > > The Windows porting effort will probably need this abstraction too as > > > we are trying to stop relying on the pthread API. > > > I don't see this item in Microsoft roadmap, though. > > > > Do you have an opinion on this topic? > > Okay, trying to grok the question here. If the question is do we want to > introduce a mutex/condition variable and lock/unlock signal/wait > abstraction? > > I would certainly like to see reduced conditional compilation that > applications have to perform for the platform features. I also really > would like to purge the remaining pthread_{mutex,condvar} shim since it > is unsightly. > > With msvc I think we could probably achieve the same with C11 threads but > I haven't investigated feasability and said with no investigation older > glibc may not provide the optional feature. > > In the absence of C11 threads we can provide an rte_ abstraction but I > don't think I can put it on the roadmap until basic msvc support is > stood up (a question of resource prioritization as always). > > I could commit to looking at it once msvc and atomics changes are merged > the earliest possible time frame for that is the start of the 23.11 > cycle. If that happens at decent velocity I could even see adding it to > 23.11 roadmap. Ok for me. > > For now if someone else decides to introduce an abstraction I would just > caution strongly not to remove __rte_experimental from any API added > until I get a chance to focus on it. We *could* introduce an internal API. But I prefer we wait for your input on this topic rather than introduce some artificial API. I'll simply disable those checks on FreeBSD. --=20 David Marchand