Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7021120rwl; Mon, 9 Jan 2023 16:46:10 -0800 (PST) X-Google-Smtp-Source: AMrXdXsza8o0CcdISsz6SdeI33S7/pgPmvpdpsTW+8muNtAedrO/jvVpd0oSbbajV+5cc6AtUDki X-Received: by 2002:a05:6a20:699d:b0:b5:e1f5:c72f with SMTP id t29-20020a056a20699d00b000b5e1f5c72fmr5880060pzk.28.1673311570334; Mon, 09 Jan 2023 16:46:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673311570; cv=none; d=google.com; s=arc-20160816; b=wRmytMv0u4jAViN1s8xh49anXU4EeqnGvi28QVrBHSmgH6ShUfeJVAT8J3vQJANKx5 6EwW/ItYPec32qD7WY5X/gQDWrEhuZPaaVvQPydg3YHdToJDknQxHYHSzWoxxqGRdGjF ZZsyR37VruMBoB4jfEttTt7nAk/HuX+e1YK/W8RfNHKAIHsU2PQ7FGHVdd7dDz8arEHC y6jReqherc995ON7fMmO5BS6hqGfmy7WiE0w3bZ8iSfHeE+CLyhXYuzZkBA9RhqUPxyk Cutru7Ict603dSxR/Po77iyc+ISKtBE9z4tZvsxZETSNizX4ha4LVPbQKetFhn+zzf/P D4mA== 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=XRn1/eBrDRdzxgypnfDfA6rwyYrJeizsdUmAgoml6qw=; b=ZT48G982YAgkk7azBuDmTrm0CqmhMqF+9qSXMh/M8Y6mptslS+heAr0PQWi+pwYUTB gZqANMQAYCqJH325torOBvzk5ayJGjcBK/MK9SH8k785VAMWX5L4V0PgdZTYKFaOKyW6 FUrHgi+fzXFYydhJz3dBW+dWLtSlrDxv1cZ25vjCtrztTPmAYoiIKiXf+ne2EAkQwSlz 2BeOElc7876pT0rfv4UdhUyj3kxKhF+rH8DI/AaxcEkI9hDnNfvfJbVavSsOfs+aexFe hqxilKD9TknJrzj++rPwnYo6NfZ1DmPVa153LQP/1JfTFUu8n4pAT1Na+YQq0tmJXBpp ehdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=CDbk4K3l; 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 j70-20020a638049000000b004b55673ea6fsi831852pgd.103.2023.01.09.16.46.03; Mon, 09 Jan 2023 16:46:10 -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=CDbk4K3l; 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 S235098AbjAJANG (ORCPT + 53 others); 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 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 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