Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1073199rdb; Mon, 19 Feb 2024 03:32:13 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWjPGo3J9LMuz3TuzsEtr/7kgU/OIWIcCtol3kVTQaLCgGnuPutvZ8vx3tBvOICbVjxB+OHJwCFMgZGofjp5iHJYzXrIt/QIB5CwSI7cw== X-Google-Smtp-Source: AGHT+IHy2U16X5g2hc4iQ9JQaEd7icT620huArivPpFee0uAGGtzsLwGPxmFi03zpU/c4IvIWZGZ X-Received: by 2002:a92:2901:0:b0:364:1c05:b24b with SMTP id l1-20020a922901000000b003641c05b24bmr12555897ilg.13.1708342333599; Mon, 19 Feb 2024 03:32:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708342333; cv=pass; d=google.com; s=arc-20160816; b=nCxv/oNSUvPMQjhd4Jq3a4lFRY3jMjx+W1N2V7tBuoJWp3aJ5A3JmI/UmOWQBSBj1q jEkKyTHV/BFRTRkqGBZj38SLhb9oZlT9e/BM3c1Sk3e0wccCM0W+esCsnXzS9mtVZCNX dGG3adxLDaaunll9fDqpjBLYq8ZPKzAsZ22bBgjrXvtvcG8Wwwerk44rme31r1HaIPpl seEAwUpd6QMlNIpmSuFQleEwAgwxFKQ43Qlv/X6xsQrm3HKt4axPdrufSPrd7YjksMW3 /JCRFWC/WqHG5wFGiH9lW/4YR33qKYHQzHma8KJE7DFxRGb+/JmzAc5NQLy25GRiy6BU utlQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=D9GKMP7xsT1loNPYfLVLghc8f51mY65KwFSji6d7V9c=; fh=Ko0S+GfyoxNiUgxcgkYqXIDgNFV53XpXFaJuKfjDJNQ=; b=nlWSrF519gJaD2kfUHeS8gF0Pm0ZY+Aora41jt1n0XTNY2VAbks7QCzYrUkz4uOjSG nct6HVIaQ0e8pLJthJUfNvw4ENBW0a2QYMpeEM8m1ZaCo05LJzp0Gmn0JRLlpPBq3Bcl vQZ57KrVeXNHNCQ2qhUgrA4Wy8/L9GLloW2mcqyrxkxgfe0EUNBtVfnhk73/gIoxztWY T/zcy2g+Q0SKY8IEUltG5zdtpySTdl9cW0HVeVZz5YS9wTO6KSvAhvaHTUMb4eG68kMp LFN8794j/FQ8FPeKKrBeWASn5r+XIK5eI4KskqIwYxNH3z7bqSkorfXLer58kCgII3gS hG6Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=r3mVrcyt; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=ZDtAxRPl; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-71208-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71208-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id dq12-20020a056a020f8c00b005dc82dd7342si4239082pgb.740.2024.02.19.03.32.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 03:32:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71208-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=r3mVrcyt; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=ZDtAxRPl; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-71208-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71208-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 03BD72814F7 for ; Mon, 19 Feb 2024 11:32:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3A2002C1AF; Mon, 19 Feb 2024 11:32:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="r3mVrcyt"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ZDtAxRPl" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 20A6A846D for ; Mon, 19 Feb 2024 11:32:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708342328; cv=none; b=rCwR+osHJK82/WpikcJAlB13VhsLZdBdwE9Yi+E2OV7SZSj6wUzd0pxqP+Rhfe0KCdy14yi+5SKBGMe5pj4x3zfoBLFCntZfHudMnqo1UjSfks7H7yBVa5P6+5k6Q+cvWopF7AC4q9GR/VW2A2l8bD2FUWJ8ODBKUN1adYqVF1w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708342328; c=relaxed/simple; bh=VB+iI+fug3eSv+fm6efC/2HzoubUcnoN5nHFZ5Ilajs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=DRKFeb2E2OoJzaDt3V7Zq3EeaoBpg0qAy7nzmBjGdICN9MBzKcuYDdjqQQopWDkHJto56SlnsywPrl6iwaOF4IQJUwbTZmwlXbSxpUvu/qe18ahyPwrOHC4bbPXv1QVLfQQwYtQWmM/akeXjxDbNwi5QraB5duR1iVKInkXvRAU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=r3mVrcyt; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ZDtAxRPl; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708342325; h=from:from:reply-to:subject:subject: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=D9GKMP7xsT1loNPYfLVLghc8f51mY65KwFSji6d7V9c=; b=r3mVrcytCIs8QLqrdWr39/DIFhcznwBqlN3h4H9o8F/dC0wT/URiiTyk00llHe23DJ3r/e PVy50mxs2O2Ix72eXn6rlAr9QD+VNvFcZ+0el1nAKiu/YiXky4GvarLmK+Ut0HZlqpNQuu 6fQGEL4ykjTQqLFQRnO+nydQIOTXUkGSSJpa1LWWmZHG2Es7DUc2Tf7KszIpSoyxixR28R gnY7uJj+iCWklWIeBuHki9gdU31WCsvKICfBeMCnj65+4PLJ+TDODJZ9o2XSlaiXccDEbC EpjVdw2tG56Fp6tKxS3jrAvnV1HdCc8n/I7V8w3RpGNPP+uViVLEUseg1UWBcg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708342325; h=from:from:reply-to:subject:subject: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=D9GKMP7xsT1loNPYfLVLghc8f51mY65KwFSji6d7V9c=; b=ZDtAxRPl7wR51qRS5OnoEFuZY7Ks2O8U9b2bi+nLIyvPjZmAyNVCX8/T/gdGNmeA92rezm LOdHX7yg3SmDzsAA== To: Feng Tang , John Stultz , Stephen Boyd , paulmck@kernel.org, Waiman Long , Peter Zijlstra , linux-kernel@vger.kernel.org Cc: Feng Tang , Jin Wang Subject: Re: [PATCH v3] clocksource: Scale the max retry number of watchdog read according to CPU numbers In-Reply-To: <20240129134505.961208-1-feng.tang@intel.com> References: <20240129134505.961208-1-feng.tang@intel.com> Date: Mon, 19 Feb 2024 12:32:05 +0100 Message-ID: <87msrwadvu.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Mon, Jan 29 2024 at 21:45, Feng Tang wrote: > +static inline long clocksource_max_watchdog_read_retries(void) > +{ > + long max_retries = max_cswd_read_retries; > + > + if (max_cswd_read_retries <= 0) { > + /* santity check for user input value */ > + if (max_cswd_read_retries != -1) > + pr_warn_once("max_cswd_read_retries was set with an invalid number: %ld\n", > + max_cswd_read_retries); > + > + max_retries = ilog2(num_online_cpus()) + 1; I'm getting tired of these knobs and the horrors behind them. Why not simply doing the obvious: retries = ilog2(num_online_cpus()) + 1; and remove the knob alltogether? Thanks, tglx