Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp941852imu; Tue, 11 Dec 2018 09:55:45 -0800 (PST) X-Google-Smtp-Source: AFSGD/VT8Ra8Y07BoFBWSa4Z8TOc8CEEbNmv0ExZVpv0FDJe7YomBXRgT4KCjaVbrndWBMfm79Hc X-Received: by 2002:a63:6302:: with SMTP id x2mr15307982pgb.183.1544550945673; Tue, 11 Dec 2018 09:55:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544550945; cv=none; d=google.com; s=arc-20160816; b=QA6nb7D1LPsQVqG1dP4DkmBOm0TsUysCJJsvSVbA4dUpU4ZkJItr/5PfG0coAXEp/O tq8wRgLxBzQ0fkaqjNSuiTSk074I8IrAyWDiZhMoqzF/9L8wNSDTQJjqERMLt2YXtzTz QTH3B+Lw3yNHhbJfZ6AbsifLg1F6Z0OkYFvGZx7GKs97eRQCRrsnOXbwXCBkx+Aqo25X IziSNd4/p/VJ1Dyk6VnPzJ++yMWjV5iSHtQE5Fg588IEDg2f7Tp0dhn3K0AaB9XzxXf6 hzJBFTtMZS7x2pqeFucyFUSR6yMuuC+wNmLNQjgArcVX857rwuow4BPLr8e2IN6j8ykY QQag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=/4SPh3JHXUTexjyYuIF+4KSBizOsLI/1SuSn5fSMVbQ=; b=z4TMa9i8PEIqXxObBg37/mViOnzyZhj88fgy5/zRhqPzmmGYn+kimmqMzOf+hGwMnU CCnNq4DP7GdKJztoE63tByqE3UzMlOIoeM3161X9K0NWcBCdlHTj0yt82uNx1nLAj7s9 idf83OTw3v0VN8kraY+yOble9Znd5G2Ha1IE/AcF/upHCb2/dZvx2aNV6hKQU+oPMEYE kLJRU7c81pG3wy7UKREMvkKDax6l0OcHfiwziE91ZXKmaiq0rg7QVBIIa2T4LhFAmUze 3Cl9K1ew1Xmi18rvV+5GNTkFQ29xathuN0Jv1whvTarlVtN2CpfoKTX5a5FXuRltLBM5 J0jA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f11si12913128plt.133.2018.12.11.09.55.30; Tue, 11 Dec 2018 09:55:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726821AbeLKRwp convert rfc822-to-8bit (ORCPT + 99 others); Tue, 11 Dec 2018 12:52:45 -0500 Received: from mga18.intel.com ([134.134.136.126]:2327 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726231AbeLKRwp (ORCPT ); Tue, 11 Dec 2018 12:52:45 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Dec 2018 09:52:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,343,1539673200"; d="scan'208";a="127012678" Received: from schen9-mobl3.jf.intel.com ([10.24.9.33]) by fmsmga004.fm.intel.com with ESMTP; 11 Dec 2018 09:52:44 -0800 Subject: Re: [PATCH v4 1/2] x86/fpu: track AVX-512 usage of tasks To: Dave Hansen , Aubrey Li , tglx@linutronix.de, mingo@redhat.com, peterz@infradead.org, hpa@zytor.com Cc: ak@linux.intel.com, arjan@linux.intel.com, linux-kernel@vger.kernel.org, Aubrey Li References: <20181211002448.3520-1-aubrey.li@intel.com> From: Tim Chen Message-ID: <86ba7095-b877-cea6-3c07-8db2ff7fe02f@linux.intel.com> Date: Tue, 11 Dec 2018 09:52:43 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/11/18 9:18 AM, 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? > The reason why I believe that an exponential decay average, or some other kind of weighted decay of the AVX512 usage is better. Tim