linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roman Zippel <zippel@linux-m68k.org>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] In-kernel module loader 3/7
Date: Thu, 19 Sep 2002 01:07:16 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.44.0209190042370.8911-100000@serv> (raw)
In-Reply-To: <20020918021714.E9A292C13A@lists.samba.org>

Hi,

On Wed, 18 Sep 2002, Rusty Russell wrote:

> +/* Stopping interrupts faster than atomics on many archs (and more
> +   easily optimized if they're not) */
> +static inline void bigref_inc(struct bigref *ref)
> +{
> +	unsigned long flags;
> +	struct bigref_percpu *cpu;
> +
> +	local_irq_save(flags);
> +	cpu = &ref->ref[smp_processor_id()];
> +	if (likely(!cpu->slow_mode))
> +		cpu->counter++;

Did you benchmark this? On most UP machines an inc/dec should be cheaper
than irq enable/disable.

bye, Roman


  reply	other threads:[~2002-09-18 23:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-18  2:07 [PATCH] In-kernel module loader 3/7 Rusty Russell
2002-09-18 23:07 ` Roman Zippel [this message]
2002-09-18 23:11   ` Robert Love
2002-09-19  2:05   ` Rusty Russell

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=Pine.LNX.4.44.0209190042370.8911-100000@serv \
    --to=zippel@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /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;
as well as URLs for NNTP newsgroup(s).