Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp2930918pxy; Mon, 3 May 2021 11:08:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyClUSMIgluFqkXJNCVfn74np4T1N9iMm8JFQ9yBd7LSvVadV5zq0lLnbjnR98Xh4P+Meun X-Received: by 2002:a63:cc57:: with SMTP id q23mr19481071pgi.357.1620065309614; Mon, 03 May 2021 11:08:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620065309; cv=none; d=google.com; s=arc-20160816; b=JCpC9Q/GRNmlDiswcnKVBe+o1R2JewtbZsI9fnEI7+InH7PcWOEMoQOAsCKYeq3cpj IxWF5fSxAzr1CBOLKvBcnAoCQ3lqnm+vF2hoORfJ7DpHDi+/c6SewQJu9BWP3WHvxQ+d PK778RvFmdWi2wDjHKbJC/LfEz6kI685x7qwizs+vEOTzL1380KwCtFsFx2Gzs2isspy nW8JtymBA/uPpHKGGE5SQ+lG3KQQ2lzrRX8ys8xINCSc5V27dP6Uoa0JrGw7tJFvwKdn npw1zRbSH1/flMto08AS53Q5fXqoLYvAsxFktTxlWsC+/S6jvLjddGV/RKGNZRIQCe2+ 1sqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=ffFCAR2cXSWF5mqx4pWMJSVc5PKfjZLjCWyRA8EWt54=; b=u6JZeW+IfYYklVDUHp+6MRSd6wuO0GfGoXPM+V3sb+LqkAXIrRHHO1XcPG3gBUk5Hy 0JqJZ6yHqXtX57Sut7vY+hbSu/FyuOLBjMee5wqf3DL+xbBXIaTJaoZilf/A/mpD6dqJ Qatp4oJV6DeXtc5jv0q9tYgeuHodH+RyeiJ8r5d/8SyBWBdSYNTzV/8IJ848JfkLfoXf mZ1c+hbSnHRCPBkCKmfZmkwAsllG2fy3J/p+NdIS0/Siyrv5WI1HDvkxuKVeimBJ9H8F gc4r3OESLsVHkoUEXsWMPe4pb2HyYrmm64Mxry9eKsRhonvsF3nY3fGTim+lqzG4OIv2 s0+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IYqsmSj1; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i21si394381pgl.235.2021.05.03.11.08.16; Mon, 03 May 2021 11:08:29 -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=@redhat.com header.s=mimecast20190719 header.b=IYqsmSj1; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234412AbhECNsY (ORCPT + 99 others); Mon, 3 May 2021 09:48:24 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:60850 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232195AbhECNsX (ORCPT ); Mon, 3 May 2021 09:48:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620049650; 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: in-reply-to:in-reply-to:references:references; bh=ffFCAR2cXSWF5mqx4pWMJSVc5PKfjZLjCWyRA8EWt54=; b=IYqsmSj1v4jQKS43jp/N07gcwrws6l/joPcFrDN3z/Yjdh0Wdfg1TbPzA5JQCWxCat4Rm6 3qlRIy6M5IKIxp6Ier1aB9O5nZ5amkF4rkM+GEAh7IoviH6nOjPFLVd4NKQK0XknKbhcck V4eFJUoE+1wQaEERIrEYozDIXYHcQps= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-417-ZyAwS0FwNY6r27RJmlOW4w-1; Mon, 03 May 2021 09:47:26 -0400 X-MC-Unique: ZyAwS0FwNY6r27RJmlOW4w-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CA111801817; Mon, 3 May 2021 13:47:24 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-112-137.ams2.redhat.com [10.36.112.137]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 812925C22A; Mon, 3 May 2021 13:47:21 +0000 (UTC) From: Florian Weimer To: Dave Hansen Cc: Len Brown , Borislav Petkov , Willy Tarreau , Andy Lutomirski , "Bae, Chang Seok" , 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 References: <20210415044258.GA6318@zn.tnic> <20210415052938.GA2325@1wt.eu> <20210415054713.GB6318@zn.tnic> <20210419141454.GE9093@zn.tnic> <20210419191539.GH9093@zn.tnic> <20210419215809.GJ9093@zn.tnic> <87bl9s8kfb.fsf@oldenburg.str.redhat.com> <5d3d513b-77d6-e2e2-779e-ff3ea33deba3@intel.com> Date: Mon, 03 May 2021 15:47:34 +0200 In-Reply-To: <5d3d513b-77d6-e2e2-779e-ff3ea33deba3@intel.com> (Dave Hansen's message of "Mon, 3 May 2021 06:43:54 -0700") Message-ID: <87zgxc53pl.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Dave Hansen: > On 5/2/21 10:18 PM, Florian Weimer wrote: >>> 5. If the feature is enabled in XCR0, the user happily uses it. >>> >>> For AMX, Linux implements "transparent first use" >>> so that it doesn't have to allocate 8KB context switch >>> buffers for tasks that don't actually use AMX. >>> It does this by arming XFD for all tasks, and taking a #NM >>> to allocate a context switch buffer only for those tasks >>> that actually execute AMX instructions. >> What happens if the kernel cannot allocate that additional context >> switch buffer? > > Well, it's vmalloc()'d and currently smaller that the kernel stack, > which is also vmalloc()'d. While it can theoretically fail, if it > happens you have bigger problems on your hands. Not sure if I understand. Is your position that the kernel should terminate processes if it runs out of memory instead reporting proper errors, even if memory overcommit is disabled? Kernel stack allocation is different because it happens at system call, so errors can be properly reported. Thanks, Florian