All of lore.kernel.org
 help / color / mirror / Atom feed
* PER-CPU data
@ 2012-03-30  6:00 Rajasekhar Pulluru
  2012-03-30  6:35 ` Dave Hylands
  0 siblings, 1 reply; 9+ messages in thread
From: Rajasekhar Pulluru @ 2012-03-30  6:00 UTC (permalink / raw)
  To: kernelnewbies

Hi,

I would like to know how per-cpu data are stored internally?
And how are they protected from other cores?

Thanks & Regards,
Rajasekhar

^ permalink raw reply	[flat|nested] 9+ messages in thread
* per-cpu data...
@ 2002-07-12  6:01 Rusty Russell
  2002-07-12  8:21 ` Richard Henderson
  2002-07-24 12:31 ` Jamie Lokier
  0 siblings, 2 replies; 9+ messages in thread
From: Rusty Russell @ 2002-07-12  6:01 UTC (permalink / raw)
  To: rth; +Cc: linux-kernel

IIUC, __per_cpu_data is insufficient for Alpha as stands, to use
thread-specific gcc tricks (__thread prepended to the decl, even
though they had a perfectly good __attribute__ extension already).

So, I guess we're stuck with something like:

DECLARE_PER_CPU(int x);

If we're going to do this, we can also mangle the name as well to
avoid accidental "direct" accesses:

eg:
	#define DECLARE_PER_CPU(var) 
		var##__percpu __attribute__((section(".percpu")))

	/* If not SMP: */
	#define per_cpu(var) var##__percpu

(From my reading, ## on "int x" and "__per_cpu" is well-defined).

Thoughts?
Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-04-04  5:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-30  6:00 PER-CPU data Rajasekhar Pulluru
2012-03-30  6:35 ` Dave Hylands
2012-03-30  6:54   ` Srivatsa S. Bhat
2012-04-04  5:10     ` Rajasekhar Pulluru
2012-03-30  6:54   ` Srivatsa S. Bhat
  -- strict thread matches above, loose matches on Subject: below --
2002-07-12  6:01 per-cpu data Rusty Russell
2002-07-12  8:21 ` Richard Henderson
2002-07-24 12:31 ` Jamie Lokier
2002-07-25  0:28   ` Rusty Russell

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.