mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: raghu MG <raghumag@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>
Subject: Re: How is jiffies upation while holding spinlock in Uniprocessor or SMP environment?
Date: Mon, 26 Oct 2015 10:48:54 +0000	[thread overview]
Message-ID: <20151026104854.GC8644@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <CAG1O52Wq9uCXkOgttQ7gYECQsbFufug2LCBJQfNU309i5QNH6A@mail.gmail.com>

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.

  reply	other threads:[~2015-10-26 10:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-26  6:49 raghu MG
2015-10-26 10:48 ` Russell King - ARM Linux [this message]
2015-10-30 10:59   ` raghu MG

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151026104854.GC8644@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=andrew@lunn.ch \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=raghumag@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®