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 D52CEA00C2; Sun, 15 May 2022 19:54:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7A2FA40A7A; Sun, 15 May 2022 19:54:38 +0200 (CEST) Received: from mail.lysator.liu.se (mail.lysator.liu.se [130.236.254.3]) by mails.dpdk.org (Postfix) with ESMTP id 96BE540A79 for ; Sun, 15 May 2022 19:54:36 +0200 (CEST) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 97E6AE1EB for ; Sun, 15 May 2022 19:54:34 +0200 (CEST) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id 969E8E1EA; Sun, 15 May 2022 19:54:34 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on hermod.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED, AWL, NICE_REPLY_A, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.6 X-Spam-Score: -2.9 Received: from [192.168.1.59] (unknown [62.63.215.114]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id 16BA6E6E5; Sun, 15 May 2022 19:54:28 +0200 (CEST) Message-ID: <63a953bf-ebdb-e313-ae47-75c14ede25b5@lysator.liu.se> Date: Sun, 15 May 2022 19:54:27 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH v7] eal: add seqlock Content-Language: en-US To: =?UTF-8?Q?Morten_Br=c3=b8rup?= , =?UTF-8?Q?Mattias_R=c3=b6nnblom?= , Thomas Monjalon , David Marchand Cc: dev@dpdk.org, Onar Olsen , Honnappa.Nagarahalli@arm.com, nd@arm.com, konstantin.ananyev@intel.com, stephen@networkplumber.org, Chengwen Feng , Ola Liljedahl References: <20220513103820.3e34fcb9@hermes.local> <20220515122418.335929-1-mattias.ronnblom@ericsson.com> <98CBD80474FA8B44BF855DF32C47DC35D8706E@smartserver.smartshare.dk> From: =?UTF-8?Q?Mattias_R=c3=b6nnblom?= In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D8706E@smartserver.smartshare.dk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP 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 2022-05-15 17:19, Morten Brørup wrote: >> From: Mattias Rönnblom [mailto:mattias.ronnblom@ericsson.com] >> Sent: Sunday, 15 May 2022 14.40 >> >> Two questions remain: >> >> 1) Should the seqlock and the seqcount reside in different header >> files? >> 2) Is it it good enough to provided only a spinlock-protected seqlock? >> >> Question 1 I don't really have an opinion on. Both ways seems perfectly >> reasonable to me. I noted Morten wanted a split, and left to my own >> devices this is probably what I would do as well. > > Argument for separate header files: If we add e.g. a rte_seqticketlock_t later, it should be able to include the rte_seqcount_t header file without also getting the contextually irrelevant rte_seqlock_t type and functions. > > I don't feel strongly about this. > >> >> I think the answer to 2 is yes. We can provide other variants in the >> future, would the need arise. > > Agree. > >> >> > > Please move the header files from /lib/eal/include to /lib/eal/include/generic, where the other lock header files reside. > > My guess would be that the lib/eal/include/generic directory is where the generic implementations of APIs for which there also exist machine-specific implementations go. The seqlock is not an example of such.