Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp821799lqb; Wed, 29 May 2024 11:27:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUgXAn89ZEJ0d/fWyv8Yf4N441LgnDsLIWoaFFpKb5/XP3BL+hcqeM3gY3ni0SvrRMG19hX0qnE7V1Z++GCbb+4gXx7x89mjrol4x5dLQ== X-Google-Smtp-Source: AGHT+IFZTdBbRy0gn5Dyu6o2MhZ95XWabXO+Cq7aHmsQ9kKC/vMVdAru8BPCip9ZJFPSJYaHjP9f X-Received: by 2002:a50:d498:0:b0:572:2efe:4d14 with SMTP id 4fb4d7f45d1cf-57a03f86643mr2339980a12.10.1717007276778; Wed, 29 May 2024 11:27:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717007276; cv=pass; d=google.com; s=arc-20160816; b=CYwpG5/ZjNl7dB5RCKJWkvbNQU7k7cmfTAlF9JdsWzLlNvdt7w2dOl4AmE/+0DuyX+ afsdrN6GgBK+IfdmlkaHA/G+LgGNyOUy+O5JsE5ioMzgOlL9fIJ9juG+bAR/+mrR66CP kmf0GgbWmC7olg4TJOw4s4t2+doCv9ye/GYTEZl+DNPUSFXqFF6hdT5dO3N1fyf/j/AA 419jgjrs5f4fylSke0MPWpGYSmsRI0mXEBea4nH5GD/aC9ar+Q+LA7e9d5HZq9TMaoT0 7oKq3mTFYvwpR0jpvc/6UJ6/yzvMpwG/WNPVFUmhPqi1TViXDGuQeXH3LWS8GyHh7HK6 YvGg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence; bh=WD9+m2uRH+Hg4qe+386Ai932VFm1j7AF3HmzviPsoPg=; fh=U+MUlgKYAkMBKvp/uuFPk895ZlINWVJW458Ntv29Gg0=; b=O0w6U+2AlIBi4dGHZfIrO/moyueg+s18DuPcrMf+6fW8WBqHYC/mphgZq/2wXUhyuy Ti0vzOPlxb2dy0B19Kq2Muw1JoWCkiSuZSMeAvodAWOmUiZSCOQ2I+YyFW2QueouZD+c CXX3AHpjsGgbKIuUpXHxV73cYbUvH3/UACWmLGSdjptWoX07Fu3f6TKzfKJEjxkf/WHp 99hhd32D8EgpBYCF7RtOZYpzWwiB3n9k7SGXUd7PgN96bUnPoDPMYhWVStHcZI7mASVq bapMginPlUcXjkbWbXJgQ7vrmQKOnTqEM+ppVJ4/8Ijk+6n006n3b09RZVaUM0vyUvcu WRAg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-194568-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194568-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57852495ea9si6614974a12.450.2024.05.29.11.27.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 11:27:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194568-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-194568-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194568-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 504E91F23DA0 for ; Wed, 29 May 2024 18:27:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 007941C2302; Wed, 29 May 2024 18:27:31 +0000 (UTC) Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E5DC15D5A1; Wed, 29 May 2024 18:27:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717007250; cv=none; b=pyn1Mf5ok6OPqm+q5rCvJNauM4ZH1o5Qdsz+ekTy303EJBGPovAPaHl8vYsFEx4JrBkt00bzEbdmen6iABcjBnsISyX+jo6D/AhhTzZEQzp3FpYR9szVdJfqM1dLR6izFqHUkTQhovHzVPpJwyVkdVbUB2Oa9PzA3uT3LSKHpOM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717007250; c=relaxed/simple; bh=k7g7GDca72KtY7wZrsm0Zqr6CCkZXZ3ooFMOR2lk5QQ=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=ea0DHOnoikSHZPEzsLFDbnLmKva2Y28gAvlji14CR81NHwoCm+wGoV4m6zhfsXn9oE/4aSSRsVOqX/Vbio5lpRYjn4glBJeoJYywSDl4BpvgZYVcyyVgbUfwzHoahEoQusyRCaqHA5G0g2DcySzOuuGQEi2BwReuPFhoiRoi3BQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.216.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-f43.google.com with SMTP id 98e67ed59e1d1-2c1a5913777so1097a91.2; Wed, 29 May 2024 11:27:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717007248; x=1717612048; 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=WD9+m2uRH+Hg4qe+386Ai932VFm1j7AF3HmzviPsoPg=; b=oeituTrkKZNFdbJdV+6foIvzRNzdu0yJoQtGbQUQD2EvN73M2y4Xwg0JBDkvNufSTW LjTolhuyM8W2FTKiD540+IwpRM/dQc2/7i07/eYeq4/SY30n/3Fh+kkCR3UxRpJf4RuJ eKOWj2QeT4NTp9V0sFfIN2vRgqbdq0k+mBqMRZmUsfOs+tethfSMLjwbYwFrlD1zxbus Z8zJkps+FGkGFzllbFarmSNqtnBdcLl7BwNlheU/B9ZjFDtokNneMnAlsi3+o+2Q00eD cmmneFfOsWc6y2Nu90TOn3I3CptL1zrKq2Bm/Uc6aavWmwCJVaVtwCxs8qQsqKs4ZUQF HmyA== X-Forwarded-Encrypted: i=1; AJvYcCWYOpvNojZ3NzSO7SPWUNZfJJ4FxwTCyiZOKIgfESxzozIhQc12oZf0VIFpn40lh6i2VwfWbhNHhzJPq+bWGeLkNIKbETsiGS/iaJQcyxDCAktxXY86G3RSRf4JK3AqyZWs X-Gm-Message-State: AOJu0Ywbw/qDKD4j/lRKbyXMHPfmpclZkXgFb+SEqbd1O97rDfU3UZ/o Kd925h/VxB/g9d1vcHubhKX19q+yn9Nhrgy+hhrIVPPJRD2qR2QN9cSp6yqGKS06z6jFUA1KTnR uHl02YhudkrYSCr0ggmNCklkHIS4= X-Received: by 2002:a17:90b:33d2:b0:2bf:ebf5:c9d4 with SMTP id 98e67ed59e1d1-2bfebf5cb71mr8364249a91.42.1717007248347; Wed, 29 May 2024 11:27:28 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240529065311.1218230-1-namhyung@kernel.org> In-Reply-To: From: Namhyung Kim Date: Wed, 29 May 2024 11:27:17 -0700 Message-ID: Subject: Re: [PATCH v2] bpf: Allocate bpf_event_entry with node info To: Alexei Starovoitov Cc: Jiri Olsa , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , LKML , bpf , Aleksei Shchekotikhin , Nilay Vaish Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Alexei, On Wed, May 29, 2024 at 10:23=E2=80=AFAM Alexei Starovoitov wrote: > > On Wed, May 29, 2024 at 9:54=E2=80=AFAM Namhyung Kim wrote: > > > > Hi Jiri, > > > > On Wed, May 29, 2024 at 1:31=E2=80=AFAM Jiri Olsa = wrote: > > > > > > On Tue, May 28, 2024 at 11:53:11PM -0700, Namhyung Kim wrote: > > > > It was reported that accessing perf_event map entry caused pretty h= igh > > > > LLC misses in get_map_perf_counter(). As reading perf_event is all= owed > > > > for the local CPU only, I think we can use the target CPU of the ev= ent > > > > as hint for the allocation like in perf_event_alloc() so that the e= vent > > > > and the entry can be in the same node at least. > > > > > > looks good, is there any profile to prove the gain? > > > > No, at this point. I'm not sure if it'd help LLC hit ratio but > > I think it should improve the memory latency. > > I have the same concern as Jiri. > Without numbers this is just a code churn. > Does this patch really make a difference? > Without numbers maintainers would have to believe the "just trust me" par= t. > So.. > pw-bot: cr Ok, then I'll come back with numbers later. Thanks, Namhyung