From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932105AbbJZKtG (ORCPT ); Mon, 26 Oct 2015 06:49:06 -0400 Received: from pandora.arm.linux.org.uk ([78.32.30.218]:37849 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753387AbbJZKtD (ORCPT ); Mon, 26 Oct 2015 06:49:03 -0400 Date: Mon, 26 Oct 2015 10:48:54 +0000 From: Russell King - ARM Linux To: raghu MG Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Andrew Lunn Subject: Re: How is jiffies upation while holding spinlock in Uniprocessor or SMP environment? Message-ID: <20151026104854.GC8644@n2100.arm.linux.org.uk> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 26, 2015 at 12:19:31PM +0530, raghu MG wrote: > Hello, > I have couple of questions. > 1) In case of UP how is jiffies(timer) get updated while holding spin > lock using spinlock_irq_save? It isn't, and... > > 2)My understanding is in smp environment jiffies updation cannot be > done on processor holding spinlock irrespective of spinlock API.So > timer interrupt should be enabled across all cores in SoC. Imagine a > scenario in quad core processor where 4 cores are holding 4 different > spinlocks & how is the timer interrupt for jiffies handled? You can't rely on jiffies being updated while holding a spinlock. Expecting jiffies to update while holding a spinlock is a bug. -- FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.