Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3099058iog; Mon, 27 Jun 2022 09:06:17 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ua3x8jargbA718DCl/Xliw3SbpxdDFhRBA0H8dMvUXqMjHqzoZCz79Fb3hLr5fcpcmJLdv X-Received: by 2002:a05:6402:42d3:b0:435:2c49:313d with SMTP id i19-20020a05640242d300b004352c49313dmr16859909edc.86.1656345976897; Mon, 27 Jun 2022 09:06:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656345976; cv=none; d=google.com; s=arc-20160816; b=uMC5RIT3Wn0itYIxe9dM4XSvyZ3zMIHnZKIHpwgUJlGCC5u4K3VNUpc3TML6gESCY4 W1Wpp2Mk0JLK4Z94QoGrI5Cz0ASWd4MiGPu4hbjie32JiqZtrYDAQuY2jfLZW1rCl/k3 xHtgkpp9ba8jrEUPjxel9HQQeafiwkHKKRbMfaLG6Zr3WfbhvFiq2OolhLOjpK7qn/p+ qh1g4XBFRu/E167f13Sdk00sbRJ+IE/8+/rDLjL1jdLl7FUCYHFu5HaUNwL1fi3eZCOY Z0kXZrJ596Y0S2pIFrhKmSnvdo7TAoZ8XedhXYwG5RwLbggPb3r8rXpSICzpvg/95hhn 8Iwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Q7ZSEV4LTD7LAEM2Qop9QWeKPyT8Eo98shgP/WcfAJM=; b=H/myccwMxHL8csKSP/zgU5e403unnTJBrEM9gvfohAj4r3+QweaZ0brjyvdfObpcy7 +mLFIWJSfBzwAsWH6NLu7cUe1/Q4qTDfxRx+W4fKYRMXUNOqVgbxUGluLlAWIZuZx63x AuEj0PwhRB+bIqOH9+lhLT9HlMN1lLhWY/axeH4++v2bUPiAaZaNWB1Q/D+6dVPtxSWg zTULl05LesjHOQPv0Jub4taAikIjiliHbq2nQ3/+fkLevW6c+GsvO0C/Zxs4q2+XPa0m 7OTjGlsPtMR9H3ImG3G/QI/MnESIONTWYSQkjML3e/jAH+TJwSUyJojl9csT7CxruHJl 4P6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=TD25yDZj; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c15-20020a05640227cf00b0043783a7f05bsi6739639ede.207.2022.06.27.09.05.40; Mon, 27 Jun 2022 09:06:16 -0700 (PDT) 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=@gmail.com header.s=20210112 header.b=TD25yDZj; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236670AbiF0P5T (ORCPT + 99 others); Mon, 27 Jun 2022 11:57:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235477AbiF0P5R (ORCPT ); Mon, 27 Jun 2022 11:57:17 -0400 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E124D79; Mon, 27 Jun 2022 08:57:17 -0700 (PDT) Received: by mail-pf1-x42f.google.com with SMTP id p14so9417390pfh.6; Mon, 27 Jun 2022 08:57:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Q7ZSEV4LTD7LAEM2Qop9QWeKPyT8Eo98shgP/WcfAJM=; b=TD25yDZjhKN9TW36xDeM7TC/WXolSNS4MNswQEtngcUO1oXtqBPpHKRVemyWExAlFW TqyvvXlQnhbGsHE73jVzf9Y9myNUkq+LmwxSgmvbIrAkTKRE8ajBfNydza4Fe1PWDCGo XN9lsNhRoOlrS3Twls6Nfrj9RBXQIGwY5DmVwoSfnp2Ara+fYn8fsBgPHgdzCdEMq0mO UMFJ0JsZO9r/GyZxyRU76iYGgF/7rl0zwXLixDbWPgyWOQ63wjrZwwnOr3K1Jnv7a9PF QKEiklV9Wc5SFJuofCme726CpZgab0fToWe4ZqGpSUmTSEqY0DkQgIKX3LCCrRr03tgp bLGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Q7ZSEV4LTD7LAEM2Qop9QWeKPyT8Eo98shgP/WcfAJM=; b=aM5eFQd+hGMVAWRlr5jUU/6dHIi/lKYY2f1TbZCQ9FgwVpEnbEzCVASW1CbbN2oHcb tzkvgeywhHPPgWBCdHQr4PxLPmDoS7f5vFZZUQ7w1gIEekeqfe1VaLtlU2B2nU+Om/hf 37oy2FZu2tTV9R/J0fxJHXjY3YjohGveXmFoYJoLkbrf1zMT9wjA79Z7cKiJ+WQnTbCL gltOnsOevi1aOM85ANDSTQTh1ZTy6FWaCAsGju2Eun5G+3zCP0HUKdZvT+1cU4t7lly3 MEMyQyz5FZtDqOVmxWQwVzqZh6bF77EcjGIHU7DPIziNqyzBVhE8Gk44OelcCHdpxZpM k1fA== X-Gm-Message-State: AJIora+NVseYGC0rXIHiYew8l/iGA56gXJaJC3X4JT2GKelcnTsBG+vv a3uYz7ZW1E/OTyd7gt8g69Wle+sxRXxqDg== X-Received: by 2002:a05:6a00:1a0c:b0:523:1a23:957f with SMTP id g12-20020a056a001a0c00b005231a23957fmr15619816pfv.45.1656345436401; Mon, 27 Jun 2022 08:57:16 -0700 (PDT) Received: from octofox.hsd1.ca.comcast.net ([2601:641:401:1d20:26dc:1818:7133:85db]) by smtp.gmail.com with ESMTPSA id h4-20020a056a001a4400b005252e524d1csm7499932pfv.211.2022.06.27.08.57.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jun 2022 08:57:15 -0700 (PDT) From: Max Filippov To: linux-kernel@vger.kernel.org Cc: linux-next@vger.kernel.org, ntb@lists.linux.dev, Alexander Fomichev , Dave Jiang , Jon Mason , Max Filippov Subject: [PATCH] drivers/ntb/test: avoid 64-bit modulus operation Date: Mon, 27 Jun 2022 08:57:10 -0700 Message-Id: <20220627155710.2067032-1-jcmvbkbc@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, FROM_LOCAL_NOVOWEL,HK_RANDOM_ENVFROM,HK_RANDOM_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 Redefine RESCHEDULE_RATIO to a closest power of 2 so that the following code in the perf_run_latency /* Avoid processor soft lock-ups */ if (!(pthr->tries % RESCHEDULE_RATIO)) schedule(); doesn't do 64-bit modulus operation. This fixes the following build failures on 32-bit architectures visible in linux-next: ERROR: modpost: "__umoddi3" [drivers/ntb/test/ntb_perf.ko] undefined! Fixes: dc150dfb081f ("ntb_perf: extend with burst latency measurement") Signed-off-by: Max Filippov --- drivers/ntb/test/ntb_perf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c index 23e154bd41b9..536fab0030f3 100644 --- a/drivers/ntb/test/ntb_perf.c +++ b/drivers/ntb/test/ntb_perf.c @@ -126,7 +126,7 @@ MODULE_DESCRIPTION("PCIe NTB Performance Measurement Tool"); #define PERF_BUF_LEN 1024 #define LAT_MIN_TRIES 20 -#define RESCHEDULE_RATIO 10000 +#define RESCHEDULE_RATIO 8192 /* power of 2, to avoid actual division */ static unsigned long max_mw_size; module_param(max_mw_size, ulong, 0644); -- 2.30.2