Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755682AbcDNNlV (ORCPT ); Thu, 14 Apr 2016 09:41:21 -0400 Received: from www.linutronix.de ([62.245.132.108]:48349 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753984AbcDNNlU (ORCPT ); Thu, 14 Apr 2016 09:41:20 -0400 Subject: Re: [RFC PATCH] sched/cputime: drop local_irq_safe() in vtime_init_idle() To: Frederic Weisbecker References: <1460636954-20389-1-git-send-email-bigeasy@linutronix.de> <20160414131827.GA7090@lerouge> Cc: Ingo Molnar , Peter Zijlstra , linux-kernel@vger.kernel.org, Peter Zijlstra , Rik van Riel , Thomas Gleixner From: Sebastian Andrzej Siewior Message-ID: <570F9DFD.5080807@linutronix.de> Date: Thu, 14 Apr 2016 15:41:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.7.0 MIME-Version: 1.0 In-Reply-To: <20160414131827.GA7090@lerouge> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 719 Lines: 19 On 04/14/2016 03:18 PM, Frederic Weisbecker wrote: > I think I tried this but I got lockdep warnings because the other updaters > happen on IRQ. I booted and played a little but lockdep didn't scream here so far. > In practive we can't be interrupted since the idle task hasn't even started. > > Now we can probably get rid of the write_seqcount_stuff here because what > is initialized there is supposed to be visible by the idle task once it runs. > > But I'm more worried about readers. Most idle_thread_get() callers happen at boottime. Then I see two during CPU-up (cpu-hotplug) at runtime. One from _cpu_up() via idle_thread_get() and the second via bringup_cpu() and the second in bringup_cpu(). Sebastian