Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7549139rwl; Tue, 10 Jan 2023 02:12:36 -0800 (PST) X-Google-Smtp-Source: AMrXdXvUkpLAp2Bj3ivfzR2y/EPFnBvtngDCgoqU+ZzvprW57ZZzsxyfYGLYhFgQhp6KlqacDL7W X-Received: by 2002:a62:5f03:0:b0:58a:fdc8:92bf with SMTP id t3-20020a625f03000000b0058afdc892bfmr444874pfb.2.1673345556499; Tue, 10 Jan 2023 02:12:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673345556; cv=none; d=google.com; s=arc-20160816; b=aemrJWHifn5XdAfx5WFrl5mUuD7VhyU1nM8oyayrqomqrfUiufxJ3BVlo9porEZNIu jTDUxzvJd9JAJ0Gq/r60efkYlW9Ew9VMiiMPLmXmkY+UA9WzeLOaIo6rUGBMIITOcFxg 2ED+9gJrnt+WX/E3QUVrTC03vg9iPYAfsl1XMEvhP168LbylXSQLqlqq8YqzgFSxspzN CxQKaHQycvR+vyi+0t/3fk42/lf4KJCexdM7GjmqMfD1lVQan+pjxvloh2Z5QLmkQ+GF ZFhnqQzF2Hl/+wQYcokNXYe0CtcyPNzQRHj2eP4jmZ+tcH5MAxNoKKfdTEAGTjpVttMK HBpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=FYiFsvOd9DaUW/Bik6oFtS/5QMzJseiokzUiGsM94OQ=; b=jShTkNDXAYBvz4Nio/CUjNck+atp10UjO6ld65zsRmwXpi/DFKytzMPZmGHs1vCwFu l4iVEEG3QgQJN25W7pFJi/BAiXfGzCIe0HX7nACLmN83zTuwXGGGi7L3Fl3MunqoH9Ga W07IEUjaqUiOJpTEXV8DhiIxS9t2xCSV6x362JfZblqlEyVDvxtpB5UavoEFlnSwfzX+ nfJ56n7FqVGymeWZfkQ8CCtXCOytmCLB/yM5eshahvVhHU+TZDZviwWuZQ53K3daxPXg MLd82QhrcumSzGQmRb9FomLYGlq703nJMAtbw5Vq2LgubEsJrFy0rTs1qgpHctbJhRDk Tzyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=ssRLogHV; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eb9-20020a056a004c8900b005890a3045casi3620020pfb.107.2023.01.10.02.12.29; Tue, 10 Jan 2023 02:12:36 -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=@suse.com header.s=susede1 header.b=ssRLogHV; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238256AbjAJJ51 (ORCPT + 53 others); Tue, 10 Jan 2023 04:57:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230199AbjAJJ5Y (ORCPT ); Tue, 10 Jan 2023 04:57:24 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 411123FA37; Tue, 10 Jan 2023 01:57:23 -0800 (PST) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id CE2FE68047; Tue, 10 Jan 2023 09:57:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1673344641; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FYiFsvOd9DaUW/Bik6oFtS/5QMzJseiokzUiGsM94OQ=; b=ssRLogHVhAdCHzN1aK3/yjpHN9pfoDRPdRDqYcBNW/cHkuHGUq4RsOlmWfKt+II6mvw7xF nbfKBo8oRGcsFh49/QqcHt0anzLmId9TVl0Fe4ATCU3O6w3uWWztOId6asaZaWExq/ZkWL 7oPT5zBkzdfYKggaOM8AXpv3JbcXGq4= Received: from suse.cz (unknown [10.100.201.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id B2E0B2C141; Tue, 10 Jan 2023 09:57:21 +0000 (UTC) Date: Tue, 10 Jan 2023 10:57:21 +0100 From: Petr Mladek To: Luis Chamberlain 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: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 Mon 2023-01-09 16:12:53, Luis Chamberlain wrote: > 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? How many people cares about kallsyms performance, please? Is it worth spending time one implementing and maintaining such a selftest? Yes, Zhen wanted to make it faster. But how likely will anyone else try to make it even better? Do we need to spend time on this in the meantime? > 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. From my POV, it would be much more important to check if the API works as expected. I mean that it gives the right results. I am not sure that performance is that important to spend more time on this one. Also I am not sure if selftests are the right location for performance tests. My understanding is that it is a framework for functional testing. It is showing if the tests passed or not. But performance tests do not give "pass or not" results. Best Regards, Petr