Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4025041pxj; Mon, 24 May 2021 21:52:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEQKZlrHaFQBXcqoOl4eUuBfwS6MNESaQdKYjbF6xHwiFVFVQ9LbvKQMJ1DLUTNiQqwIKP X-Received: by 2002:a17:906:71a:: with SMTP id y26mr24285583ejb.491.1621918349150; Mon, 24 May 2021 21:52:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621918349; cv=none; d=google.com; s=arc-20160816; b=YVnIki1RzeTAit1LWlS7xQkaCYeFfXP5iCNOBdcM8vin2Q3gz3Tzl227KFEATVVu8u +CCdOGdEnKtOq8zA5+cSUgr3RFByo1Wu9M0BB3rh4bW+xRJdiV2YIKwFJM0Gsm9yP3zi uq0ylE71aL0M7r7938I6j5BnjOS+dWg0/lvNnQdf1SBd1eRa4qjY0SlGg0wDAzjrLJGW 16WMlI9KjQgjV+dBpa7YeobXWf7KdvFC6+p5fhmTHFXdepsCFFQrttTzGjisVk13nvXG EfgEHLM86SDBiljqhwSMTv6ikBnkSr9l4j4/yWRduHeTImHltaOMbZS4xgBf5nTEtDMx xdXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:subject:cc:to:from :date:references:in-reply-to:message-id:mime-version:user-agent :dkim-signature; bh=Lb8JR8daTDUfIImjJDoTHl6z7Fymnvp9a47SA2/+DZg=; b=sLrfnYzhQ7wSOBqW0YGa7UdPzCL4FiDP7t8p9Ev5osmJWZhj1BJAzi3Eom6EBb6egc HFYIuSpbHw+TpCmBuSyX9UaLBqyOcOXx7ZlcycTkmGAO3su5XR9oDJ74BCVt5JmxGUCL HfE8jHZ4vM7kh3Wib4iQJ5fGgoW31hd3ffXiKXCPEzjlJz2GNVkQgEf5vwdc8sOhgNMR i00pv+f28m1RxmgMqluW1rwqqu46FnyBQ9cWr+QB9MayHDvysJjcdaWvCHZN3h6GZDKb XsViCevqouB/v0yKv9bndeBKaCVObO0nTid/Jtlsmn6DtvOlnQG3H458I+RUv2YDFjYB bFTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="YH3atK/L"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p8si14016176ejc.107.2021.05.24.21.52.05; Mon, 24 May 2021 21:52:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="YH3atK/L"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230400AbhEYEtq (ORCPT + 99 others); Tue, 25 May 2021 00:49:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:40650 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230385AbhEYEtq (ORCPT ); Tue, 25 May 2021 00:49:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3B65C613BF; Tue, 25 May 2021 04:48:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621918097; bh=QUu5tfKQVM3Gw3sTzewlGAGgi5EaPocb4PRcBWNXEaA=; h=In-Reply-To:References:Date:From:To:Cc:Subject:From; b=YH3atK/LXf/NOA5WEyNXtN7KtGkdkN1fesS2mF5gh0Z8F/nd6yFarWDrwlY/GxXfT PVmVZoLBEJqDCXtbsyYGJaVBCbsvW8SPPoNgofqevehJolP60+vWkXj8FEuujgyosM ZBapf7DJp+tNDFSxymfp85wNNGreaach9sRRmaj7sNDMdI3HzgEksOdR5XItV67S/f IC89s0V5m5jT9328/E4AdLwIKyahUasU7BXKN1vUKe2foQZX5D9PUyNA2pLx7xx/Lh 6Q3ExSGlSy1xdz+BVzbKY+dopP2esePUQLM0Fhib1UtfuDKkFr4idEQ8UhIrFhSK07 OZsgIOcKoP9HQ== Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailauth.nyi.internal (Postfix) with ESMTP id 4120827C0054; Tue, 25 May 2021 00:48:15 -0400 (EDT) Received: from imap21 ([10.202.2.71]) by compute2.internal (MEProxy); Tue, 25 May 2021 00:48:15 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdektddgkeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgfgsehtqhertderreejnecuhfhrohhmpedftehn ugihucfnuhhtohhmihhrshhkihdfuceolhhuthhosehkvghrnhgvlhdrohhrgheqnecugg ftrfgrthhtvghrnhepvdelheejjeevhfdutdeggefftdejtdffgeevteehvdfgjeeiveei ueefveeuvdetnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmrghilhhfrh homheprghnugihodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdduudeiudek heeifedvqddvieefudeiiedtkedqlhhuthhopeepkhgvrhhnvghlrdhorhhgsehlihhnuh igrdhluhhtohdruhhs X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 1360A51C005F; Tue, 25 May 2021 00:48:15 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-448-gae190416c7-fm-20210505.004-gae190416 Mime-Version: 1.0 Message-Id: In-Reply-To: References: <20210523193259.26200-1-chang.seok.bae@intel.com> <20210523193259.26200-25-chang.seok.bae@intel.com> Date: Mon, 24 May 2021 21:47:53 -0700 From: "Andy Lutomirski" To: "Len Brown" Cc: "Bae, Chang Seok" , "Borislav Petkov" , "Thomas Gleixner" , "Ingo Molnar" , "the arch/x86 maintainers" , "Brown, Len" , "Dave Hansen" , "Liu, Jing2" , "Shankar, Ravi V" , "Linux Kernel Mailing List" Subject: =?UTF-8?Q?Re:_[PATCH_v5_24/28]_x86/fpu/xstate:_Use_per-task_xstate_mask_?= =?UTF-8?Q?for_saving_xstate_in_signal_frame?= Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 24, 2021, at 11:06 AM, Len Brown wrote: > On Sun, May 23, 2021 at 11:15 PM Andy Lutomirski wro= te: > > > > If I'm reading this right, it means that tasks that have ever used A= MX > > get one format and tasks that haven't get another one. >=20 > No. The format of the XSTATE on the signal stack is uncompressed XSAV= E > format for both AMX and non-AMX tasks, both before and after this patc= h. > That is because XSAVE gets the format from XCR0. It gets the fields > to write from the run-time parameter. >=20 > So the change here allows a non-AMX task to skip writing data (zeros) > to the AMX region of its XSTATE buffer. I misread the patch. I still think this patch is useless. >=20 > The subsequent patch adds the further optimization of (manually) check= ing > for INIT state for an AMX-task and also skip writing data (zeros) in t= hat case. >=20 > We should have done this optimization for AVX-512, but instead we > guaranteed writing zeros, which I think is a waste of both transfer ti= me > and cache footprint. If no one depends on it, it=E2=80=99s not ABI.