[PATCH][RFC] reorganized per-CPU data

From: Dimitris Michailidis (dimitris@cthulhu.engr.sgi.com)
Date: Tue Jun 06 2000 - 20:07:58 EST


This patch implements a new scheme for per-CPU data. Right now we have a
number of arrays of such data, often padded to cache-line boundaries to avoid
false sharing. This patch moves all such data into a single structure for
each CPU, then changes task_struct.processor to a pointer to this structure.
This allows us to convert code such as

some_array[current->processor].some_field

into the shorter

current->procesor->some_field.

The change saves space both in the data sections (removes most structure
padding) and in .text (eliminates left shifts for array accesses, simplifies
addressing modes, etc). For my kernel configuration space savings amount to
16155 bytes, of which 3152 are text. The change makes it somewhat more
expensive to get a cpuid, but most uses of cpuids are as array indices and
those are no longer needed.

The patch is against 99-pre8 and can be obtained from

http://reality.sgi.com/dimitris_engr/PDA_PATCH.

Comments on the proposed scheme and suggestions are very welcome.

-- 
Dimitris Michailidis                    dimitris@engr.sgi.com

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Jun 07 2000 - 21:00:26 EST