Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756195AbdLORNI (ORCPT ); Fri, 15 Dec 2017 12:13:08 -0500 Received: from resqmta-ch2-06v.sys.comcast.net ([69.252.207.38]:57162 "EHLO resqmta-ch2-06v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755458AbdLORNE (ORCPT ); Fri, 15 Dec 2017 12:13:04 -0500 Date: Fri, 15 Dec 2017 11:13:00 -0600 (CST) From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: Mathieu Desnoyers cc: Peter Zijlstra , "Paul E. McKenney" , Boqun Feng , Andy Lutomirski , Dave Watson , linux-kernel , linux-api , Paul Turner , Andrew Morton , Russell King , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Andrew Hunter , Andi Kleen , Ben Maurer , rostedt , Josh Triplett , Linus Torvalds , Catalin Marinas , Will Deacon , Michael Kerrisk , Alexander Viro Subject: Re: [RFC PATCH for 4.16 02/21] rseq: Introduce restartable sequences system call (v12) In-Reply-To: <729438855.35910.1513356742518.JavaMail.zimbra@efficios.com> Message-ID: References: <20171214161403.30643-1-mathieu.desnoyers@efficios.com> <12046460.34426.1513275177081.JavaMail.zimbra@efficios.com> <1537392285.34532.1513279478488.JavaMail.zimbra@efficios.com> <20171214212023.GJ3326@worktop> <729438855.35910.1513356742518.JavaMail.zimbra@efficios.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-CMAE-Envelope: MS4wfLnY24XOEvsA6EJj11seE1Zmib49TZJ0FGyKBuESgIdLlDiGCcRRz/LtscpmlI4T6iHnObq0dipEUGuf25sEmdnZMFyxwt1fQCSYsluChynRYJZGOn0L gL1jmfqOzcyixYoMJSPiVQHMbeZJdDfCUY8ST5BX+MUW94RM8337vxHPP2Wbrr+yaW6/f8J2Ez/iOpDqJFRRfpf7mo/3mhswIL7igbbUhjfObHa33veJwkLI fD6sYIQF7wL/Otv5EMyHl+PXDMbUWxT6ewq5xLYt3xdMTQuMH+1YM6HJMXw2N23Pbw+tbElKX928sb16Hbmg534ufC0g0zfiPTtcBjHUGK3inAHJuUEm99UL 1wXyQwoFiHJrnsxHXqzHF3c/nmotwyBx/nBZa13quqB0m5LRYK2Ij1rjNNUakL1zeEvJK63bRlbxBTqr/DGiXOM8C1KbnKl2iiE0EW1pV+9i3jH/wWfiuDUn iYzq8B36xDeT4MS/v5iU/EgTCOa/BLpBWzZz+3wCZ/Gvdd5lJzH77B7ddgkI8VNM0qodeRAE1uHLFozkYA6gHV9O7ZayKE+M6t3K+YWtExHV+BeFz7xOixDO wnWuD/ooyKasHxhHd5Hi6+2iX4pHmDULd5dr7XAjMpeJGoBx+8P5rqp78/MaNg9B4tZKxo1Y7AWzXrv2KBC78bkIxKpOXq51yNnXLPCh/XVvSe8YPrS+1Es7 zpDcm6Sjbq08UDeyYzXkgwvbU/w0oU16G/NKnwH6F1FmKKyjnKV6+rXeRk4HyJhslHuuTbX67rDPghcVP/V0uq4AwlK1ZtK1d6v9oS0/4HCiBw5U7qgBajuQ hK63TRp7WNd9/gE1oaic5wzlD+SxjP7JXztch6e1dJ4Zs7QjU07B2knSDGx3YpEZOQNu0pxTByu9xSk5baw= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 872 Lines: 19 On Fri, 15 Dec 2017, Mathieu Desnoyers wrote: > Another aspect that worries me is applications using the gs segment selector > for other purposes. Suddenly reserving the gs segment selector for use by a > library like glibc may lead to incompatibilities with applications already > using it. fs/gs seems to be reserved for thread local storage. So it would be shared in user space like the corresponding cpu segment register in kernel space where multiple subsystems share %gs. The same can be done in user space. Ulrich Drepper has a writeup on this https://www.akkadia.org/drepper/tls.pdf Savings in execution time could come about because there would not be the need to determine the address of the processor specific memory area in each restartable sequence and there would be memory free of contention for such a sequence in order f.e. to realize fast counters.