Will, On Mon, Oct 02, 2006 at 08:04:34PM -0400, William Cohen wrote: > >>Anil and Stephane did just free up 128 words in the thread structure on > >>ia64 (which is concatenated to the task structure) in this change: > >>http://tinyurl.com/nzngv by moving the PMU save areas out of the thread > >>structure and into the pfm_context. Is something similar possible for > >>other > >>archs? > >> > > > >This change is already in the 2.2 code base. The PMU state is saved into > >a pfm_context struct. The only thing left in tasks_struct is a pointer > >to that structure. > > > > Yes, this change is in the existing perfmon 3.2 kernel support for the > 2.6.18 kernel. The comment was about the solitary pointer in the newest > perfmon patch set. Every byte is precious. :) > I am not sure I buy this argument although I can understand it for embedded platforms.
However, I think what is more interesting is the layout of the structure, i.e., the relative position of the fields. Are they positioned such that hot fields are separated from cold fields to minimize the number of cachelines that need to be loaded into the cache for the most common operations? > Are additional space savings possible in the task_struct, so that the net > is that task_struct stays the same size? > Looking at task_struct, I see that a lot of the fields are guaraded by #ifdef. So in reality, not every field is used. Take CONFIG_TRACE_IRQFLAGS, this is a debugging option and it adds a bunch of fields. Couldn't they be put into a external struct and replaced with a single pointer? -- -Stephane _______________________________________________ perfmon mailing list [email protected] http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/
