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 4D04AC54EBE for ; Tue, 10 Jan 2023 09:57:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238075AbjAJJ52 (ORCPT ); Tue, 10 Jan 2023 04:57:28 -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: 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