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=-5.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 40162C43460 for ; Wed, 14 Apr 2021 02:32:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1E47D6120E for ; Wed, 14 Apr 2021 02:32:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239682AbhDNCce (ORCPT ); Tue, 13 Apr 2021 22:32:34 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:43126 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231423AbhDNCcd (ORCPT ); Tue, 13 Apr 2021 22:32:33 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 13E2QMj9063285; Wed, 14 Apr 2021 02:30:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=content-type : mime-version : subject : from : in-reply-to : date : cc : content-transfer-encoding : message-id : references : to; s=corp-2020-01-29; bh=w6C5CtiBnXdjgKEXIjAFsIoL+gLxujYJkEUCd/DEkqE=; b=AnHgQGespbOtXpgfo4hpU1xuzKDoFd+9fu6cGkCEAcERDAYam8dJTA5Jaw+fmOVDGgqI 72neJ3vY0c1ICt2Z70wptFghoiKi7GNpMLS6jZewClNINB/Lcs5xXw/DN8UQredSSK/K +e+pZvuFdlaugfhIQmEi5J+b0YGUb8FE81eKN+LHzKE3EO3bs4Bkxxhkhx6bO58UTOpv KYCi2aNvLYWYjVOgmfG0SikXgg8IiJVp4aNEAnlC3J13c+1x3Owq+2F4wQ+YgcwMiA3F wehjiErqikczxC3t66xaK+Ri34EoucTZrlygfFCFIaJgeXn2hKoZHsfdShTHu4mwToJ6 bA== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2130.oracle.com with ESMTP id 37u1hbh0m2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 14 Apr 2021 02:30:47 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 13E2PVFF055389; Wed, 14 Apr 2021 02:30:45 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 37unst8pth-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 14 Apr 2021 02:30:45 +0000 Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 13E2Uh9g028709; Wed, 14 Apr 2021 02:30:43 GMT Received: from [10.39.235.234] (/10.39.235.234) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 14 Apr 2021 02:30:43 +0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: [External] : Re: [PATCH v14 4/6] locking/qspinlock: Introduce starvation avoidance into CNA From: Alex Kogan In-Reply-To: <20210413212203.GT3762101@tassilo.jf.intel.com> Date: Tue, 13 Apr 2021 22:30:41 -0400 Cc: linux@armlinux.org.uk, Peter Zijlstra , Ingo Molnar , Will Deacon , 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 Content-Transfer-Encoding: quoted-printable Message-Id: <7902C919-9624-48C9-89C3-D390A9FF78AB@oracle.com> References: <20210401153156.1165900-1-alex.kogan@oracle.com> <20210401153156.1165900-5-alex.kogan@oracle.com> <87mtu2vhzz.fsf@linux.intel.com> <20210413212203.GT3762101@tassilo.jf.intel.com> To: Andi Kleen X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Proofpoint-IMR: 1 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9953 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 adultscore=0 malwarescore=0 suspectscore=0 bulkscore=0 mlxscore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104060000 definitions=main-2104140016 X-Proofpoint-GUID: 0wVLpAsklsLLbRASaJbeaA4Y4iHpN-OR X-Proofpoint-ORIG-GUID: 0wVLpAsklsLLbRASaJbeaA4Y4iHpN-OR X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9953 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 priorityscore=1501 clxscore=1015 adultscore=0 mlxlogscore=999 impostorscore=0 malwarescore=0 lowpriorityscore=0 spamscore=0 phishscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104060000 definitions=main-2104140016 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Apr 13, 2021, at 5:22 PM, Andi Kleen wrote: >=20 >>> 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=E2=80=99t have the lock yet. Not sure about the latency of = ktime_get(), but >> anything reasonably fast but not necessarily precise should work. >=20 > Actually cpu_clock / sched_clock (see my other email). These should > be fast without corner cases and also monotonic. I see, thanks. >=20 >>=20 >>> 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. >>=20 >>> This would also make the code a lot shorter I guess. >> So you don=E2=80=99t think we need the command-line parameter, just = the module_param? >=20 > module_params can be changed at the command line too, so yes. Got it, thanks again. =E2=80=94 Alex 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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE 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 AC22BC433B4 for ; Wed, 14 Apr 2021 02:34:08 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2E68660FF0 for ; Wed, 14 Apr 2021 02:34:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2E68660FF0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:References:Message-Id:Cc:Date:In-Reply-To:From: Subject:Mime-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=uS7bH8lwpM56i0YhylIaoMM7qBT/kklaJOfJCMTQF4M=; b=aLe1x6x3+75BtbF5uz4VDzQhF yIe20uIelihHe0KzAHPzlxdc/0i+l48TtHspptCBjLkOBEmLE4vsjWS/F2FbjhDByrwqvLU2k+nhI Py6qy265n9HJL4JH2Jy8BtfESjShuv7aiT1vg7/l4Z/STGtIGxhc8mIrB96lQAH2pxarw8KqBohVN Ed0JeSf2eyM2jEmhYsoq5iUkWAxppsQz/QtP17X9OyIf2RLna267nSdAvx94DaeI/vsgMCyRFVnxv RlprHUFOWLbKAEEE2AXm7/sptVCbXYglSxBCV3HDQ5fZz6XvRBu4uAmjTsvRAoMkGiCkYI0uFmapL acSoy5lWg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lWVKA-00BBdm-U9; Wed, 14 Apr 2021 02:32:15 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lWVK6-00BBdM-BU for linux-arm-kernel@desiato.infradead.org; Wed, 14 Apr 2021 02:32:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=To:References:Message-Id: Content-Transfer-Encoding:Cc:Date:In-Reply-To:From:Subject:Mime-Version: Content-Type:Sender:Reply-To:Content-ID:Content-Description; bh=w6C5CtiBnXdjgKEXIjAFsIoL+gLxujYJkEUCd/DEkqE=; b=ZrqA9QlBPjWXsZveZUjN/Eo/bz MsLG4CcEVi/DDCB2EUc35Hia4I11OAaX6F/70NvRbNiZahARgzMWnAy5O4r6xlVUcO29MhR/iOW+F hCJJcyPPk25gpo3Ut2K598LxMqDVIcO2FtfCXRVxz3TNAI5tX2fNS9tt7GVu8MB4+nEtkKfMD+Ln5 7zG+msKF4ZfU4hZXH7LCsyZIirdnkV2/XcsEKKNqMj/BT2evlP5bMn9wbSAP8rVyt7i0XhBY9Npq6 XI5I/ExTrOwT5lVTOycA6+UYs8Cbu9hC+VBXAy0Xev9Gy5xZJp69VJg2ppxX9kn0gVUpdm0irzREX WYWCjzRg==; Received: from aserp2130.oracle.com ([141.146.126.79]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lWVK3-007RaO-RJ for linux-arm-kernel@lists.infradead.org; Wed, 14 Apr 2021 02:32:09 +0000 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 13E2QMj9063285; Wed, 14 Apr 2021 02:30:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=content-type : mime-version : subject : from : in-reply-to : date : cc : content-transfer-encoding : message-id : references : to; s=corp-2020-01-29; bh=w6C5CtiBnXdjgKEXIjAFsIoL+gLxujYJkEUCd/DEkqE=; b=AnHgQGespbOtXpgfo4hpU1xuzKDoFd+9fu6cGkCEAcERDAYam8dJTA5Jaw+fmOVDGgqI 72neJ3vY0c1ICt2Z70wptFghoiKi7GNpMLS6jZewClNINB/Lcs5xXw/DN8UQredSSK/K +e+pZvuFdlaugfhIQmEi5J+b0YGUb8FE81eKN+LHzKE3EO3bs4Bkxxhkhx6bO58UTOpv KYCi2aNvLYWYjVOgmfG0SikXgg8IiJVp4aNEAnlC3J13c+1x3Owq+2F4wQ+YgcwMiA3F wehjiErqikczxC3t66xaK+Ri34EoucTZrlygfFCFIaJgeXn2hKoZHsfdShTHu4mwToJ6 bA== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2130.oracle.com with ESMTP id 37u1hbh0m2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 14 Apr 2021 02:30:47 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 13E2PVFF055389; Wed, 14 Apr 2021 02:30:45 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 37unst8pth-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 14 Apr 2021 02:30:45 +0000 Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 13E2Uh9g028709; Wed, 14 Apr 2021 02:30:43 GMT Received: from [10.39.235.234] (/10.39.235.234) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 14 Apr 2021 02:30:43 +0000 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: [External] : Re: [PATCH v14 4/6] locking/qspinlock: Introduce starvation avoidance into CNA From: Alex Kogan In-Reply-To: <20210413212203.GT3762101@tassilo.jf.intel.com> Date: Tue, 13 Apr 2021 22:30:41 -0400 Cc: linux@armlinux.org.uk, Peter Zijlstra , Ingo Molnar , Will Deacon , 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 Message-Id: <7902C919-9624-48C9-89C3-D390A9FF78AB@oracle.com> References: <20210401153156.1165900-1-alex.kogan@oracle.com> <20210401153156.1165900-5-alex.kogan@oracle.com> <87mtu2vhzz.fsf@linux.intel.com> <20210413212203.GT3762101@tassilo.jf.intel.com> To: Andi Kleen X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Proofpoint-IMR: 1 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9953 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 adultscore=0 malwarescore=0 suspectscore=0 bulkscore=0 mlxscore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104060000 definitions=main-2104140016 X-Proofpoint-GUID: 0wVLpAsklsLLbRASaJbeaA4Y4iHpN-OR X-Proofpoint-ORIG-GUID: 0wVLpAsklsLLbRASaJbeaA4Y4iHpN-OR X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9953 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 priorityscore=1501 clxscore=1015 adultscore=0 mlxlogscore=999 impostorscore=0 malwarescore=0 lowpriorityscore=0 spamscore=0 phishscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104060000 definitions=main-2104140016 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210413_193207_979746_B4300B33 X-CRM114-Status: GOOD ( 16.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Cgo+IE9uIEFwciAxMywgMjAyMSwgYXQgNToyMiBQTSwgQW5kaSBLbGVlbiA8YWtAbGludXguaW50 ZWwuY29tPiB3cm90ZToKPiAKPj4+IG1zIGdyYW51bGFyaXR5IHNlZW1zIHZlcnkgY29hcnNlIGdy YWluZWQgZm9yIHRoaXMuIFN1cmVseQo+Pj4gYXQgc29tZSBwb2ludCBvZiBzcGlubmluZyB5b3Ug Y2FuIGFmZm9yZCBhIGt0aW1lX2dldD8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