From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8BFD5C04FF3 for ; Fri, 21 May 2021 23:08:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6A47E613F7 for ; Fri, 21 May 2021 23:08:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229952AbhEUXKA (ORCPT ); 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-Google-Smtp-Source: ABdhPJz59tFl2JedBJdKQuvAxGnRnXSbBKjuAYr4ZJ+ZGgcO0cKxoWDx1nXECGA/WM7zSzC5xh31AtBS1GAUhdLE/ro= 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-api@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.