From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH v4 1/5] getcpu_cache system call: cache CPU number of running thread Date: Mon, 29 Feb 2016 11:35:06 +0100 Message-ID: <20160229103506.GJ6356@twins.programming.kicks-ass.net> References: <1456270120-7560-1-git-send-email-mathieu.desnoyers@efficios.com> <2053850250.10158.1456582501604.JavaMail.zimbra@efficios.com> <20160227145809.GD6356@twins.programming.kicks-ass.net> <1401667361.10273.1456617236327.JavaMail.zimbra@efficios.com> <1082926946.10326.1456619994590.JavaMail.zimbra@efficios.com> <1538518747.10504.1456669948568.JavaMail.zimbra@efficios.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1538518747.10504.1456669948568.JavaMail.zimbra-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Mathieu Desnoyers Cc: Linus Torvalds , Ben Maurer , Thomas Gleixner , Ingo Molnar , Russell King , linux-api , Andrew Morton , Michael Kerrisk , Dave Watson , rostedt , Andy Lutomirski , Will Deacon , "Paul E. McKenney" , Chris Lameter , Andi Kleen , Josh Triplett , Paul Turner , Linux Kernel Mailing List , Catalin Marinas , Andrew Hunter , "H. Peter Anvin" List-Id: linux-api@vger.kernel.org On Sun, Feb 28, 2016 at 02:32:28PM +0000, Mathieu Desnoyers wrote: > The part of ABI I'm trying to express here is for discoverability > of available features by user-space. For instance, a kernel > could be configured with "CONFIG_RSEQ=n", and userspace should > not rely on the rseq fields of the thread-local ABI in that case. Per the just proposed interface; discoverability would end with: thread_local_abi_register(NULL, TLA_ENABLE_RSEQ, 0); failing. This would indicate your kernel does not support (or your glibc failed to register, depending on error code I suppose). Then your program can either fall back to full atomics or just bail.