From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) by sourceware.org (Postfix) with ESMTPS id 10FEC386FC29 for ; Fri, 21 May 2021 23:08:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 10FEC386FC29 Received: by mail-ej1-f49.google.com with SMTP id lz27so32676542ejb.11 for ; Fri, 21 May 2021 16:08:35 -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=uS/ZJL1gd5/Epa1zWevyPEnL8yTsTzh2nr7EgTLzIgoWhP/7770Phzu44neC3CQA0I O0RqJbJ+bnHpKKZ7/besu47fOH/hsEGXTx6P8SVMFaQQg4DKK+bLkdZh2rJ6jjDAL6aB jeBBiqBGSQXM7f7fybhkmw4Kie4mpEtujPpiiB+RvVGiw3KqNQZHS3R94swkXulwpkJb 9GKDy5s4FvgUBFlIEEuAdwX+zhcPdcE8NMHmdyC0bAXNwA/CalaAqs7ENP/8s/ottogC oHBszG9irKo1anZ+qHBO9cd0qV3s18WJXfj0ucdCD4ojc6xiOEVN07Js4y+8AYYREkK7 vntA== X-Gm-Message-State: AOAM5323PN62y59JwQvDG3ZUZfq1ZP5ceeo0olzTrTFox3QV/jYSMv77 AOoIRFxHUv5NLqP8iRPbs3mJnxej6ij2zJi6wBI= 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" X-Spam-Status: No, score=-1.2 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_H3, RCVD_IN_MSPIKE_WL, 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: Fri, 21 May 2021 23:08:36 -0000 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.