mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Oeser <ingo.oeser@informatik.tu-chemnitz.de>
To: Scott Huang <SHuang@narus.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: CMPXCHG
Date: Thu, 17 May 2001 13:43:35 +0200	[thread overview]
Message-ID: <20010517134335.F754@nightmaster.csn.tu-chemnitz.de> (raw)
In-Reply-To: <580E532D9F7A9B4BAE8A130848E0DDA70B7842@franklin.narus.com>
In-Reply-To: <580E532D9F7A9B4BAE8A130848E0DDA70B7842@franklin.narus.com>; from SHuang@narus.com on Wed, May 16, 2001 at 03:37:00PM -0700

On Wed, May 16, 2001 at 03:37:00PM -0700, Scott Huang wrote:
> Four adapters need to produce data to a 
> descriptor queue which is consumed by a
> user process. A lock mechanism was implemented
> to sync the adapters. However, this causes 
> a performance hit.  Is it possible to use
> CMPXCHG on Intel's i-386 to avoid the locking?

What about using atomic operations for that? This is more general
and works on ALL architectures. CMPXCHG is just and special
atomic operation on ia32.

> Where can I find some doc and some sample code?

   Documentation/DocBook/kernel-hacking.tmpl

But better do

   make htmldocs 

in the kernel top level directory and read

   Documentation/DocBook/kernel-hacking/lk-hacking-guide.html

instead.

Sample code is scattered all around in the kernel.


Regards

Ingo Oeser
-- 
To the systems programmer,
users and applications serve only to provide a test load.

      reply	other threads:[~2001-05-17 11:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-16 22:37 CMPXCHG Scott Huang
2001-05-17 11:43 ` Ingo Oeser [this message]

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=20010517134335.F754@nightmaster.csn.tu-chemnitz.de \
    --to=ingo.oeser@informatik.tu-chemnitz.de \
    --cc=SHuang@narus.com \
    --cc=linux-kernel@vger.kernel.org \
    /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®