Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2816507pxb; Mon, 19 Apr 2021 14:59:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHw2BEhp5Kle8M1rhHuZuf66PCtEmGAG5o9FDlON3bG0wEmTwLk3V6BepHyzGvx5Dv9DRx X-Received: by 2002:a63:4513:: with SMTP id s19mr13483385pga.34.1618869561305; Mon, 19 Apr 2021 14:59:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618869561; cv=none; d=google.com; s=arc-20160816; b=zg4b9YcSE17X9/R+p1jvEpTu0wi5b5WO/kT9QCg8StEgUztNdRnPYDSnX7xqrmv82D CvfVgKMnmWXSDNF5mxUfpm+nR1u/dONgEIW6Kw5IGoMweJ90sue3FV/Uycyocm0w9voY v7V/HcZetkF8sv0m+FE1BWbqVsO6zZE+3ObkzhhSOb1pR5Sw5cCsna9dfN84Szmp+JEP xbBsc4uxeyslL1fxbcnhdOhILCe0F+2RGhZfgVnZPwCb+o+lef4liX6qJR4tEdjBixGt UxFsJG9bvV7nXhX19uf5cLgwtQiZ0F8aq2kWswI0mtKi4hqcFpWOAIVqFnzQgMhCAPPD +Jlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=HSPaq69kDxbXvcDRlK8QBCQJYBR8HBSCY4Mm1C6F54o=; b=Dv8gjwNAye+6yhPe1QxL9Bzpg12Qh39uUDa6K75+3lPxcWYMnw7yRHIHSp4sr64ByB Ra0e1xg0Icl1LXDF3YNYbg/NN8/FyuV+I/xJxLqVGd8HUM/Kr3LhONY/4/hAB23nnoZQ WsnHjbXNW1TXX0Gy85QmjTUE9LaoojoeQvSxgvvO7rKBofUSMUr1oloPtFcmqcS5U21J 0anmbykKIqEnrBJn+WpyBZcUGNnreHQS8iqn9T7uetFNp4Slxdbl0aWDyu7zQVzxwrwY 9dU75MMPY8tnRdZ2fZZutqwS8oX77ABssFj75VPpzo3XlDedrBMt20qNN3P9c74s6MSg Yd2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=IgN79Z3R; 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=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w5si673530pjh.156.2021.04.19.14.59.08; Mon, 19 Apr 2021 14:59:21 -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=@alien8.de header.s=dkim header.b=IgN79Z3R; 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=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231588AbhDSV6p (ORCPT + 99 others); Mon, 19 Apr 2021 17:58:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229558AbhDSV6p (ORCPT ); Mon, 19 Apr 2021 17:58:45 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24FFCC06174A; Mon, 19 Apr 2021 14:58:15 -0700 (PDT) Received: from zn.tnic (p200300ec2f078100695c51a35ee1b820.dip0.t-ipconnect.de [IPv6:2003:ec:2f07:8100:695c:51a3:5ee1:b820]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 97BD01EC0300; Mon, 19 Apr 2021 23:58:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1618869492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=HSPaq69kDxbXvcDRlK8QBCQJYBR8HBSCY4Mm1C6F54o=; b=IgN79Z3R8uS+TkID/1zTU6PFt1/HlA53LP8UFvBFoMR45MZDxDwNexsTNl1EcLc85tV73P UDbzzmsNVLEwQDsL6PHQUlk9NuKWecG8uACBXRw8F9A6cPo1EFpA1x86/NphMQliJk4ED0 WHhpbDIvBdwNUF8RlNswWjd6oSusWQk= Date: Mon, 19 Apr 2021 23:58:09 +0200 From: Borislav Petkov To: Len Brown Cc: Willy Tarreau , Andy Lutomirski , 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 Subject: Re: Candidate Linux ABI for Intel AMX and hypothetical new related features Message-ID: <20210419215809.GJ9093@zn.tnic> References: <20210414095804.GB10709@zn.tnic> <20210415044258.GA6318@zn.tnic> <20210415052938.GA2325@1wt.eu> <20210415054713.GB6318@zn.tnic> <20210419141454.GE9093@zn.tnic> <20210419191539.GH9093@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 19, 2021 at 05:33:03PM -0400, Len Brown wrote: > For this to happen, every thread would not only have to include/link-with > code that uses AMX, but that code would have to *run*. It looks like either I'm not expressing myself clearly enough or you're not reading my text: the *library* does that decision automatically! Which means *every* possible thread on the system. Which means, *every* thread has a fat 8K buffer attached to it because the library uses AMX on its behalf by *default*. > I'm sure that the AI guys are super excited about matrix multiplication, > but I have a hard time imagining why grep(1) would find a use for it. It doesn't matter if you're imagining it or not - what matters is if the decision whether the thread uses AMX or not is put in the hands of the thread and *NOT* in the hands of the library. Which means, majority of the threads should not allow AMX and only a handful who do, will have to explicitly state that. And the library will have to comply. Not the library decides for every thread itself because the feature's there. > Indeed, if anyone expected AMX to be used by every task, we would have > never gone to the trouble of inventing the XFD hardware to support the > kernel's lazy 8KB buffer allocation. If it gives me fat-buffers-off-by-default and on only for a handful of threads which really want it and *request* it *explicitly*, sure, whatever gets the job done. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette