Re: [PATCH 0/9] rework of extended state handling, LWP support

From: Hans Rosenfeld
Date: Thu Dec 01 2011 - 15:36:36 EST


On Wed, Nov 30, 2011 at 10:52:00PM +0100, Andi Kleen wrote:
> On Wed, Nov 30, 2011 at 06:37:46PM +0100, Hans Rosenfeld wrote:
> > On Tue, Nov 29, 2011 at 01:31:09PM -0800, Andi Kleen wrote:
> > > Hans Rosenfeld <hans.rosenfeld@xxxxxxx> writes:
> > > >
> > > > The lazy allocation of the xstate area has been removed. The support for
> > > > extended states that cannot be saved/restored lazily, like AMD's LWP,
> > > > need this. Since optimized library functions using SSE etc. are widely
> > > > used today, most processes would have an xstate area anyway, making the
> > > > memory overhead negligible.
> > >
> > > Do you have any data on that? It sounds dubious for specialized
> > > workloads.
> >
> > What kind of specialized workload do you mean?
>
> Anything that doesn't do large memcpys/memsets: glibc only uses SSE
> when you pass large buffers. And then doesn't use the FPU. And possibly
> has lots of processes.
>
> Some older glibc did an unconditional FPU initialization at start,
> but I believe that's long gone.

Well, I can't comment on which glibc version does what exactly. But on
the 64bit systems that I observed, _all_ processes had an xstate area
allocated. That was not the case on 32bit, but I'd suspect that the
32bit distributions just aren't optimized for modern hardware.

So I assume, if you have 10000s of processes on a legacy 32bit system
that never do any FPU stuff or SSE optimizations, you might indeed waste
a couple of megabytes. I don't think thats very realistic, but that's
just my opinion.


Hans


--
%SYSTEM-F-ANARCHISM, The operating system has been overthrown

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