Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3979588imm; Mon, 30 Jul 2018 06:47:12 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfl47sJCrLVJNGXePZ1AxXp0A6Ed6bf98nPjfc6w/06I5rUCWObWPPqL9H71zdOr1pp0moa X-Received: by 2002:a17:902:b28b:: with SMTP id u11-v6mr8755791plr.2.1532958432544; Mon, 30 Jul 2018 06:47:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532958432; cv=none; d=google.com; s=arc-20160816; b=HYWMjL1NlXwZfgRFrx9q2EX4BpPf1y6ihiRXvQ5wOkeZoKSaUis6Z8YCWHbMMWeJ75 PAXvuPO9CqJUJhwpXceQe6XJSzsQAa2jQHx75iOz+16v6YrhzFWtR3hlKSQs9ThNAUXR KhmIrMtAiY8iTnMWH6lTjM2n7RWLkhdBlkqh7rjn1VjlBpMf9cPE2RTuEU1YnAA2JgG+ ypSgWJxL+2O2MKfUo5jJ+WZaI7Ko1fq1JNPm2Yhw3MlitCEoFRw8N6FNvFKnfS7KcKOK nu25uduPWBtjmL43EiPJ+owohGnrgyVUEjCpQsASUU+HcMnnYTIQUQ6LItPA6BZzue82 sKDg== 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=DD60IoeXMYjlvYKgQPIVaEQ17v4KxRwCXRLrs3PftYM=; b=MtQ/TIYpYNxzkjpzBVF9KW3N63cG80y8mIXaC7pfCN0wm8umtAP6gbKno5lGCx3m/C dW+RYhThu311hmaqQ2tpqcdh0FwCES5+od4ZntvdXU5k7tNo763JCgJgSEalq3cNnj2f zHzv+tAg5Yjxe9w1ZtoCCqQBG0+5lLYchoiXk4uEn4A8jjNL6igeIattfGZ5epbWJ5r5 Pycg5KSQyv99OwwYen63aqvh7xOIqM7y4A0CPR3kaKuodLzN6Bvdhn6opxbrt5tsgoRC UA8dBJZu04CSSPSKMno0sC9ZH0G4UyzaYf5nbnjGD8JNgFFwsGMQlaXHS7lrpbrsY4Yn HTuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=QlIIJB4p; 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 i23-v6si11464842pgb.246.2018.07.30.06.46.58; Mon, 30 Jul 2018 06:47:12 -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=QlIIJB4p; 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 S1726916AbeG3PUY (ORCPT + 99 others); Mon, 30 Jul 2018 11:20:24 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:54640 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726573AbeG3PUY (ORCPT ); Mon, 30 Jul 2018 11:20:24 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w6UDhvJw164253; Mon, 30 Jul 2018 13:45:19 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=DD60IoeXMYjlvYKgQPIVaEQ17v4KxRwCXRLrs3PftYM=; b=QlIIJB4p/0YaiTE713+1Xv3+fJFzOMmqw4wsLwR2Z3Za446NV6afizfpBO9zJjv729sp FZepCzZySUKRq2eBecesYZqKMWa/D2iAWqHYRPey56zAHaA4N0XKtcJGxMUVQXMd/PJc ai+pB9ZL+AAyDmAAYT0/epD2N4UHo7jZGvg1lFEMhFqW11Wrc5vzG0PyG5z5dpnVOsyC FpVfxfblamIsd7g8Axet7NiUPCvw+YDFVGn5X5o+9Z+Ecvlu7dnnXcXDurzdD+mscRP2 P4V/O1Ol4HzJ9xPl5DaOqkewT/n9hlBY2HPYR/fLLefFumB3y91afkeCqMdQcb1TFMsM 9w== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2kgfwsvjkc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 Jul 2018 13:45:18 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w6UDjHmA007657 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 Jul 2018 13:45:17 GMT Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w6UDjHl1024872; Mon, 30 Jul 2018 13:45:17 GMT Received: from mail-oi0-f48.google.com (/209.85.218.48) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 30 Jul 2018 06:45:17 -0700 Received: by mail-oi0-f48.google.com with SMTP id b15-v6so21276300oib.10; Mon, 30 Jul 2018 06:45:17 -0700 (PDT) X-Gm-Message-State: AOUpUlFz9IHezkwp2K6Egv0/GZ5lssBMoQNLPItkfFZql6vp1ekdvnUc RRnPvnC8QrC0LeEczjV0A8mbahElOhdh47yiyh0= X-Received: by 2002:aca:e089:: with SMTP id x131-v6mr16763749oig.221.1532958316995; Mon, 30 Jul 2018 06:45:16 -0700 (PDT) MIME-Version: 1.0 References: <20180719205545.16512-24-pasha.tatashin@oracle.com> <20180724195215.GA22496@roeck-us.net> <20180730123631.GO2476@hirez.programming.kicks-ass.net> In-Reply-To: <20180730123631.GO2476@hirez.programming.kicks-ass.net> From: Pavel Tatashin Date: Mon, 30 Jul 2018 09:44:41 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [tip:x86/timers] sched/clock: Enable sched clock early To: peterz@infradead.org Cc: Guenter Roeck , LKML , mingo@kernel.org, tglx@linutronix.de, hpa@zytor.com, linux-tip-commits@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8969 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=483 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807300153 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > - if (cd.actual_read_sched_clock == jiffy_sched_clock_read) > > + if (cd.actual_read_sched_clock == jiffy_sched_clock_read) { > > + local_irq_disable(); > > sched_clock_register(jiffy_sched_clock_read, BITS_PER_LONG, HZ); > > + local_irq_enable(); > > + } > > > > update_sched_clock(); > > I'm thinking maybe disable IRQs for that entire function, instead of > just the register call. Sure, I will send a patch. Thank you, Pavel