Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1749387imm; Thu, 19 Jul 2018 07:18:03 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfVFcSr43jgP3GT+96Fa68+1XLf0/GXA3VpAcOdyGsACzkQyvjJ8J0V5JtPAvF6yfaNvMxD X-Received: by 2002:a63:1a49:: with SMTP id a9-v6mr10411846pgm.423.1532009883799; Thu, 19 Jul 2018 07:18:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532009883; cv=none; d=google.com; s=arc-20160816; b=ZMPDmO9AxqXHotQZuTKhK47alD9eQj7zIjzorilzHldBYi7BfJXOzMbqvq8N+ad02C jSMnrXXlNVd76Xqr89sVlB+Zg3oxVWAWeYtc392MAV5vr1l7fyOFTi9CtcqHWF94xjQW zO7B05jRjDjBSyHmETNHbVGGjumBL4fG1gqmSSOISJr1eCCJOau/VBzRY5JSntJfpZNG M9pAaSfsitf9rM5ht4uC/XOZea02J2ar7jHFcK+Cd4waEO+qQmjHVrHZspX+UJN8swg+ QNZ5VPZ/AQCq5f7ujM6p2k5em7rRP1L0IdomCn7khJhuwd4cNjhWuxt3t+w67SSEConI jFsQ== 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=5ZLM4hHToWws5+QxYzDQonJhtHL5XZXhSYI63RH/nVw=; b=Ria6MrLx71VbFG4zwJvjF06zh6Dl2bXBi2b9QLkold5cAWwGNIAisP2acIR8t2ngxU /RxKAGoIdF3n7hLGONB0SwgzCkargKHdpFc6PYbOxswggNQDaBtCSk2fKt8Ko5IR/haQ gO6INmSdICDfr2d8cUYZ+oIqk5EqVov1+tvheWM574I6bEJjAbIWCMVqQjd4lZYhfA7S J+H9oSlVECYWb/JvMvSk75rEF2Y4txV1s72sPE34Uhp43p7otyca2C8/bL19rsxJypNj E6xmUte2QmfMK0034gSKkj68q6llH8tRq+s3f76nErCkSXj0IGNwhhhkCrcxwR4OqppF A6pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=q+ioJDCZ; 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 h13-v6si5761343pgr.338.2018.07.19.07.17.48; Thu, 19 Jul 2018 07:18:03 -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=q+ioJDCZ; 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 S1731777AbeGSPAh (ORCPT + 99 others); Thu, 19 Jul 2018 11:00:37 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:33282 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727575AbeGSPAh (ORCPT ); Thu, 19 Jul 2018 11:00:37 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w6JEDPEq040689; Thu, 19 Jul 2018 14:17:13 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=5ZLM4hHToWws5+QxYzDQonJhtHL5XZXhSYI63RH/nVw=; b=q+ioJDCZBtXn9bXxlXn5P3iebbS7/Tqd+0FNs/pcSOUo6OJzUvAQvjKon/dY6CiaUnRi EfA8lhxC0D/91MvuZ7BveQK3JLzeiewLpxD3L7yac56tOYwjeuWuwsJ1GBbx0vCdPiCl 2ahShdo9vnbZZfrFqnE7i0tSuLfWitjVsnNRoPXD7800dnSyIpqkB2DItn0X1TJAR+D5 upuemekvibLklmfipYr2okefnK/P5aP2bg/iUO5/kPpZrLeC1vGy0F1adVD9IsyJGKSx E3tffH0pd/0fh95EGjfiq1/ULYdwaBLeudDeNOVdgy/VTmN7KvJKHiRlBC0tNubfyO/o iw== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2120.oracle.com with ESMTP id 2k9yjx7am5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Jul 2018 14:17:12 +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 w6JEHBO2015547 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Jul 2018 14:17:11 GMT Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w6JEHBMZ021657; Thu, 19 Jul 2018 14:17:11 GMT Received: from mail-it0-f44.google.com (/209.85.214.44) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 19 Jul 2018 07:17:11 -0700 Received: by mail-it0-f44.google.com with SMTP id 188-v6so9797838ita.5; Thu, 19 Jul 2018 07:17:11 -0700 (PDT) X-Gm-Message-State: AOUpUlEKmrf2HWvxRVUMdCzg/MeikcoTaNvC3xtctDmmDKRGCliDLqTj RP0DtUpoGwXu3cpKpojjeBXrYTCdi6PN3P9+8Z8= X-Received: by 2002:aca:b541:: with SMTP id e62-v6mr10998621oif.136.1532009830656; Thu, 19 Jul 2018 07:17:10 -0700 (PDT) MIME-Version: 1.0 References: <20180718022211.6259-1-pasha.tatashin@oracle.com> <20180718022211.6259-25-pasha.tatashin@oracle.com> <20180719103903.GB2494@hirez.programming.kicks-ass.net> In-Reply-To: <20180719103903.GB2494@hirez.programming.kicks-ass.net> From: Pavel Tatashin Date: Thu, 19 Jul 2018 10:16:34 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v14 24/25] sched: early boot clock 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=2 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-1807190153 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:40 AM Peter Zijlstra wrote: > > On Tue, Jul 17, 2018 at 10:22:10PM -0400, Pavel Tatashin wrote: > > > diff --git a/kernel/sched/clock.c b/kernel/sched/clock.c > > index 0e9dbb2d9aea..7a8a63b940ee 100644 > > --- a/kernel/sched/clock.c > > +++ b/kernel/sched/clock.c > > @@ -202,7 +202,15 @@ static void __sched_clock_gtod_offset(void) > > > > void __init sched_clock_init(void) > > { > > + unsigned long flags; > > + > > sched_clock_running = 1; > > + > > + /* Adjust __gtod_offset for contigious transition from early clock */ > > + local_irq_save(flags); > > + sched_clock_tick(); > > + local_irq_restore(flags); > > + __sched_clock_gtod_offset(); > > I think we want to keep __sched_clock_gtod_offset() inside the IRQ > disabled region. Fixed. > > And I just looked at my patch: > > https://lkml.kernel.org/r/20180626090003.GA2458@hirez.programming.kicks-ass.net > > and that had a comment about how we wanted to set the gtod offset > _before_ setting sched_clock_running, yet here you do it the other way > around. Hmm? Fixed, and added your comment. Thank you, Pavel