Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4043175rwb; Sat, 12 Nov 2022 20:04:53 -0800 (PST) X-Google-Smtp-Source: AA0mqf7EKisVfyzdA6OTU+k2K5DxWGUIQhX5D9heVXzHNiuPiB3/wNm7lr2wQXzsqMR4DqzQM/nZ X-Received: by 2002:a17:906:344f:b0:79f:e0b3:3b99 with SMTP id d15-20020a170906344f00b0079fe0b33b99mr6619161ejb.381.1668312293381; Sat, 12 Nov 2022 20:04:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668312293; cv=none; d=google.com; s=arc-20160816; b=m03DInkZSBQ2W2gEWRkxOE+psWJ2bgTxkhRISwutNciaigGwEoqQELJz3zVfqyslT+ Hvu+q83jWdptf7fwNfiFWnmvWLnPW5D0nY9p5gZkidx+sZDBLRyQTsqXTa5Jlv9uifL0 xDUB6x1eF8ClX3dp4Nzk6RuMbrT7EUHK9aGk/0K2p9d90xV/nlYT7Uj21Bnbmpbij6Rf DRElZqabbQ6AaXxUCWhJCIh67kkbnQ6osxt67my++w3j42kfycT4zpXQik7crq0dVo6N beklvVWMdCtp/SAx6MQFg7KOrQ1PE3O+eMvXfgjpzlTQfxPUGg5Cn/XBhtSXwb0BXf6P 30ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=n2FZjuDTRyueWGV+1bDqjA8Dt8qN5j59vtPu2rlxA0A=; b=PVtOytF7x4G73dP9T8FM0KUxWnnIFmc+/WkRNNgKbbuW5LvUc01c99pp8vhKfGpFuW 2aXqHC8EdInHhOISMPjN2JtnR86X8tZg6/3dYPMtz3V/L/1CRLxYbvvQj33Z3RE3Y1pO ouvDqaXugq5iR56/julNqHzg0EvvS0/2SAwsMV+Xjjqz3Jhfv+YSm+EDWnnDEpxJi8d0 66eGeSDtKEISjrEKGQGvH+Z0+sW7UZ7l2hfXQci4bLRVN/BwVLBRhvBCFq9fYmHjNo0t OFLovrneojYF++jlV2dhxqhi3M9gqlYOszQbZYEjYMzVkrFU5rbBeMbT+NHfGLjO1Krm wy/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=aD8cv3ey; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y12-20020a50eb0c000000b004593c35a8bcsi4785060edp.214.2022.11.12.20.04.31; Sat, 12 Nov 2022 20:04:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=aD8cv3ey; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235085AbiKMC4H (ORCPT + 90 others); Sat, 12 Nov 2022 21:56:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231252AbiKMC4F (ORCPT ); Sat, 12 Nov 2022 21:56:05 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3C86FCFC; Sat, 12 Nov 2022 18:56:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=n2FZjuDTRyueWGV+1bDqjA8Dt8qN5j59vtPu2rlxA0A=; b=aD8cv3eyuaxKjPSu6aVE0sCIEp LfbxiDuC8D/2iE4D9VkNqB1wvUgA/lOq7IdBMKjnZThcaiIS9rqiT0c2Xpgc8/Kv5t1Eeg/nWa/W7 eGn+zTAgL1Cpc2QlNs1WFGOimndSJoa2/iJVgTPFISQiZpXJidoyvug5n38dhdg1WDoa9ZzFfRIzY stvJ8OlBUcIA4hdM4or8cvmNWABH8etiGJvwRNlz35A3kgfHj6t0nhy+6kM4lBAwotL5mVYbIhZ1r V5tjFEnNtgoISywh5VYYrx1hiC1xestNrFXlYjQeQygGtGDZF/SUzSWzkx/zA7/mUp4fVSC8lEnBE Di7nD0MA==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1ou39v-009CCV-FY; Sun, 13 Nov 2022 02:55:47 +0000 Date: Sat, 12 Nov 2022 18:55:47 -0800 From: Luis Chamberlain To: Zhen Lei , Nick Alcock , rostedt@goodmis.org Cc: Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, Masahiro Yamada , Alexei Starovoitov , Jiri Olsa , Kees Cook , Andrew Morton , linux-modules@vger.kernel.org, Steven Rostedt , Ingo Molnar , David Laight Subject: Re: [PATCH v8 0/9] kallsyms: Optimizes the performance of lookup symbols Message-ID: References: <20221102084921.1615-1-thunder.leizhen@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Luis Chamberlain X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Nov 12, 2022 at 06:44:26PM -0800, Luis Chamberlain wrote: > On Wed, Nov 02, 2022 at 04:49:12PM +0800, Zhen Lei wrote: > > v7 --> v8: > > Sort the symbols by name and implement kallsyms_lookup_name() using a binary > > search. The performance is more than 20 times higher than that of v7. Of course, > > the memory overhead is also extended to (3 * kallsyms_num_syms) bytes. Discard > > all implementations of compression and then comparison in v7. > > > > In addition, all sparse warnings about kallsyms_selftest.c are cleared. > > Awesome work, I can't find a single thing I hate about this, but my > biggest conern is the lack of testing so I'm going to merge this to Sorry finished the email too fast, I just wanted to add Nick to the thread as his work does tons of changes on scripts/kallsyms.c. I was saying -- I'm just concern with the lack of testing so I have merged this to modules-next and see what explodes over the next few weeks. I'm also happy to drop this from modules-next and have it go through the livepatching tree instead, but given Nick's work is dedicated towards modules and it also touches on scripts/kallsyms.c a lot, to avoid conflicts it felt best to merge that to modules for now in case his changes get merged during the next merge window. Let me know what folks prefer. Obviously, if testing blows up we can drop the series. Zhen, wouldn't ftrace benefit from the same s/kallsyms_on_each_symbol/kallsyms_on_each_match_symbol ? Luis