Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1248550imu; Tue, 11 Dec 2018 15:47:10 -0800 (PST) X-Google-Smtp-Source: AFSGD/U0nXg3JFqKEplkEqSxEw/09rUxyqFJY6SBGLP96A9fBTo2ADIzbwfFfBJrvu54XhQgNDxq X-Received: by 2002:a17:902:7896:: with SMTP id q22mr18174864pll.280.1544572030406; Tue, 11 Dec 2018 15:47:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544572030; cv=none; d=google.com; s=arc-20160816; b=tUKwgr1ABMjuFi38/m1dul8Qr56RMaELUXzjSnYcakXLknXDwNUWXhfMPUYkoNl52f 4TXExA9/Zne/+uLT0ol8sUSFzn12i+sk/yQTu4Q3W5dP1qY8/ejW3zSZ0oZIuGV92wOG GiOCMGLcWVxOzZ62O8tqxG5Iv9L5BMSfkwu0aHnudizFLn/VMqsJrPs9165OKHvant18 tDGPu3OklWo9AtFX7S0pgT5Aq51+2MTVM5XCCbr7kG9V+Y7p68skHGZWn9OMIm3xTCFM jgXJrOU8weR/LgRHEQlAHlN7X6pE4mGmlRXBxvp4WvmW5gHw+jWMvawW63wj4tezSJqs jVvA== 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=MI7xlsgtKZ2dbccG8zlzDLq2GpW5HgbnrevzCziY6bw=; b=QXrs5SQdyvYgMyaRf++AXj/ChX2ZCC8YNRAAljvsfMTqTJxjGTF28jSa75uxlQC95e j96TGJX6qYUowlkr45RF2ijSCM7LqXSnE2u9LjN1H9i8Libaniel36pSqgP8/qVYABSV 5dVM+kdYao6beh2YKN2W4rBysRDGMfetKLdgOzbQ+kNuYNlPR8UwxdBLwuNymnhmSLcL e4XxqJ7uwzJPo9AJE3BVS/M/dtKjlDlrwpF9MzMD52TEsTp9CF8kVe5L2WzOAlP3ug55 h+v32lAaNJ2oi5ixSzG/MgTGbw9Bzl97qMlEcQIDQl0+O2Wuz7saY24boYrtE3PJqa4Q tC4g== 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 i35si13647607plg.396.2018.12.11.15.46.55; Tue, 11 Dec 2018 15:47:10 -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 S1726233AbeLKXqE (ORCPT + 99 others); Tue, 11 Dec 2018 18:46:04 -0500 Received: from mga14.intel.com ([192.55.52.115]:29907 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726158AbeLKXqE (ORCPT ); Tue, 11 Dec 2018 18:46:04 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Dec 2018 15:46:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,343,1539673200"; d="scan'208";a="117577481" Received: from cli6-desk1.ccr.corp.intel.com (HELO [10.239.161.118]) ([10.239.161.118]) by orsmga002.jf.intel.com with ESMTP; 11 Dec 2018 15:46:01 -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, tim.c.chen@linux.intel.com, arjan@linux.intel.com, linux-kernel@vger.kernel.org References: <20181211002448.3520-1-aubrey.li@intel.com> From: "Li, Aubrey" Message-ID: <143a5451-c7cf-16a5-a7ef-8c4b0633b689@linux.intel.com> Date: Wed, 12 Dec 2018 07:46:01 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/12/12 1:18, 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? > Do we have a real requirement to do this in practical environment? AFAIK, 1s or even 5s is good enough in some customers environment. Thanks, -Aubrey