public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Static/Global Arrays
@ 2001-12-15  0:31 Russ Weight
  2001-12-15  8:42 ` Keith Owens
  0 siblings, 1 reply; 2+ messages in thread
From: Russ Weight @ 2001-12-15  0:31 UTC (permalink / raw)
  To: lkml, LSE Tech

Hi,
	
	I have tabulated lists of static and global arrays in the
2.4.16 kernel. I am posting the information here in case it may be
of interest to some of you. I would recommend starting with the 
linux/kernel and linux/fs tables, as these are the most complete.

	http://lse.sourceforge.net/resource/#staticarray

Background:
-----------
These tables were created as part of a larger effort to identify
static resource limits which could perhaps be made dynamic or
configurable. The notes column should eventually contain the
following information.

	(1) A _very_ brief description of the array
	(2) Any static limits associated with resource
	    allocation should be noted.

See the linux/kernel and linux/fs tables for examples of these notes.

Moving Forward:
---------------
Many of the arrays in these tables have not yet been annotated.
For me this has been very educational - lots of unfamiliar source
code to read. For many of you, it would be simply a matter of noting
things you already understand. If you find this information useful
and feel inclined to contribute, I would welcome contributions and/or
modifications to the notes in these tables.

- Russ
-- 
Russ Weight (rweight@us.ibm.com)
Linux Technology Center

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

* Re: Static/Global Arrays
  2001-12-15  0:31 Static/Global Arrays Russ Weight
@ 2001-12-15  8:42 ` Keith Owens
  0 siblings, 0 replies; 2+ messages in thread
From: Keith Owens @ 2001-12-15  8:42 UTC (permalink / raw)
  To: Russ Weight; +Cc: lkml, LSE Tech

On Fri, 14 Dec 2001 16:31:10 -0800, 
Russ Weight <rweight@us.ibm.com> wrote:
>	I have tabulated lists of static and global arrays in the
>2.4.16 kernel. I am posting the information here in case it may be
>of interest to some of you. I would recommend starting with the 
>linux/kernel and linux/fs tables, as these are the most complete.
>
>	http://lse.sourceforge.net/resource/#staticarray

Stating the obvious: For any array with dimension [32] or [64], check
if the source code uses [NR_CPUS].  IMHO there is no point in trying to
make those arrays dynamic in size, you penalize the 99% of small
machines on the off chance that somebody is going to run single system
image Linux on a box with > 32/64 processors.  People using such large
machines can recompile the kernel with a new value of NR_CPUS.

As a separate problem, there are still places in the kernel which
assume the number of cpus can be represented in a bitmap of type long.
That code would be worth tracking down and changing to remove the
assumption that NR_CPUS <= 8*sizeof(long).  Until that is done, you
cannot run SSI Linux on machines with > 32/64 processors.

Note to self: after the bitmap code limit has been removed, make
NR_CPUS a config option to get ready for huge machines, make
CONFIG_NR_CPUS a critical config option.


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

end of thread, other threads:[~2001-12-15  8:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-12-15  0:31 Static/Global Arrays Russ Weight
2001-12-15  8:42 ` Keith Owens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox