[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181211175352.GC25620@tassilo.jf.intel.com>
Date: Tue, 11 Dec 2018 09:53:52 -0800
From: Andi Kleen <ak@...ux.intel.com>
To: Dave Hansen <dave.hansen@...el.com>
Cc: Aubrey Li <aubrey.li@...el.com>, tglx@...utronix.de,
mingo@...hat.com, peterz@...radead.org, hpa@...or.com,
tim.c.chen@...ux.intel.com, arjan@...ux.intel.com,
linux-kernel@...r.kernel.org, Aubrey Li <aubrey.li@...ux.intel.com>
Subject: Re: [PATCH v4 1/2] x86/fpu: track AVX-512 usage of tasks
On Tue, Dec 11, 2018 at 09:18:25AM -0800, Dave Hansen wrote:
> On 12/10/18 4:24 PM, Aubrey Li wrote:
> > The tracking turns on the usage flag at the next context switch of
> > the task, but requires 3 consecutive context switches with no usage
> > to clear it. This decay is required because well-written AVX-512
> > applications are expected to clear this state when not actively using
> > AVX-512 registers.
>
> One concern about this: Given a HZ=1000 system, this means that the
> flag needs to get scanned every ~3ms. That's a pretty good amount of
> scanning on a system with hundreds or thousands of tasks running around.
>
> How many tasks does this scale to until you're eating up an entire CPU
> or two just scanning /proc?
Yes that's why we may need to propagate it to cgroups in the kernel,
because user daemons don't really want to track every TID.
But per pid is a start so that people can start experimenting with this.
Then with some experience fancier interfaces for it can be implemented.
-Andi
Powered by blists - more mailing lists