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 B6A64A0C43; Sun, 4 Jul 2021 18:27:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5DD3B40686; Sun, 4 Jul 2021 18:27:41 +0200 (CEST) Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) by mails.dpdk.org (Postfix) with ESMTP id E4CBC40686 for ; Sun, 4 Jul 2021 18:27:40 +0200 (CEST) Received: by mail-lj1-f172.google.com with SMTP id w11so21228534ljh.0 for ; Sun, 04 Jul 2021 09:27:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Si4OXuu2I05k8L+wnWbSndSIRZXoTvqalkuAStIH6cE=; b=LzS+ApmcJFxgEWY0M+iwik9AUcLqZtu4SLRG+FGlCUkzH98Pe4Xc9AAwPoQP1hPQCd 5X5Fd/2iOSoSY59VfXbCLK0ZOjI0X/iLjrPJjp6Cm6FnjH55vwnu9BmtH7AcMC9KboMh ZQUyAqLpH6ebsHWJyhK56vntpuCi85Jai2w8sDx0wt9qo1V7qAx+lW8ZK/zDYmGYq4dT 0+Q9iHrdd+c+Cpbkh9kM99PgwM2Wbay6wg5GTuyfh0DhBWMQo7jAwFzn5pmLQ4iacVL7 Xw6zKBjt22i7/E3d4M6RHBYEFw9+7luw9jmY+3JH1q1yh0ZScbuHiGV1O1CFCV7599Gj T3aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Si4OXuu2I05k8L+wnWbSndSIRZXoTvqalkuAStIH6cE=; b=azyqA+FgV2w4xcPKmyxKZNeSylpwXhnSQRfN3oMRNN+qQACCOv+YeCmJZdl3s2VloN dmOBImRureWzyCWzmVD94ORwvWxBwMyhhI4ZhsRm2jrvs1h/hZvsrAgEvnJ5YVvCjqIM E46YVWYN7i9sLK+7JcuV7pgNLeFhTVdt26Axs+Sckcy3Ng1WpN1RRNHVle65SPHg0xxN gKxbKWelOr7wa5wDYRNx/OUvTFotCKWzc3fxcjawwT8h8nsKEI8NBzjM14rKPIa+4OjW Ldnd8IBNwFte1xorBljLJacL3MaO8atZZgku3m6nw9Gz31eRmZzIRY9koFTCn39AbQD7 9TJQ== X-Gm-Message-State: AOAM532kwpk3+xdry1jDLezMEnJ0UftxJK0bQrzQssCRnJWXbhPFERkM OQsMlcBueCd96m0/SNbotmk= X-Google-Smtp-Source: ABdhPJwylzaM272guE+FiOnMm7ydnA7ftacGxJ9Sxp7OXv6ZviKFsxiLvEExTuHg34f2cmB6tQtQRw== X-Received: by 2002:a05:651c:387:: with SMTP id e7mr7907263ljp.371.1625416060487; Sun, 04 Jul 2021 09:27:40 -0700 (PDT) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id t24sm1151860ljc.45.2021.07.04.09.27.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jul 2021 09:27:39 -0700 (PDT) Date: Sun, 4 Jul 2021 19:27:38 +0300 From: Dmitry Kozlyuk To: Thomas Monjalon Cc: dev@dpdk.org, Andrew Rybchenko , ferruh.yigit@intel.com, keesang.song@amd.com, anatoly.burakov@intel.com, david.marchand@redhat.com, bruce.richardson@intel.com, David Christensen , ruifeng.wang@arm.com Message-ID: <20210704192738.4d7a690a@sovereign> In-Reply-To: <2008897.KIaY0792Ae@thomas> References: <2863796.yO5TXMfXnl@thomas> <12700395.j6fn4b5UDm@thomas> <9e359fe9-f993-ef6c-1b51-1e08fec5ff9b@oktetlabs.ru> <2008897.KIaY0792Ae@thomas> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] NUMA node/socket 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" 2021-07-04 11:28 (UTC+0200), Thomas Monjalon: > 04/07/2021 10:27, Andrew Rybchenko: > > On 7/4/21 4:53 AM, Thomas Monjalon wrote: > > > 04/07/2021 03:38, Thomas Monjalon: > > >> There are some mix between NUMA node and socket IDs in DPDK. > > >> Examples: > > >> * rte_eth_dev_socket_id() returns the NUMA node. > > >> * rte_malloc use sockets to allocate the memory > > >> > > >> Is it critical? > > > > > > There is a function, implemented for Windows only, > > > which distinguishes clearly node and socket > > > but it assumes there is only 1 node per socket: > > > > > > unsigned int > > > eal_socket_numa_node(unsigned int socket_id) > > > { > > > return cpu_map.sockets[socket_id].node_id; > > > } > > > > > > Reminder: AMD can be configured to have multiple nodes per socket. > > > > Taking the reminder into account the topic definitely > > requires improvements. > > > > I apologize for my ignorance, but > > Is socket ID really interesting to anybody in DPDK? > > I think the socket ID might be interesting for the threads, > but not for memory or devices. > > > If no, we should just clarify terminology and switch > > to NUMA node everywhere. > > I have the same opinion as Andrew. > If socket ID is required, it could be deduced from the NUMA node > or from the CPU core. I agree with renaming too. Everywhere in DPDK "socket ID" really means "NUMA node". I don't see how exactly socket ID can be deduced from NUMA node or CPU core (assuming rte_socket_id becomes rte_numa_node_id), but I also can't imagine why an app would need it. EAL could use NUMA distance info for better memory management: currently SOCKET_ID_ANY means "current NUMA node or the first one with enough memory available" while it could be "or the closest one".