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 6411441C52; Thu, 9 Feb 2023 14:49:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E2C5C410F9; Thu, 9 Feb 2023 14:49:01 +0100 (CET) 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 BBC3A40EDC for ; Thu, 9 Feb 2023 14:48:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675950539; 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=iTDfYYpf5Ao3UnKvj9TKQWE4XzN1US6mMq0Rfcp0RS8=; b=DYPfzbSAluDp1Mdxef8et+Zkdv3jpiarFgAS5jdMQMJ/azKmbXqI2Ih710K2pDeAjKL7MQ F15ASF/h7vRq/vVGhy0M004ELgNR4MXwFhpUepL/6w2iW7MUiMWpn8F8x590yPCGKExXqT 52rJ+wGXUgpETCvGbxAv/btof0vHZR8= Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-64-1SRPmhp6OmiHb-8brfBkww-1; Thu, 09 Feb 2023 08:48:58 -0500 X-MC-Unique: 1SRPmhp6OmiHb-8brfBkww-1 Received: by mail-pj1-f70.google.com with SMTP id h1-20020a17090a9c0100b00230353d4d2aso994036pjp.8 for ; Thu, 09 Feb 2023 05:48:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=iTDfYYpf5Ao3UnKvj9TKQWE4XzN1US6mMq0Rfcp0RS8=; b=Z/imM9EqbPY5WmXNRFcvh07TV+yV9k4Z0FZYKWyGlMkCsz93kprV1atiXimPWn+jYu itkEIwqVtccFGlDWvIuFbNc5sQIF+uVXsDaqrX7J4cRZfEPLJ0ADk1xvuMrIblCAVelg 1+h1jAiDrmNP7xOAHV1CacTVHe28ejYH3pT25dOjnKuESXu6Vc/AloF6/ITAG1dLCDN4 9HxlN2INbRIoSMUdYdCaAZ3AZrpmClXPQ5HlJ1WF8lt6CXeKzHQQ2389XyLuz7+RNrYx ZCcwI7YKyZS0rriaVJAF7ysyQlrtHXlNYCSqSdTpmOLGGqfbFmnuWxrYKVC1bPghDkO7 4DvQ== X-Gm-Message-State: AO0yUKW60w+w1RDBMqyVzoCD0W6MLGLfEwET17UqrxIp2GkwiYCwomtq 9T+G5sCGB+ckR57Z4UYY0qg7wRoQ7VXvaS/Hx01wOqN8RHJMttvAeOdjr17JFI/kalyswyiX9xw /we9hl+qtThGnfCXQDvA0VYRV X-Received: by 2002:a62:1dcc:0:b0:593:f5e4:8d93 with SMTP id d195-20020a621dcc000000b00593f5e48d93mr2775970pfd.4.1675950537261; Thu, 09 Feb 2023 05:48:57 -0800 (PST) X-Google-Smtp-Source: AK7set8cZNVxYQ1CFwpsA7r0+yyomujuYK8KAmVPkien845OQ5cAhwETtbRZBnXcqXF4Wzu/N54SoVYld5y0HGD4jDk= X-Received: by 2002:a62:1dcc:0:b0:593:f5e4:8d93 with SMTP id d195-20020a621dcc000000b00593f5e48d93mr2775957pfd.4.1675950536972; Thu, 09 Feb 2023 05:48:56 -0800 (PST) MIME-Version: 1.0 References: <20220328121758.26632-1-david.marchand@redhat.com> <20230207104532.2370869-1-david.marchand@redhat.com> In-Reply-To: <20230207104532.2370869-1-david.marchand@redhat.com> From: David Marchand Date: Thu, 9 Feb 2023 14:48:45 +0100 Message-ID: Subject: Re: [PATCH v6 0/9] Lock annotations To: dev@dpdk.org Cc: maxime.coquelin@redhat.com, stephen@networkplumber.org, chenbo.xia@intel.com, jiayu.hu@intel.com, yuanx.wang@intel.com, xuan.ding@intel.com, mb@smartsharesystems.com, Tyler Retzlaff , Thomas Monjalon X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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 Tue, Feb 7, 2023 at 11:45 AM David Marchand wrote: > > vhost internals involves multiple locks to protect data access by > multiple threads. > > This series uses clang thread safety checks [1] to catch issues during > compilation: EAL spinlock, seqlock and rwlock are annotated and vhost > code is instrumented so that clang can statically check correctness. > > Those annotations are quite heavy to maintain because the full path of > code must be annotated (as can be seen in the vhost datapath code), > but I think it is worth using. > > This has been tested against the whole tree and some fixes are already > flying on the mailing list (see [2] for a list). > > If this first series is merged, I will prepare a followup series for EAL > and other libraries. > > > 1: https://clang.llvm.org/docs/ThreadSafetyAnalysis.html > 2: https://patchwork.dpdk.org/bundle/dmarchand/lock_fixes/?state=*&archive=both > We have been discussing the annotations naming convention in another thread (I copied involved people). I saw no objection to the approach of simply prefixing with __rte the clang attributes. I'll stick to this de facto convention we have in dpdk. If any objection arises, I will do the necessary adjustments before -rc2. Series applied, thanks to all reviewers! -- David Marchand