From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) by sourceware.org (Postfix) with ESMTPS id 61C0F385801D for ; Mon, 12 Apr 2021 23:46:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 61C0F385801D Received: by mail-ed1-f43.google.com with SMTP id m3so17152386edv.5 for ; Mon, 12 Apr 2021 16:46:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=o1i9uWUka3mSI73hEB1W+fNOiLnbDlOqIbTHdoJYwzU=; b=hj/0D/7524q9JoN46RZMYrxQ8DzvGhkq7rJRTSx3iLVAEGFn5o2QJeXdTu1eDPfPF2 5bOhyKBn+nXDI5DRU95aHb6FRh2F326nAsM+pBXYc488NZfB3Lwwjmk8kAYgi7CPO7o7 TLbWBatT+8jcjOsJ5PuXUjG9TIxp/XZqKRUpEUEJ5lz5b4tHmoJRkHglXr1Ee1xIe9Xy cVAFMHmI6u0bns1GIAwxH1Tah49hhHNjHGn1cT2moUoMe0hvvn/1VI7elyRhPxr1rvlX v2+Mm5gBtAtNVBWJzSQT2mO1PuPwRrgeVPCmxBtOy+h9SUBiPqXGa50SMLPx7NuQOuF3 uqTA== X-Gm-Message-State: AOAM530meMOm9w4gMsKq4yyymBMLUxxATG+hWBXrYOyrA4xeWMPfMrX2 wk+7HKSMtXoOpUCvhsKUZ+tjtssflb5asETE+FU= X-Google-Smtp-Source: ABdhPJyfZVhFKp7nVTdtB1Ki3Y5mzqEvc1Cgf07Id/CuBa8DZC237wzbWw92ndMtMuiVYMkW7wyE2fWeVWsp1NokeHE= X-Received: by 2002:a05:6402:35c9:: with SMTP id z9mr31715003edc.94.1618271177457; Mon, 12 Apr 2021 16:46:17 -0700 (PDT) MIME-Version: 1.0 References: <87lf9nk2ku.fsf@oldenburg.str.redhat.com> In-Reply-To: From: Len Brown Date: Mon, 12 Apr 2021 19:46:06 -0400 Message-ID: Subject: Re: Candidate Linux ABI for Intel AMX and hypothetical new related features To: Andy Lutomirski Cc: Florian Weimer , "Bae, Chang Seok" , Dave Hansen , X86 ML , LKML , linux-abi@vger.kernel.org, "libc-alpha@sourceware.org" , Rich Felker , Kyle Huey , Keno Fischer Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2021 23:46:19 -0000 On Mon, Apr 12, 2021 at 11:21 AM Andy Lutomirski wrote: > AMX: Multiplying a 4x4 matrix probably looks *great* in a > microbenchmark. Do it once and you permanently allocate 8kB (is that > even a constant? can it grow in newer parts?), potentially hurts all > future context switches, and does who-knows-what to Turbo licenses and > such. Intel expects that AMX will be extremely valuable to key workloads. It is true that you may never run that kind of workload on the machine in front of you, and so you have every right to be doubtful about the value of AMX. The AMX architectural state size is not expected to change. Rather, if a "new AMX" has a different state size, it is expected to use a new feature bit, different from AMX. The AMX context switch buffer is allocated only if and when a task touches AMX registers. Yes, there will be data transfer to and from that buffer when three things all happen. 1. the data is valid 2. hardware interrupts the application 3. the kernel decides to context switch. There will be no data transfer of AMX architectural state when it is in INIT state. As AMX registers are volatile, correct software will always have them in INIT state before calls, including system calls. I've addressed turbo licenses already. > Even putting aside all kernel and ABI issues, is it actually a good > idea for user libraries to transparently use these new features? I'm > not really convinced. I think that serious discussion among userspace > people is needed. At the risk of stating the obvious... Intel's view is that libraries that deliver the most value from the hardware are a "good thing", and that anything preventing libraries from getting the most value from the hardware is a "bad thing":-) cheers, Len Brown, Intel Open Source Technology Center