* CMPXCHG
@ 2001-05-16 22:37 Scott Huang
2001-05-17 11:43 ` CMPXCHG Ingo Oeser
0 siblings, 1 reply; 2+ messages in thread
From: Scott Huang @ 2001-05-16 22:37 UTC (permalink / raw)
To: linux-kernel
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?
Where can I find some doc and some sample code?
Thx
-Scott
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: CMPXCHG
2001-05-16 22:37 CMPXCHG Scott Huang
@ 2001-05-17 11:43 ` Ingo Oeser
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Oeser @ 2001-05-17 11:43 UTC (permalink / raw)
To: Scott Huang; +Cc: linux-kernel
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-05-17 11:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-16 22:37 CMPXCHG Scott Huang
2001-05-17 11:43 ` CMPXCHG Ingo Oeser
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®