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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A0BEC433ED for ; Tue, 13 Apr 2021 21:22:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1123461206 for ; Tue, 13 Apr 2021 21:22:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346010AbhDMVW3 (ORCPT ); Tue, 13 Apr 2021 17:22:29 -0400 Received: from mga04.intel.com ([192.55.52.120]:14834 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231955AbhDMVW3 (ORCPT ); Tue, 13 Apr 2021 17:22:29 -0400 IronPort-SDR: fvbfg4xiS/fhTy/fCuxc4jsztc6zrmRpognrhk9AfEk71AcXCFPCKrolPXaRZN5EbVeNN7lyir A12oSrOn1yEQ== X-IronPort-AV: E=McAfee;i="6200,9189,9953"; a="192378778" X-IronPort-AV: E=Sophos;i="5.82,220,1613462400"; d="scan'208";a="192378778" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2021 14:22:06 -0700 IronPort-SDR: 9rzF2Bdx0v7QOidNv5ZqjosswKNcLgHVc7HwI6vb1BBJ5JuIYIasptiFS+n5en9YJK33YUfQ8a Da5yQP51NiTA== X-IronPort-AV: E=Sophos;i="5.82,220,1613462400"; d="scan'208";a="424426038" Received: from tassilo.jf.intel.com ([10.54.74.11]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2021 14:22:04 -0700 Date: Tue, 13 Apr 2021 14:22:03 -0700 From: Andi Kleen To: Alex Kogan Cc: linux@armlinux.org.uk, Peter Zijlstra , Ingo Molnar , will.deacon@arm.com, arnd@arndb.de, longman@redhat.com, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, bp@alien8.de, hpa@zytor.com, x86@kernel.org, guohanjun@huawei.com, jglauber@marvell.com, steven.sistare@oracle.com, daniel.m.jordan@oracle.com, dave.dice@oracle.com Subject: Re: [External] : Re: [PATCH v14 4/6] locking/qspinlock: Introduce starvation avoidance into CNA Message-ID: <20210413212203.GT3762101@tassilo.jf.intel.com> References: <20210401153156.1165900-1-alex.kogan@oracle.com> <20210401153156.1165900-5-alex.kogan@oracle.com> <87mtu2vhzz.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-arch@vger.kernel.org > > ms granularity seems very coarse grained for this. Surely > > at some point of spinning you can afford a ktime_get? But ok. > We are reading time when we are at the head of the (main) queue, but > don’t have the lock yet. Not sure about the latency of ktime_get(), but > anything reasonably fast but not necessarily precise should work. Actually cpu_clock / sched_clock (see my other email). These should be fast without corner cases and also monotonic. > > > Could you turn that into a moduleparm which can be changed at runtime? > > Would be strange to have to reboot just to play with this parameter > Yes, good suggestion, thanks. > > > This would also make the code a lot shorter I guess. > So you don’t think we need the command-line parameter, just the module_param? module_params can be changed at the command line too, so yes. -Andi