From nobody Thu Apr 16 11:29:28 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1A1AF43D4F1; Sat, 28 Feb 2026 10:56:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772276216; cv=none; b=F5Wj3KUhhBlzDCsayi3VL+nZYNjD8hjUfi08wxnm4YLRxdUOg7jreScXHji7RSGcBEwQYBlbnovOQafjYyuC2bbaHkQxOBW9pthQWZZLhNZ0be7Z8ZIpB0L7gXY2CWhoQRbF5Yp2iNsDjFTlpxl115JkYi1oP86XSYsfn0GrDW0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772276216; c=relaxed/simple; bh=5WK8N/q/QQl/Y0nKO2ByYDrPl9mJ7Nj0cV9fcl4N0Y8=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=KjiZIcr3Sb/Cayl81p2wgFrydElsF3K3u4eo5UYcqsOcdCyWzVBK5ScqFUB8eGB97zf9Y/sHIvEkxQEP2dNwBQlFvdzgKOJLYdY2vaTjd68Mp6x3YJA6h9icamvceohZR7cIzxcwAIe5Yp9Qsvv8J9aQMtCHt37sUMIB7k6MusQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=dGb+67uK; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=CsjZwOTA; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="dGb+67uK"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="CsjZwOTA" Date: Sat, 28 Feb 2026 10:56:49 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1772276210; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bgrhWZcQUmj9nOhiwe+OaVSlCNAGn1IWJJdmxw/nVyg=; b=dGb+67uKtAY/wi41Hr35KaIUCpyToY1QzFb/QImX0eMj2/V3gCwyeyIkY8k8uvHIKj1ewu jNGLzfmZJbITQ160lhCVs5mrpx3/uBlNgIBe53eLlP0+HSKbbKtgIhZ+fOYQSkrnOLilWy 5aeDBVBrEE65hyKKgrSiR3UiZsiW4XShGfYOGFEhGDn4cnA4h9Y45R63eUDd1uQaEV0emQ dcbgPexfe+kMl+wD9jTr6EVt34IWbJJ2tylZbpbJnA2oQzLQotZQ8fv7tcUKs1p5BGa947 sfLOj5xsSwhYY1HRyezybzXoObBn5Y6UjwAwh22fKAN0n+QMmyQ5aOsMJ5Dh3Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1772276210; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bgrhWZcQUmj9nOhiwe+OaVSlCNAGn1IWJJdmxw/nVyg=; b=CsjZwOTAJ0BIwNymw+e6fLQjrrvoie+5Yb0iF+9TYCbTEHNRdNgFYljcP6qSSLtnDaXUlB BAkGWeRiDeMz5+Aw== From: "tip-bot2 for Namhyung Kim" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: perf/core] perf/core: Pass GFP flags to attach_task_ctx_data() Cc: Namhyung Kim , "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260211223222.3119790-2-namhyung@kernel.org> References: <20260211223222.3119790-2-namhyung@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177227620940.1647592.8976791210708047470.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the perf/core branch of tip: Commit-ID: 28c75fbfec8f024db1278194918e5f6eda4c570f Gitweb: https://git.kernel.org/tip/28c75fbfec8f024db1278194918e5f6ed= a4c570f Author: Namhyung Kim AuthorDate: Wed, 11 Feb 2026 14:32:19 -08:00 Committer: Peter Zijlstra CommitterDate: Fri, 27 Feb 2026 16:40:21 +01:00 perf/core: Pass GFP flags to attach_task_ctx_data() This is a preparation for the next change to reduce the computational complexity in the global context data handling for LBR callstacks. Signed-off-by: Namhyung Kim Signed-off-by: Peter Zijlstra (Intel) Link: https://patch.msgid.link/20260211223222.3119790-2-namhyung@kernel.org --- kernel/events/core.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index ac70d68..90b0c93 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -5370,15 +5370,15 @@ static void unaccount_freq_event(void) =20 =20 static struct perf_ctx_data * -alloc_perf_ctx_data(struct kmem_cache *ctx_cache, bool global) +alloc_perf_ctx_data(struct kmem_cache *ctx_cache, bool global, gfp_t gfp_f= lags) { struct perf_ctx_data *cd; =20 - cd =3D kzalloc_obj(*cd); + cd =3D kzalloc_obj(*cd, gfp_flags); if (!cd) return NULL; =20 - cd->data =3D kmem_cache_zalloc(ctx_cache, GFP_KERNEL); + cd->data =3D kmem_cache_zalloc(ctx_cache, gfp_flags); if (!cd->data) { kfree(cd); return NULL; @@ -5412,11 +5412,11 @@ static inline void perf_free_ctx_data_rcu(struct pe= rf_ctx_data *cd) =20 static int attach_task_ctx_data(struct task_struct *task, struct kmem_cache *ctx_cach= e, - bool global) + bool global, gfp_t gfp_flags) { struct perf_ctx_data *cd, *old =3D NULL; =20 - cd =3D alloc_perf_ctx_data(ctx_cache, global); + cd =3D alloc_perf_ctx_data(ctx_cache, global, gfp_flags); if (!cd) return -ENOMEM; =20 @@ -5499,7 +5499,7 @@ again: =20 return 0; alloc: - ret =3D attach_task_ctx_data(p, ctx_cache, true); + ret =3D attach_task_ctx_data(p, ctx_cache, true, GFP_KERNEL); put_task_struct(p); if (ret) { __detach_global_ctx_data(); @@ -5519,7 +5519,7 @@ attach_perf_ctx_data(struct perf_event *event) return -ENOMEM; =20 if (task) - return attach_task_ctx_data(task, ctx_cache, false); + return attach_task_ctx_data(task, ctx_cache, false, GFP_KERNEL); =20 ret =3D attach_global_ctx_data(ctx_cache); if (ret) @@ -9240,7 +9240,7 @@ perf_event_alloc_task_data(struct task_struct *child, =20 return; attach: - attach_task_ctx_data(child, ctx_cache, true); + attach_task_ctx_data(child, ctx_cache, true, GFP_KERNEL); } =20 void perf_event_fork(struct task_struct *task)