Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp559471rwb; Fri, 13 Jan 2023 01:01:48 -0800 (PST) X-Google-Smtp-Source: AMrXdXsesywBwdDJYen2M6V7n+AI5onSIROXFrMEYWOMHUaSOawJmYXMqrQVkl0rjPp5ClLWc9ee X-Received: by 2002:a17:907:8a20:b0:7c0:cfb2:40d2 with SMTP id sc32-20020a1709078a2000b007c0cfb240d2mr87231234ejc.64.1673600508653; Fri, 13 Jan 2023 01:01:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673600508; cv=none; d=google.com; s=arc-20160816; b=W9xHOiOitV6NQQuv2es6TULbODu2aLvhMP6ea8zLnLoX7LCYXbiLXhhUB8yLqAto2V dFqxE+GMdstgbvgQ/FQ2XE1x85SQXfrk1+T9i00sLu3WihT1AMnSyVVnfeH+RXfi23bI OGDqoQCd17VMXdROILeOi1ltqcrwM8no9+qZICW0IXizwr6KUrjX1IY8xMsaLB8ndNGf 1jxARKvXOF8Ho063qSUR26D2bRhHZHfg0A1cKb9uRmmnW3L2gPrAF86lrmiKMqT6WewH CuBHc+3z3Mr5/xokxZTi/bZ6pHKEOCYtMwkYLGyuJXcWDiCBgQEOXxFV0VTQrBrG2aIb dd6Q== 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=t+Dhoicyzz2oSGw52Ch3AcQ9AMccyEhYs3mWOWg6nDQ=; b=czi0V5OlFcrX9bpjvUGxIhNdbLSWpOTRuXFlu/Hx2YMFrcDYfX8xdWDtRQvc5HHcqr jXHGznuiv6HlPhTAmVzt5Kz/HhvuDT/GT4/vQt7oH3LrgD9PNMpbWxMmFCFheDtBEpzG QLqOwa3yXODv3SsvOx17VLyL9W7zaCh/u1sfCctiQMl8puJnOmYbTsU0LJnWG2WlcqrV zoyWURritb/R9iw6hIdWq1J/+allN+Xpct8GaaXHA34TGzEoj1uzGlWVfEu9fZt+60X6 ZgiLCHnf4HReYxWR61mWsZugYsr2gIgGacz0EeWX/E+rwsgzbkhILkjD1FPvdlMGoDI+ /nTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=kbN54ZF8; 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 wg3-20020a17090705c300b00773db351c39si20999725ejb.64.2023.01.13.01.01.32; Fri, 13 Jan 2023 01:01:48 -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=kbN54ZF8; 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 S240323AbjAMIo4 (ORCPT + 50 others); Fri, 13 Jan 2023 03:44:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239679AbjAMIok (ORCPT ); Fri, 13 Jan 2023 03:44:40 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5486B7D1 for ; Fri, 13 Jan 2023 00:44:37 -0800 (PST) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 55A695FEF1; Fri, 13 Jan 2023 08:44:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1673599476; 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=t+Dhoicyzz2oSGw52Ch3AcQ9AMccyEhYs3mWOWg6nDQ=; b=kbN54ZF8hfI37eBqJvuqMwtgiFgB6MgRjswFus9R2GLCGrN7a/vICdUHtJjgDzGorIFsrQ leuiZDg/hguwIPALzLC+aYn19fNRBrxgE1HAf8fubfQ4HeItUae9gsTxoxK1UoyWuUe40X 8BDKFZqjyc97z4LSmiGUuyzYRO2Kpag= 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 25A122C141; Fri, 13 Jan 2023 08:44:36 +0000 (UTC) Date: Fri, 13 Jan 2023 09:44:35 +0100 From: Petr Mladek To: Luis Chamberlain Cc: Nicholas Piggin , Zhen Lei , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, "Erhard F ." , kernel test robot Subject: Re: [PATCH] kallsyms: Fix scheduling with interrupts disabled in self-test Message-ID: References: <20230112105426.1037325-1-npiggin@gmail.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 Thu 2023-01-12 10:24:43, Luis Chamberlain wrote: > On Thu, Jan 12, 2023 at 08:54:26PM +1000, Nicholas Piggin wrote: > > kallsyms_on_each* may schedule so must not be called with interrupts > > disabled. The iteration function could disable interrupts, but this > > also changes lookup_symbol() to match the change to the other timing > > code. > > > > Reported-by: Erhard F. > > Link: https://lore.kernel.org/all/bug-216902-206035@https.bugzilla.kernel.org%2F/ > > Reported-by: kernel test robot > > Link: https://lore.kernel.org/oe-lkp/202212251728.8d0872ff-oliver.sang@intel.com > > Fixes: 30f3bb09778d ("kallsyms: Add self-test facility") > > Signed-off-by: Nicholas Piggin > > --- > > Thanks Nicholas! > > Petr had just suggested removing this aspect of the selftests, the performance > test as its specific to the config, it doesn't run many times to get an > average and odd things on a system can create different metrics. Zhen Lei > had given up on fixing it and has a patch to instead remove this part of > the selftest. > > I still find value in keeping it, but Petr, would like your opinion on > this fix, if we were to keep it. I am fine with this fix. It increases a risk of possible inaccuracy of the measured time. It would count also time spent on unrelated interrupts and eventual rescheduling. Anyway, it is safe at least. I was against the previous attempts to fix this problem because they might have caused problems for the rest of the system. Best Regards, Petr