Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755539AbcDNNHb (ORCPT ); Thu, 14 Apr 2016 09:07:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35957 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754533AbcDNNHb (ORCPT ); Thu, 14 Apr 2016 09:07:31 -0400 Message-ID: <1460639246.25336.24.camel@redhat.com> Subject: Re: [RFC PATCH] sched/cputime: drop local_irq_safe() in vtime_init_idle() From: Rik van Riel To: Sebastian Andrzej Siewior , Ingo Molnar , Peter Zijlstra Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Frederic Weisbecker , Thomas Gleixner Date: Thu, 14 Apr 2016 09:07:26 -0400 In-Reply-To: <1460636954-20389-1-git-send-email-bigeasy@linutronix.de> References: <1460636954-20389-1-git-send-email-bigeasy@linutronix.de> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-YyN35ZKFQ/K2mf+qjn3+" Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2242 Lines: 62 --=-YyN35ZKFQ/K2mf+qjn3+ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2016-04-14 at 14:29 +0200, Sebastian Andrzej Siewior wrote: > A while ago vtime_init_idle() used to invoke sched_clock_cpu() and > had > write_seqlock_irqsave() because sched_clock_cpu() required to be > called > with interrupts off. > This requirement is written before the body of the function and was > introduced in 2010 via c676329abb2b ("sched_clock: Add local_clock() > API > and improve documentation"). This requirement has been dropped in > 2013 > via ef08f0fff876 ("sched/clock: Remove local_irq_disable() from the > clocks") > but the body of the function still has the comment. >=20 > Now, vtime_init_idle() was converted from seqlock to seqcount via > b7ce2277f087 ("sched/cputime: Convert vtime_seqlock to seqcount") and > while doing so the IRQ-off region around sched_clock_cpu() was > preserved > while not strictly required (given the first part of this commit). > A little later, sched_clock_cpu() was replaced with jiffies via > ff9a9b4c4334 ("sched, time: Switch VIRT_CPU_ACCOUNTING_GEN to jiffy > granularity"). > Based on this events I assume it is safe to drop the local_irq_safe() > section. >=20 > Cc: Peter Zijlstra > Cc: Frederic Weisbecker > Cc: Rik van Riel > Cc: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior >=20 Acked-by: Rik van Riel --=20 All Rights Reversed. --=-YyN35ZKFQ/K2mf+qjn3+ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJXD5YOAAoJEM553pKExN6DMIEH/27bTXWD8OMq5g9fOPJLZbJv x5Cs5wvhNaKkTJHTDK8le74DSLv+tDkninTa4KUeGCJjo125vPb5iepTz2j7gMiB 3oh6xYhdPlNruRPVZGj+ciaOt49ksPzlPuciTjNQiACLi6XMI7FwrHdska5UHqa5 eU4URB+/ZxGMP9v8hIX2CB7PQTJbGrTbfP0JHivu1GKhKKRUtCyTRogpgeq6/DGU GNvy3aS45/navALS7xkdmhCha2hyrtKS100Xn79F1zHxlqNWneV788lqLzvbtmhF BID1+fNAVmM1moqQouDq5aCDHrS1hmnNSBB6HMgB8DfPHCgwHnHeSFBOB8f/5Ok= =F1HL -----END PGP SIGNATURE----- --=-YyN35ZKFQ/K2mf+qjn3+--