From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9DFEF318140 for ; Wed, 11 Feb 2026 22:32:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770849143; cv=none; b=LVZt57ov8sbxcJDefPo9FDzlfb5zvc9RloGi55v79UEDJ1on8GAuRjIqfdIrhEeR2BK4IZ4y9ktTsItm61tLKWQ+HtutKqY4NXxyVtBL+t+oCNniJHXSRsWkWuGQHsAP6DYhL9lgNtex5twzCYtQTRUTcM6qBcgl3OTMeTSnnds= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770849143; c=relaxed/simple; bh=IbXGVhntPqdKz4CsyS7CLiTkkimWyX5NEeSwaQ11Aa4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=NhYskJjf5WTJrMUC1WmRr/YZ948eUS8KC2xvDqiWE5LxsFd6D5JETZpunXzqZvNLTJEOZKiSp5HqxOLh2xg8tOADXsrEHk29sAf0c8IoRWPeBtUCas5yISePJrnqc5HhS0Z/TLWYAtvRU0LK/1O0on2z00BDQG3H83NRXetyZtM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uLd1qbzK; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uLd1qbzK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BF628C4CEF7; Wed, 11 Feb 2026 22:32:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770849143; bh=IbXGVhntPqdKz4CsyS7CLiTkkimWyX5NEeSwaQ11Aa4=; h=From:To:Cc:Subject:Date:From; b=uLd1qbzKCq5H7r02fjNlXPUcPpHB+9/JMTgI7bIqLcjpi1hH/qG1jZ5aXN+EVBx3G 6wkTlnK5+b7EVP5vQbCA8+a9a/MTjWyGBzYW3e8Zc6LjylUliDC7detOF5EVobYc1O v7/QHmZSDrXa9Z99uTVjB1SSopxZ5gJ1bqQHzybt8TdFMli5IgpAQYxvw6Cnnng7hY sB7rHW2qb+uTm1Qb+/6I66Vha7T+LY8gkDA/t5ioaUpfScYUAA1SOXGb4BCQFW+NYh Qh0uuBUlzSaGA4hanA4OTOJl/va7RDa8p70hIKLEofsr8PF9OfgnpixqOyVloMcGqi OCZxT/0kI4BSQ== From: Namhyung Kim To: Peter Zijlstra , Ingo Molnar Cc: Mark Rutland , Alexander Shishkin , Arnaldo Carvalho de Melo , LKML , Guenter Roeck Subject: [PATCH 0/3] perf/core: Optimize LBR callstack handling Date: Wed, 11 Feb 2026 14:32:18 -0800 Message-ID: <20260211223222.3119790-1-namhyung@kernel.org> X-Mailer: git-send-email 2.53.0.273.g2a3d683680-goog Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hello, I found other problematic cases wrt LBR callstacks. Basically O(N^2) loop for every threads is too costly on large machines. We can use faster memory allocation and free methods to reduce the overhead. Actually this approach is suggested by AI (Gemini). Thanks, Namhyung Namhyung Kim (3): perf/core: Pass GFP flags to attach_task_ctx_data() perf/core: Try to allocate task_ctx_data quickly perf/core: Simplify __detach_global_ctx_data() kernel/events/core.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) -- 2.53.0.273.g2a3d683680-goog