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 174CE45B02; Thu, 10 Oct 2024 18:31:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 92363402D4; Thu, 10 Oct 2024 18:31:57 +0200 (CEST) Received: from mail-pg1-f176.google.com (mail-pg1-f176.google.com [209.85.215.176]) by mails.dpdk.org (Postfix) with ESMTP id 2111C4026B for ; Thu, 10 Oct 2024 18:31:56 +0200 (CEST) Received: by mail-pg1-f176.google.com with SMTP id 41be03b00d2f7-6bce380eb96so628145a12.0 for ; Thu, 10 Oct 2024 09:31:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1728577915; x=1729182715; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=WtixSI8ChAMwJWZHZKAm84iCaBqiKbwX2N0m3xOOUTY=; b=m/7PCTsNkJ5twnw9xPf9s2RetmOiaT/M+Cx6rru/csIcghrdOxczm7sxPAfcroWiZx fQr2s7v2uO0vtOBQrA4YH7te1P2NSQ7Kkn+shbFz9DPM33UKQQpQlzmscX7LDGYtkKVG bP5Ld8w1fwbo5ebRkfj5/TtKplHMqOBT7FWjZ24M1AmIL2bS1xnGZPGlDbtlkKB7rUNo 0zQ+cFi3PWSbmW7RGt8L2h53PGzgd2+AXdQFBAcf4nPPF+w+YOBixb13IBxsSVc+BrXO X3HH152iQm7h6C/QXip9OunbvJGtGB78RcBe9YxJ8agnb+usccG61ZKxsQBulSEO0Z4L JAFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728577915; x=1729182715; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WtixSI8ChAMwJWZHZKAm84iCaBqiKbwX2N0m3xOOUTY=; b=VDtGnvodx19zM6Yw3TCToVWwdkcjV1qwZjX6nYgQiu8irP55u6dHfW7GY+xtJGM2PL D2AJOrDGNgeBy+egYwa9LNqxxVYye0smu244mRfpxVwgUe8pGI2V5HslslssXGEgz6Sf TO7taLcx7ELR7/zIztPPMrDc2FCi1/8o2M8edUSwTLEWIMVMvStJw/4qQe63+yMvsqbO puh4GIU8qpcFTMCGdrIQ/yp+GQhc4i0okAri7L/m3X4GArpVE9+xem0ZO/fR3Tz7AT39 FTC5UX7DoM3L7MQNq7oP6p7Atz9xz6JUENRPGTcMWJZx06J8mvhQEkQw1xqCH1tb+nrZ PScg== X-Forwarded-Encrypted: i=1; AJvYcCU9GkiUjMB2iwgQNbFXfIaihleXcXllYiZQrquZndOlITj36olIy6MmO1vTlmiOS7OY+yE=@dpdk.org X-Gm-Message-State: AOJu0Yw6c45kZxucA5+owiRdSVoYJUQMN5I0JJSr+5O0UYsmg/7MI6Wm paXAwCvp4h1P30R0NujMzP/96m63mlxEbmWntanNz+9AddiDEgHohShCkhvhzYI= X-Google-Smtp-Source: AGHT+IFclznH2InHDFusSRVOwBe6mVWbkMXfJL91Ya/f7z8F+EsTRZIaaSAYpu++BJKVydO6thtCGg== X-Received: by 2002:a17:90b:948:b0:2e2:b41b:8544 with SMTP id 98e67ed59e1d1-2e2b41b94d5mr6591961a91.21.1728577915126; Thu, 10 Oct 2024 09:31:55 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e2d5df2150sm1552302a91.18.2024.10.10.09.31.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2024 09:31:54 -0700 (PDT) Date: Thu, 10 Oct 2024 09:31:52 -0700 From: Stephen Hemminger To: Mattias =?UTF-8?B?UsO2bm5ibG9t?= Cc: Mattias =?UTF-8?B?UsO2bm5ibG9t?= , dev@dpdk.org, Morten =?UTF-8?B?QnLDuHJ1cA==?= , Konstantin Ananyev , David Marchand , Jerin Jacob , Luka Jankovic , Konstantin Ananyev , Chengwen Feng Subject: Re: [PATCH v9 1/7] eal: add static per-lcore memory allocation facility Message-ID: <20241010093152.08a02959@hermes.local> In-Reply-To: References: <20241010141349.813088-2-mattias.ronnblom@ericsson.com> <20241010142205.813134-1-mattias.ronnblom@ericsson.com> <20241010142205.813134-2-mattias.ronnblom@ericsson.com> <20241010085420.649d33c4@hermes.local> MIME-Version: 1.0 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 Thu, 10 Oct 2024 18:17:56 +0200 Mattias R=C3=B6nnblom wrote: > On 2024-10-10 17:54, Stephen Hemminger wrote: > > On Thu, 10 Oct 2024 16:21:59 +0200 > > Mattias R=C3=B6nnblom wrote: > > =20 > >> Introduce DPDK per-lcore id variables, or lcore variables for short. > >> > >> An lcore variable has one value for every current and future lcore > >> id-equipped thread. > >> > >> The primary use case is for statically allocating > >> small, frequently-accessed data structures, for which one instance > >> should exist for each lcore. > >> > >> Lcore variables are similar to thread-local storage (TLS, e.g., C11 > >> _Thread_local), but decoupling the values' life time with that of the > >> threads. > >> > >> Lcore variables are also similar in terms of functionality provided by > >> FreeBSD kernel's DPCPU_*() family of macros and the associated > >> build-time machinery. DPCPU uses linker scripts, which effectively > >> prevents the reuse of its, otherwise seemingly viable, approach. > >> > >> The currently-prevailing way to solve the same problem as lcore > >> variables is to keep a module's per-lcore data as RTE_MAX_LCORE-sized > >> array of cache-aligned, RTE_CACHE_GUARDed structs. The benefit of > >> lcore variables over this approach is that data related to the same > >> lcore now is close (spatially, in memory), rather than data used by > >> the same module, which in turn avoid excessive use of padding, > >> polluting caches with unused data. > >> > >> Signed-off-by: Mattias R=C3=B6nnblom > >> Acked-by: Morten Br=C3=B8rup > >> Acked-by: Konstantin Ananyev > >> Acked-by: Chengwen Feng > >> Acked-by: Stephen Hemminger =20 > >=20 > > If you need to send v10, fix this please. > >=20 > > =20 >=20 > OK, will do. >=20 > >=20 > > WARNING:TYPO_SPELLING: 'varibles' may be misspelled - perhaps 'variable= s'? > > #336: FILE: doc/guides/prog_guide/env_abstraction_layer.rst:447: > > +Lcore varibles are suitable for small object statically allocated at > >=20 > > WARNING:TYPO_SPELLING: 'identifer' may be misspelled - perhaps 'identif= ier'? > > #867: FILE: lib/eal/include/rte_lcore_var.h:360: > > + * The pointer returned is only an opaque identifer of the variable. T= o =20 >=20 > I wonder why my checkpatch doesn't spot this, but the DPDK CI version doe= s. >=20 >=20 In order, to get spell checks you need codespell and run the script to make a local dictionary.