Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1492975pxj; Fri, 21 May 2021 16:10:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDvhjcTPPIEqPvxJUsVvLROYUXG+WGwtaZg6c193isdDRpHtMoqTj0JXYBoST+jv8qj7ni X-Received: by 2002:a05:6402:4313:: with SMTP id m19mr13304691edc.263.1621638624648; Fri, 21 May 2021 16:10:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621638624; cv=none; d=google.com; s=arc-20160816; b=VE4/P2WZZU6Cfnku5sHMCktdqF+++MXdSLNY46r98hvtWqJ6bBQDmJj0nwAj2yNz3u nchakLcgEzziTJ3rhZOYSBzQ1dcXty+cfmFth8LETaWbZR2fQEeA7AUvQvHjH75T0Kxb X/pnjaIJ0m2eEwW27eLetKo3mDELoD73dk24Xe/23nU3irOGtULM73ITwKF2Zy4n2AnN P8REksMbm54LwaPjAN1zdxflLuauSLpHLGebQYNo+UFQa7fL6IELiVra+2dqhfH8Eos3 P4f4mEsF6dMZJWT5g5zUMaQIbZ27seoUQUdSEfY3ceg1CeK5I2aXAhoi8GzOkzawHKzY 8vYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=42bMK2z1Scf6IgRWuylgcFySbLCvSYw2RhDSwWVP40Y=; b=VrPEV62tJ1x18M28Lqu0GlqrLU6e2UlwthIpKZ9wawHy7Gp6zZdYDSRp7l0uPVon1O EZPaVx8mZ3OPmnuZOdGL0nNHqEXyRhNOUJRidUY2CBI9ISL1+K7P54vSAyRsiTL+44OT VvsBeqOCriwZLxYTHtv8hb0LEqLl8gdy89aOZghSaS95sqAijpTAq7CYnmH93t6cw2If YamLdeaqVC1W7dL7BJVxRR0nJuzDmzclWZCdQ2gWp7fqnNknL1x/MlHCg+7FEfoRTXpM /7mxVnXLXolh3uFUR53QiVNfq4K0FiHI54PePz+70E0SMeHru7VZirFLnEzOkxgrJW9U IEcQ== ARC-Authentication-Results: i=1; mx.google.com; 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 y25si8429629ejb.210.2021.05.21.16.10.01; Fri, 21 May 2021 16:10:24 -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; 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 S230014AbhEUXKA (ORCPT + 99 others); Fri, 21 May 2021 19:10:00 -0400 Received: from mail-ej1-f54.google.com ([209.85.218.54]:46825 "EHLO mail-ej1-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229655AbhEUXJ7 (ORCPT ); Fri, 21 May 2021 19:09:59 -0400 Received: by mail-ej1-f54.google.com with SMTP id u21so32632907ejo.13; Fri, 21 May 2021 16:08:34 -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=42bMK2z1Scf6IgRWuylgcFySbLCvSYw2RhDSwWVP40Y=; b=pL4Zgjfx/XZ4cZAPi3fc6E2X2c2KSaqGQJ97offb+62dsYEMxVwbiaCGT0eg6KFuoF ShFbTCq6tPs/v2/s48RA5UNMG/1WG/AFnbZUCeHMaEeZpghunofN4lJ7aKcNqUCLdpo2 EJbFQ0tIoUMUaWQ1xH65oLqEl57TzT94zhkEnrtRJYEi7vow2T2X8RCT1CwpMiubps5M 9jKDvzJal4c79TKeYLT+yVGfK6nibjFfVXizcXFd/1h1cv6FJ/unpW1tKHKR/J2jtEvy R/hKm+eJLOF4AneIaOJzHdGXnvo/Q4nkwBjEVHIshMav5w5LYMvK1Zavi4BkWfpEFkWq oUTg== X-Gm-Message-State: AOAM532nONoELnok1PJsTGvh5UZ/ivrwy00+Ms+/IVGMGZ+dva9wptAJ Q3KixvyWqMsowcgNtRtpqXzAQq4i+inn6GobtIMkMmWM X-Received: by 2002:a17:906:c299:: with SMTP id r25mr12709200ejz.501.1621638514252; Fri, 21 May 2021 16:08:34 -0700 (PDT) MIME-Version: 1.0 References: <20210415044258.GA6318@zn.tnic> <20210419191539.GH9093@zn.tnic> <20210419215809.GJ9093@zn.tnic> <874kf11yoz.ffs@nanos.tec.linutronix.de> <87k0ntazyn.ffs@nanos.tec.linutronix.de> <37833625-3e6b-5d93-cc4d-26164d06a0c6@intel.com> <9c8138eb-3956-e897-ed4e-426bf6663c11@intel.com> <87pmxk87th.fsf@oldenburg.str.redhat.com> <939ec057-3851-d8fb-7b45-993fa07c4cb5@intel.com> <87r1i06ow2.fsf@oldenburg.str.redhat.com> <263a58a9-26d5-4e55-b3e1-3718baf1b81d@www.fastmail.com> <87k0nraonu.ffs@nanos.tec.linutronix.de> <06705386-8c7c-d705-9f89-1d894aa0878f@intel.com> In-Reply-To: <06705386-8c7c-d705-9f89-1d894aa0878f@intel.com> From: Len Brown Date: Fri, 21 May 2021 19:08:23 -0400 Message-ID: Subject: Re: Candidate Linux ABI for Intel AMX and hypothetical new related features To: Dave Hansen Cc: Thomas Gleixner , Andy Lutomirski , Florian Weimer , Dave Hansen via Libc-alpha , Rich Felker , Linux API , "Bae, Chang Seok" , "the arch/x86 maintainers" , Linux Kernel Mailing List , Kyle Huey , Borislav Petkov , Keno Fischer , Arjan van de Ven , Willy Tarreau Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 21, 2021 at 7:06 PM Dave Hansen wrote: > > On 5/21/21 3:07 PM, Len Brown wrote: > > My concern about synchronous allocation is that it will be very easy > > to abuse. programs and threads can ask for buffers they will never > > use. With on-demand allocation, we allocate buffers only if they are > > actually needed. > > If someone wants to abuse the on-demand allocation, they will simply > write a single bit to an AMX register. That does *NOT* mean they will > actually execute an instruction that actually uses AMX to do something > meaningful. > > In the face of abuse, I think the two approaches are very similar. I didn't mean "abuse" in terms of malicious resource hogging. I meant "abuse" in terms of unnecessarily using resources out of laziness.