All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Kevin Hilman <khilman@linaro.org>,
	Mats Liljegren <mats.liljegren@enea.com>,
	linaro-dev@lists.linaro.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC/PATCH 2/5] kernel_cpustat: convert to atomic 64-bit accessors
Date: Thu, 21 Feb 2013 21:58:50 +0000	[thread overview]
Message-ID: <20130221215850.GC17833@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <CAFTL4hw1=mKtUadL0WDrydtspOehKuW7jhhzr65vXR2P2zdTWw@mail.gmail.com>

On Thu, Feb 21, 2013 at 10:53:07PM +0100, Frederic Weisbecker wrote:
> That too should be kcpustat_this_cpu_set(), or kcpustat_this_cpu_add()
> FWIW. But we probably don't need the overhead of atomic_add() that
> does a LOCK.
> atomic_set(var, atomic_read(var) + delta) would be better. All we need

You mean atomic64_set() and atomic64_read().  Looking at the generic
version in lib/atomic64.c, atomic64_add() is cheaper for 32-bit arches
because it doesn't involve taking the lock twice.

WARNING: multiple messages have this Message-ID (diff)
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC/PATCH 2/5] kernel_cpustat: convert to atomic 64-bit accessors
Date: Thu, 21 Feb 2013 21:58:50 +0000	[thread overview]
Message-ID: <20130221215850.GC17833@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <CAFTL4hw1=mKtUadL0WDrydtspOehKuW7jhhzr65vXR2P2zdTWw@mail.gmail.com>

On Thu, Feb 21, 2013 at 10:53:07PM +0100, Frederic Weisbecker wrote:
> That too should be kcpustat_this_cpu_set(), or kcpustat_this_cpu_add()
> FWIW. But we probably don't need the overhead of atomic_add() that
> does a LOCK.
> atomic_set(var, atomic_read(var) + delta) would be better. All we need

You mean atomic64_set() and atomic64_read().  Looking at the generic
version in lib/atomic64.c, atomic64_add() is cheaper for 32-bit arches
because it doesn't involve taking the lock twice.

  parent reply	other threads:[~2013-02-21 21:59 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-20 19:41 [RFC/PATCH 0/5] context_tracking: prerequisites for ARM support Kevin Hilman
2013-02-20 19:41 ` Kevin Hilman
2013-02-20 19:41 ` [RFC/PATCH 1/5] context tracking: conditionalize guest support based on CONFIG_KVM Kevin Hilman
2013-02-20 19:41   ` Kevin Hilman
2013-02-22 13:27   ` Frederic Weisbecker
2013-02-22 13:27     ` Frederic Weisbecker
2013-02-26 19:29     ` Kevin Hilman
2013-02-26 19:29       ` Kevin Hilman
2013-02-26 22:13       ` Namhyung Kim
2013-02-26 22:13         ` Namhyung Kim
2013-02-27 14:24         ` Kevin Hilman
2013-02-27 14:24           ` Kevin Hilman
2013-02-27 15:21           ` Frederic Weisbecker
2013-02-27 15:21             ` Frederic Weisbecker
2013-02-20 19:41 ` [RFC/PATCH 2/5] kernel_cpustat: convert to atomic 64-bit accessors Kevin Hilman
2013-02-20 19:41   ` Kevin Hilman
2013-02-21 19:38   ` Kevin Hilman
2013-02-21 19:38     ` Kevin Hilman
2013-02-21 21:53     ` Frederic Weisbecker
2013-02-21 21:53       ` Frederic Weisbecker
2013-02-21 21:54       ` Frederic Weisbecker
2013-02-21 21:54         ` Frederic Weisbecker
2013-02-22  5:57         ` Kevin Hilman
2013-02-22  5:57           ` Kevin Hilman
2013-02-21 21:58       ` Russell King - ARM Linux [this message]
2013-02-21 21:58         ` Russell King - ARM Linux
2013-02-21 22:15         ` Frederic Weisbecker
2013-02-21 22:15           ` Frederic Weisbecker
2013-02-20 19:41 ` [RFC/PATCH 3/5] virt CPU accounting: Kconfig: drop 64-bit requirment Kevin Hilman
2013-02-20 19:41   ` Kevin Hilman
2013-02-20 19:41 ` [RFC/PATCH 4/5] cputime: use do_div() for nsec resolution conversion helpers Kevin Hilman
2013-02-20 19:41   ` Kevin Hilman
2013-02-21 16:24   ` Frederic Weisbecker
2013-02-21 16:24     ` Frederic Weisbecker
2013-02-21 17:58   ` Namhyung Kim
2013-02-21 17:58     ` Namhyung Kim
2013-02-21 19:21     ` Kevin Hilman
2013-02-21 19:21       ` Kevin Hilman
2013-02-26 15:21       ` Frederic Weisbecker
2013-02-26 15:21         ` Frederic Weisbecker
2013-02-20 19:41 ` [RFC/PATCH 5/5] ARM: Kconfig: allow virt CPU accounting Kevin Hilman
2013-02-20 19:41   ` Kevin Hilman

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=20130221215850.GC17833@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=fweisbec@gmail.com \
    --cc=khilman@linaro.org \
    --cc=linaro-dev@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mats.liljegren@enea.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.