From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33E0AC54EBD for ; Tue, 10 Jan 2023 00:13:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233468AbjAJANG (ORCPT ); Mon, 9 Jan 2023 19:13:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234661AbjAJANA (ORCPT ); Mon, 9 Jan 2023 19:13:00 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BAD71403A; Mon, 9 Jan 2023 16:12:59 -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=XRn1/eBrDRdzxgypnfDfA6rwyYrJeizsdUmAgoml6qw=; b=CDbk4K3lvFgP+7qgriAr+tTZOx nzR6WaGQ0Pffu2IeQcueGVtZjQWEQNbFBsvyuOGvqBgEiIJPYLWpxwWEmWBGlA2KsTKkbRQr30A3R aIh9fWL0zedSZj884ghWH3SfLXlganfLkbQInaTTYdZIbrLDfBiOsLQFxPZLwneb+puu4cjtW99O6 PjC1xmPShJKM1E45z0WpMKAhBO8ZDfuiizE38qq7d7UdVLzI7yfaK2uPG6KBb/r5XGPXSf2QupEGC jRCCIGH9mbxYkKIz+8suhDB/NbG9FTK/lJ0YbzNkGZPt/CNCg2DV0cSBSXKoHqt2+SqyHdsBl/p7W l3wMJiqg==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pF2G5-004ikM-QG; Tue, 10 Jan 2023 00:12:53 +0000 Date: Mon, 9 Jan 2023 16:12:53 -0800 From: Luis Chamberlain To: Petr Mladek Cc: Zhen Lei , linux-kernel@vger.kernel.org, linux-modules@vger.kernel.org, Anders Roxell Subject: Re: [PATCH v2] kallsyms: Fix sleeping function called from invalid context when CONFIG_KALLSYMS_SELFTEST=y Message-ID: References: <20221228014511.328-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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 09, 2023 at 02:40:27PM +0100, Petr Mladek wrote: > Why are try hardly comparable? > > 1. The speed depends on the number of loaded modules > and number of symbols. It highly depends on the configuration > that was used to build the kernel. > > 2. The test runs only once. As a result it is hard to judge > how big is the noise. > > 3. The noise might depend on the size and state of CPU caches. > > > I personally vote for removing this selftest! Even so, just as with testing a filesystem with different types of configurations, at least testing a few configs helps and it's what we do. Then, if anyone ever wanted to try to increase performance on symbol lookup today they have no easy way to measure things. How would they go about comparing things performance without this selftest? This selftests helps generically with that *and* helps peg on to it any sanity checks you may wish to add to those APIs which we just don't want to do upstream. That was the rationale behind it, just as with any other selftest. However, if measuring the time is not possible that's separate topic. But to say that measuring time on some config is not valuable I think is not a fair statement. Yes, the noise things are good points, but the test can be enhanced for that too. And any patch which anyone in the future would try to propose for new enhancements would likely be looking at obvious gains beyond any type of noise. Luis