Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4395788imu; Tue, 18 Dec 2018 14:10:29 -0800 (PST) X-Google-Smtp-Source: AFSGD/WtQ8ff9ZmewKxh7ECDkrDHSr6k1BE0X4C2cDfUcLaaBp2VZhVZoT+f9UYbRmguo+xGYTEJ X-Received: by 2002:a63:9041:: with SMTP id a62mr13688401pge.163.1545171029667; Tue, 18 Dec 2018 14:10:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545171029; cv=none; d=google.com; s=arc-20160816; b=JXkVS8QRCnueu69X835XY1NZaaGO0RVZ5ZtUOtmIIHhIio6PdNgMgJwuGbCzY0hEvB q5vb2In9t3ixG9hQD2ob7iU0B+4u2kobTUWgz7BkPZzt7BdvokRk3yxiVxsWiGM36vlz 9PbD6lbqN8ZgkrK65Eu1A+sf+vs2ho0LEuXT9vLDtWr4xLGsNt9yCuPgTnVg0wZa9FY8 UgBzcvHEU0Z5bpQxCk8NbA8JrVYbD3u1qttJGA/8f/P/IS+2naIBCAe77HMh7dtydX0r SrIe74TAiZHvsw4lmQoE8svh10pxXos6Rjd4ZlPC15SKuzs24oOOwf+wCMO5YFlFzxTg qXyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=nf8MqXY+t82zs1z39TuSt5A/KtTYQ1PXGsqDt/IyEaY=; b=IL8pIUrjNYVdmLAy3vjNHjCbVlEKjr+reS3TcKt0M3wyJaIMneARSV5vcUuz1GBGVH KzBj8GUZUf2RlSZQa3wTbcgFebIRvVgMuibFpNW+X9fSzr3NE7C2nmw2/0tHTvzoesXv 57jzoeKcPmlctD9LsRNJmyA3O8eswmHdp4OBeVllCuhA7wWX3JgvuVXufXdjKuu8Z2Cq aBgkpyQpjTKkNbe/nfR3VqRgwvRXeqBxzhUcqdMpK8BGnuhny9HKbUAv4/2+N7gjP1iA nJ9HRKFwQjN8i+Y4QLPPmD33V9T1Efj/zfXHGgtRVDEfh7xHi+s74CxDi/bKNN1bTQFb 7n+g== 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 q2si11963605plr.204.2018.12.18.14.10.14; Tue, 18 Dec 2018 14:10:29 -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 S1727497AbeLRWFi (ORCPT + 99 others); Tue, 18 Dec 2018 17:05:38 -0500 Received: from mga04.intel.com ([192.55.52.120]:38212 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727163AbeLRWFi (ORCPT ); Tue, 18 Dec 2018 17:05:38 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Dec 2018 14:05:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,370,1539673200"; d="scan'208";a="110480709" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.7.201.137]) by fmsmga008.fm.intel.com with ESMTP; 18 Dec 2018 14:05:37 -0800 Received: by tassilo.localdomain (Postfix, from userid 1000) id C9E29300B49; Tue, 18 Dec 2018 14:05:37 -0800 (PST) Date: Tue, 18 Dec 2018 14:05:37 -0800 From: Andi Kleen To: Dave Hansen Cc: "Li, Aubrey" , Thomas Gleixner , Aubrey Li , mingo@redhat.com, peterz@infradead.org, hpa@zytor.com, tim.c.chen@linux.intel.com, arjan@linux.intel.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 1/3] x86/fpu: track AVX-512 usage of tasks Message-ID: <20181218220537.GJ25620@tassilo.jf.intel.com> References: <20181218042218.8653-1-aubrey.li@intel.com> <62997df2-0817-b54d-b11e-00a567f1d67c@linux.intel.com> <20181218213826.GI25620@tassilo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 18, 2018 at 01:44:41PM -0800, Dave Hansen wrote: > On 12/18/18 1:38 PM, Andi Kleen wrote: > >> I misunderstood, you mean 32bit kernel, not 32bit machine. Theoretically 32bit > >> kernel can use AVX512, but not sure if anyone use it like this. get_jiffies_64() > >> includes jiffies_lock ops so not good in context switch. So I want to use raw > >> jiffies_64 here. jiffies is a good candidate but it has wraparound overflow issue. > >> Other time source are expensive here. > >> > >> Should I limit the code only running on 64bit kernel? > > Yes making it 64bit only should be fine. > > I think I'd rather just disable AVX512 itself on 32-bit and be done with > it. I think more than half of the ~2k of XSAVE space that it consumes > in *every* *task* is just pure waste because it has to be 0's. > > This ~2k of extra space is also lowmem, which makes it even more valuable. That will actually break programs. If someone compiled binaries with -march=native on a system with AVX512 they wouldn't work anymore. Don't think we can do it. -Andi