Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1758298imm; Thu, 19 Jul 2018 07:26:13 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe5we4qynnme/fYCKS31XLPwaPFngJOQbkR9nvJWhhNlRs4rfQ59QvdH2ZnxMRConY2+Xh2 X-Received: by 2002:a63:2803:: with SMTP id o3-v6mr10360424pgo.158.1532010373541; Thu, 19 Jul 2018 07:26:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532010373; cv=none; d=google.com; s=arc-20160816; b=mFQfvdgmGRr3cEOBLwdRtKiPG3WZq0867Vl2a2LifEBFg5LP7hO1sHDAATl97U88Pk i3LiTgNsjbycQOC0JgcRxIbRzOdga9ESKN3BRrjxGZdYfz45racSaqQHsIeAYMGXYJ6t WbCElDCMEgY1KNbNLWL//u+NK90lZC/BPETuAugNoJPDluQPI9FzJ4p4rih4espl5VK7 nw3TdnycMXO0oEjo7DJ5CtZn/NFNgcINtHwq/RCTflhfmZjWv3SEH0KVwRDyushlaOwH Lmd2sLzZUWHVmHnxfx11EaNkmI093yE0HPyxZYg4qKhIuYLt2p5jYpILX+UDm6RVBntp meaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=cHUg93UkF+c/u+TRPTi00fBOys5t6igZEdD8xX1CLxk=; b=R/iVve6QjvL9THyQVXhfIMRzwLn0jAYEUQRp0CN3OagRc7LvAwY2S1G72m1mgQRJuy 2/VHMwc7qFeq68JNLVGW3J7PUDe0MHZInhmp/HOlmgYG9RFp4Ei324iAeL6Fnu1hdVAA qmdFFZq8jALPeDcDoqNwNfFZLFd9YiKVmcySU4oUBTAeyMk9YN28ezlciY5SCiUPNXaL UP9IQDmBOl2fAwjOASXdF6XEPyQDs+xz6QV+dhSxdh3yr/b9HLjqNs2RHRKVjb7g3ZwS DSbbGGHnZGn97ucWDEoqPSPXf6VhB3taOWBjJk/lUjS9MJo7PLyLvngMBceUaEa9Aljb Su3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=0Zg6tgOF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r7-v6si5712388pgn.491.2018.07.19.07.25.58; Thu, 19 Jul 2018 07:26:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=0Zg6tgOF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731663AbeGSPIp (ORCPT + 99 others); Thu, 19 Jul 2018 11:08:45 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:37762 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727441AbeGSPIp (ORCPT ); Thu, 19 Jul 2018 11:08:45 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w6JEO1JD084642; Thu, 19 Jul 2018 14:25:18 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : references : in-reply-to : from : date : message-id : subject : to : cc : content-type; s=corp-2018-07-02; bh=cHUg93UkF+c/u+TRPTi00fBOys5t6igZEdD8xX1CLxk=; b=0Zg6tgOF9OaT+EKX6kXR7ede+UTXWzq0iqnOQv9svwLWqxs1Uxr3wsyDpaICh161+ZbA gStoC58U1L0HtyFo/sN8rKuWMgb1TD96DDPjukZH4M6m/51FEgbVeAYNN6RcsWe+gQ7b 1Dg2JYCyyvqzzgYZtZa2AMMFG6ap/sofJa452iTKtRp93SwVlag+rjDfenTcC0OLuJPw sbI3iz61lufW0l+2kjzdVisSFRpCVZU/FX7ipX6L8SBi1qdo9UMDzbJVcSV8S3aMGTRM 7ZJE+G+yXPQiEZhP4FUW+lImDAJLThvX8J9zGnpLcggwD9IEFS9qdegzUuGREdWIlsIc /Q== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2120.oracle.com with ESMTP id 2k9yjgqb82-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Jul 2018 14:25:18 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w6JEPHYL012528 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Jul 2018 14:25:17 GMT Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w6JEPHpa026618; Thu, 19 Jul 2018 14:25:17 GMT Received: from mail-it0-f47.google.com (/209.85.214.47) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 19 Jul 2018 07:25:17 -0700 Received: by mail-it0-f47.google.com with SMTP id g141-v6so7555194ita.4; Thu, 19 Jul 2018 07:25:16 -0700 (PDT) X-Gm-Message-State: AOUpUlH4RtQcnchyc5AT7qJXDh3uaERbjkdRpH3ro4uCmV7P2QyRO57m CJrjZwJ13kImm09ZIXTORhDmyG+pjEhXTm2ESGU= X-Received: by 2002:aca:db09:: with SMTP id s9-v6mr11712772oig.339.1532010316272; Thu, 19 Jul 2018 07:25:16 -0700 (PDT) MIME-Version: 1.0 References: <20180718022211.6259-1-pasha.tatashin@oracle.com> <20180718022211.6259-26-pasha.tatashin@oracle.com> <20180719104838.GC2494@hirez.programming.kicks-ass.net> In-Reply-To: <20180719104838.GC2494@hirez.programming.kicks-ass.net> From: Pavel Tatashin Date: Thu, 19 Jul 2018 10:24:40 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v14 25/25] sched: use static key for sched_clock_running To: peterz@infradead.org Cc: Steven Sistare , Daniel Jordan , linux@armlinux.org.uk, schwidefsky@de.ibm.com, Heiko Carstens , John Stultz , sboyd@codeaurora.org, x86@kernel.org, LKML , mingo@redhat.com, tglx@linutronix.de, hpa@zytor.com, douly.fnst@cn.fujitsu.com, prarit@redhat.com, feng.tang@intel.com, Petr Mladek , gnomes@lxorguk.ukuu.org.uk, linux-s390@vger.kernel.org, boris.ostrovsky@oracle.com, jgross@suse.com, pbonzini@redhat.com Content-Type: text/plain; charset="UTF-8" X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8958 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=3 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807190155 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 19, 2018 at 6:49 AM Peter Zijlstra wrote: > > On Tue, Jul 17, 2018 at 10:22:11PM -0400, Pavel Tatashin wrote: > > sched_clock_running may be read every time sched_clock_cpu() is called. > > Yet, this variable is updated only twice during boot, and never changes > > again, therefore it is better to make it a static key. > > Right, so the focus was always on making the sane TSC case fast, and if > TSC isn't stable we'd just make do and not care too much. > True for CONFIG_HAVE_UNSTABLE_SCHED_CLOCK, but for other systems like SPARC, it hurts to have this variable accessed every time, even though they have a sane sched_clock(). > But this certainly isn't wrong, so ACK. Thank you, Pave