Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4945017rwb; Sun, 13 Nov 2022 17:49:46 -0800 (PST) X-Google-Smtp-Source: AA0mqf4AZuStmkWewn+q1POF1nappsoiu78XrnVCNZvFvfltDggD+85TwM3HZjBnZmiHXHifcIFt X-Received: by 2002:a50:9f8b:0:b0:458:fa8f:f82c with SMTP id c11-20020a509f8b000000b00458fa8ff82cmr9411814edf.246.1668390585799; Sun, 13 Nov 2022 17:49:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668390585; cv=none; d=google.com; s=arc-20160816; b=mH/DyX8Y9AG4Fi60DPkXwdedIuyhXRQ4FF/nzNiiWUnWGW4gFOqd9npxQExKJxqaFQ HkqS87feQD3NWY5uVh/L1X1KAgkpjbgceohNkFAF9ElMm5hXIucyDsjnQiD2jApCXb5I 2FYjqnjdqSSx/utqZj15XCw0xufJxISyWZcZG+u1jArF8XtBjcJewcU0D+uEFAoM+AQm 84WxEAr9USLOmv+RGUsTSg731WJQ6Q/HEXHKMR+joP30G0DJMtdriPuaiCcJUOxcG6wk c0h34RKWBGfWmLMaPDLKnNJcalemrQcLa/jVTACCSYzOBt9moWHSQf2Iv3XrDjMP70O+ wj+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=884xtbXZ27ODVRLW20Ulpkjm2cL/TQ/JVKyq1PapAU4=; b=ytiaMU8oHcC/EwxfyI91bgSvK+7h4w27ujZIKbCq5Br568ZzPMMCMifZ8e4Kl3F3MM eNqXP+qRwWYyNpgdHYp7VwoNVesVpbNsIQ99JWm9SHCSXA7yDVcECSz05yeXEZVm6ZF8 Ms7TPgSne7g79CPjgEBguvKjqvzcBRQzsBj9g4y1740h4Rot9QO0WXxV/3iHFsjfar3z hxPbaSwW6eN6W4OBYVFiqAwyqp1X9x30hEE3ugS0frPD+8FmfFYEdIlJz7kq6RQ+qYn+ woNsNseP+/4437o7/YFiP6RR5nb9Wu8B3LBm8neFGmkFNcURO+C/WHF8EDM8xmgiGs+T NFig== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b6-20020a056402350600b0045c0de4b0e9si8528347edd.170.2022.11.13.17.49.24; Sun, 13 Nov 2022 17:49:45 -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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235606AbiKNBZt (ORCPT + 89 others); Sun, 13 Nov 2022 20:25:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230525AbiKNBZr (ORCPT ); Sun, 13 Nov 2022 20:25:47 -0500 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B96B610067; Sun, 13 Nov 2022 17:25:46 -0800 (PST) Received: from dggpemm500020.china.huawei.com (unknown [172.30.72.53]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4N9WpG41Jkz15Mbf; Mon, 14 Nov 2022 09:25:26 +0800 (CST) Received: from dggpemm500006.china.huawei.com (7.185.36.236) by dggpemm500020.china.huawei.com (7.185.36.49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 14 Nov 2022 09:25:44 +0800 Received: from [10.174.178.55] (10.174.178.55) by dggpemm500006.china.huawei.com (7.185.36.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 14 Nov 2022 09:25:44 +0800 Subject: Re: [PATCH v8 0/9] kallsyms: Optimizes the performance of lookup symbols To: Luis Chamberlain , Nick Alcock , CC: Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , , , Masahiro Yamada , Alexei Starovoitov , Jiri Olsa , Kees Cook , Andrew Morton , , Ingo Molnar , David Laight References: <20221102084921.1615-1-thunder.leizhen@huawei.com> From: "Leizhen (ThunderTown)" Message-ID: <61daf7e0-049c-0338-03a6-472694def181@huawei.com> Date: Mon, 14 Nov 2022 09:25:43 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.178.55] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm500006.china.huawei.com (7.185.36.236) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS 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 2022/11/13 10:55, Luis Chamberlain wrote: > 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 ? ftrace uses regular matching, so it cannot be replaced. > > Luis > . > -- Regards, Zhen Lei