From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 103990 invoked by alias); 16 Jan 2017 11:35:03 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 103958 invoked by uid 89); 16 Jan 2017 11:35:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=H*r:AES128-SHA X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-wm0-f67.google.com Received: from mail-wm0-f67.google.com (HELO mail-wm0-f67.google.com) (74.125.82.67) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 16 Jan 2017 11:35:01 +0000 Received: by mail-wm0-f67.google.com with SMTP id c85so29958835wmi.1; Mon, 16 Jan 2017 03:35:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=+DacSWID1uo7R7+ZBd3UFmc1cIFrDA/JNv/02kZ8QUE=; b=LddlnVqGNA5OvzkNKveA+6U9oygqS5XXejpzvQ1iQDq2WZX1Mau2zPQ+Rz7wryBInV Ra3ey6oA36coJvu53roy9cEjsb44juS4aC3wyvhzQWYBNR6pf1Mh/AAPHPKNEDnnhoTE Ns55Fs3hpXPjh+4S9c2Dm8pDX+IGyqRLqrOT9zISpVprt9IZtO/0zDt5apMRQcz2Z1c7 7uU2Owr8R1HBlDpvhTiPrawNRGpfFp3S46iNIayqt5/hDeNM1M/qjU2+Og8m0G/a4hhy SHx6LazxxcYD36hYMr2iMogt++eTkofLLWNYylRMDm5PZzDAhHcEkYF9kK43hDaBBgGu cJ+w== X-Gm-Message-State: AIkVDXJcJ6KFuhhgBIjNUMT1Cta1vTRAruKIzxRnvEMDEbcNJ/h8/yu/a045qd1XEE6N4w== X-Received: by 10.28.156.86 with SMTP id f83mr10937427wme.93.1484566499067; Mon, 16 Jan 2017 03:34:59 -0800 (PST) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id c132sm22794558wme.21.2017.01.16.03.34.52 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Mon, 16 Jan 2017 03:34:58 -0800 (PST) Date: Mon, 16 Jan 2017 11:35:00 -0000 From: Yao Qi To: Dave Martin Cc: linux-arm-kernel@lists.infradead.org, Ard Biesheuvel , Marc Zyngier , Alan Hayward , Christoffer Dall , linux-arch@vger.kernel.org, libc-alpha@sourceware.org, Florian Weimer , Joseph Myers , Szabolcs Nagy , Torvald Riegel , gdb@sourceware.org Subject: Re: [RFC PATCH 06/10] arm64/sve: Disallow VL setting for individual threads by default Message-ID: <20170116113439.GF28060@E107787-LIN> References: <1484220369-23970-1-git-send-email-Dave.Martin@arm.com> <1484220369-23970-7-git-send-email-Dave.Martin@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1484220369-23970-7-git-send-email-Dave.Martin@arm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2017-01/txt/msg00017.txt.bz2 On 17-01-12 11:26:05, Dave Martin wrote: > General-purpose code in userspace is not expected to work correctly > if multiple threads are allowed to run concurrently with different > vector lengths in a single process. > > This patch adds an explicit flag PR_SVE_SET_VL_THREAD to request > this behaviour. Without the flag, vector length setting is > permitted only for a single-threaded process (which matches the > expected usage model of setting the vector length at process > startup). Hi Dave, PR_SVE_SET_VL_THREAD can be arch-independent, IMO, because prctl needs a scope. Looks some of them are system-wide, some of them are about threads within the same process (like, PR_MPX_ENABLE_MANAGEMENT). IOW, PR_SVE_SET_VL_THREAD can be general flag, to indicate the scope of each new ptrcl command is per-thread. I happen to see PR_SET_FP_MODE in man pages, which is about setting FP register modes in runtime. It is a little similar to setting VL in this patch. However the doc doesn't mention the effect or the scope of this command. -- Yao (齐尧)