Message ID | 20231015053251.707442-1-wuqiang.matt@bytedance.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp2781858vqb; Sat, 14 Oct 2023 22:33:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFZwfg4waiS2jnqRbptxJqxP2PjAiWrSccSBXBNBf0Rk51e1sWPbjQUbTLg2XTg37wLSs7D X-Received: by 2002:a17:902:ce86:b0:1c4:2b71:7dc9 with SMTP id f6-20020a170902ce8600b001c42b717dc9mr34889376plg.4.1697348031400; Sat, 14 Oct 2023 22:33:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697348031; cv=none; d=google.com; s=arc-20160816; b=DKfckdp3YiRFanltYp+un3QljEbm3vjM0Wb/dqCVF0F8deyHh62MmNfU4taBGZ6HZT Eh4CCjPsENxJnw2DbDcm+FWT9p2XBqc0AP0MWYTU6W2bZarkzHWPDyTbN/OuYANDEHjf pJOuhhMC3Sni5pwJunTVUc3xyLubCvkZccSvPw0BMOWj3T+ey8vBUl9oIkf12SFqyUaf cJhU/lLIF/AgL5s+TWy3b861qLvFVvOZqFcbgdUgP44y53I1juoc/6IiXxsFTsYkLqNc 9vqByWZ64CnCVrqD6Tirdwvnqb6v+6IAKxe45HZo4Yx28KO8yvYl8aWy0o283UHperfn SqSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=3YSbbFplEMGgc8hs9UQZk79UvkhK9cFlSyrmMp8kdAQ=; fh=IpZUYbsqKid0r4pbePo9OTESEiKTs4Y7HhR29dJG614=; b=IeI6l8QW4vhwIvBSy89T1GwurSFIzWOInowdYflG7IzWebKYf2n9iXYkirqXf69MM4 X+H/TK4sHzYosCbABujy7JFN0Jlll6fl7158RNTBAoMuxLmC/g6wml/B4cBEv+20Bjvn HtmJQ/8B0stmsYUsGvscLEqyFbsHrFC65d9h1n4FMOuCul0wzjnrVfOQFfLDz2526C5B Q/dUYOPXPnzavb4BHDYYgpr9ofqTn1FNxQxsu5YqnBZHthepJnFG6eBttQMjU6m2KBsd otm9mSbroEtR1evmp3FluMFz7ppFODww/tuysGjcI0rwfkbIhJOP2VjFF71O3350BkU9 r0Gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=AFp308hA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id f12-20020a170902ce8c00b001c0c79b3869si9077582plg.578.2023.10.14.22.33.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Oct 2023 22:33:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=AFp308hA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 1BD508042B7C; Sat, 14 Oct 2023 22:33:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233541AbjJOFdd (ORCPT <rfc822;hjfbswb@gmail.com> + 19 others); Sun, 15 Oct 2023 01:33:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233521AbjJOFdb (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 15 Oct 2023 01:33:31 -0400 Received: from mail-oo1-xc2c.google.com (mail-oo1-xc2c.google.com [IPv6:2607:f8b0:4864:20::c2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC5FAB7 for <linux-kernel@vger.kernel.org>; Sat, 14 Oct 2023 22:33:07 -0700 (PDT) Received: by mail-oo1-xc2c.google.com with SMTP id 006d021491bc7-57f02eeabcaso2152020eaf.0 for <linux-kernel@vger.kernel.org>; Sat, 14 Oct 2023 22:33:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1697347987; x=1697952787; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=3YSbbFplEMGgc8hs9UQZk79UvkhK9cFlSyrmMp8kdAQ=; b=AFp308hAuHvw86EaRRO18dsF9leLOyhfadkGtooVYloikOH1Mn2pGwgoIPDSN/WMTy od5znADUy/8VOJZqKcrELKOf+txxqgz2TVRDoAsiAXzIjx2OPYbDzphukCfBfoQrRNhV +J9ngTNj1C00i3GLNo/j9GVTm7YqwSk/wCNAVLxR89L7AbNtSwccrRjwQPiK9FjZt7mZ G+mpZyvGCN+9/485i0pU4e2lIFK6TS2WK/inyUqoVXcPBQEj/wLZa0+wk+CmN69EOrXN kuDKm21+sN07O9HBX59p1MlUzf/ysqFb1+r9qV07jvjyZdSDu2ysO+iIph21ypqln+pA WHvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697347987; x=1697952787; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3YSbbFplEMGgc8hs9UQZk79UvkhK9cFlSyrmMp8kdAQ=; b=hBnOdXaqD/cCpeTKACNdbUtp1fM1w4ADF/Tq8XKihA8qntB5YDNQxFXPS3WFPTx+8Z kH9FDxLExheXpQaHZCnc29cM3VomtoglIbr/KRWQrYX1GJHWOPj1/OEUgUzget7ErGH/ 0/Jvx6IBMi6PqiDa3dbL42uSUZ3tiiisiwCmTvD8vALrgNCdQiLkzeNd3+Bxv3HjTt71 LqTEGUTltlD7krAHr1W7cvm8tMsGT8K9JyQFQBwZWdXHw90/yY3tg5gduOZkx6pnGo84 pb7LrG5yqlWOakoJsCMZ6MDIh0V7C7nFV0ttatmMzK7UOSnwpkQU035kUeu2lWuH+lZh JaAQ== X-Gm-Message-State: AOJu0YyBj+SBRn8jhD1K4I7VtpNIx0emToyARuQfj/Ns+/YKyPk/TFrH +DiGUZF9wnQlQ1aH4K0cOJDheA== X-Received: by 2002:a05:6358:33a4:b0:151:ac8d:bfe7 with SMTP id i36-20020a05635833a400b00151ac8dbfe7mr35376152rwd.22.1697347987054; Sat, 14 Oct 2023 22:33:07 -0700 (PDT) Received: from devz1.bytedance.net ([203.208.167.147]) by smtp.gmail.com with ESMTPSA id u22-20020a62ed16000000b00690fe1c928csm16187368pfh.147.2023.10.14.22.33.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Oct 2023 22:33:06 -0700 (PDT) From: "wuqiang.matt" <wuqiang.matt@bytedance.com> To: linux-trace-kernel@vger.kernel.org, mhiramat@kernel.org, davem@davemloft.net, anil.s.keshavamurthy@intel.com, naveen.n.rao@linux.ibm.com, rostedt@goodmis.org, peterz@infradead.org, akpm@linux-foundation.org, sander@svanheule.net, ebiggers@google.com, dan.j.williams@intel.com, jpoimboe@kernel.org Cc: linux-kernel@vger.kernel.org, lkp@intel.com, mattwu@163.com, "wuqiang.matt" <wuqiang.matt@bytedance.com> Subject: [PATCH v10 0/5] lib,kprobes: kretprobe scalability improvement Date: Sun, 15 Oct 2023 13:32:46 +0800 Message-Id: <20231015053251.707442-1-wuqiang.matt@bytedance.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Sat, 14 Oct 2023 22:33:46 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779798408982279822 X-GMAIL-MSGID: 1779798408982279822 |
Series |
lib,kprobes: kretprobe scalability improvement
|
|
Message
wuqiang.matt
Oct. 15, 2023, 5:32 a.m. UTC
This patch series introduces a scalable and lockless ring-array based object pool to improve scalability of kretprobed routines. v10: *) objpool simplified and improved according to Masami's advices wuqiang.matt (5): lib: objpool added: ring-array based lockless MPMC lib: objpool test module added kprobes: kretprobe scalability improvement with objpool kprobes: freelist.h removed MAINTAINERS: objpool added MAINTAINERS | 7 + include/linux/freelist.h | 129 -------- include/linux/kprobes.h | 11 +- include/linux/objpool.h | 176 ++++++++++ include/linux/rethook.h | 16 +- kernel/kprobes.c | 93 +++--- kernel/trace/fprobe.c | 32 +- kernel/trace/rethook.c | 90 +++-- lib/Kconfig.debug | 11 + lib/Makefile | 4 +- lib/objpool.c | 286 ++++++++++++++++ lib/test_objpool.c | 689 +++++++++++++++++++++++++++++++++++++++ 12 files changed, 1270 insertions(+), 274 deletions(-) delete mode 100644 include/linux/freelist.h create mode 100644 include/linux/objpool.h create mode 100644 lib/objpool.c create mode 100644 lib/test_objpool.c