Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758992AbcDHVZy (ORCPT ); Fri, 8 Apr 2016 17:25:54 -0400 Received: from mail-ig0-f194.google.com ([209.85.213.194]:33570 "EHLO mail-ig0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754756AbcDHVZw (ORCPT ); Fri, 8 Apr 2016 17:25:52 -0400 MIME-Version: 1.0 In-Reply-To: <65466698.51122.1460137589499.JavaMail.zimbra@efficios.com> References: <20151027235635.16059.11630.stgit@pjt-glaptop.roam.corp.google.com> <20160407155312.GA3448@twins.programming.kicks-ass.net> <20160407201156.GC3448@twins.programming.kicks-ass.net> <1802683892.49910.1460077902922.JavaMail.zimbra@efficios.com> <427613474.49955.1460081105607.JavaMail.zimbra@efficios.com> <65466698.51122.1460137589499.JavaMail.zimbra@efficios.com> Date: Fri, 8 Apr 2016 14:25:51 -0700 X-Google-Sender-Auth: S8fSEmk-1cGlMjszf5kwsvAAdnY Message-ID: Subject: Re: [RFC PATCH 0/3] restartable sequences v2: fast user-space percpu critical sections From: Linus Torvalds To: Mathieu Desnoyers Cc: Andy Lutomirski , Peter Zijlstra , "Paul E. McKenney" , Ingo Molnar , Paul Turner , Andi Kleen , Chris Lameter , Dave Watson , Josh Triplett , linux-api , Linux Kernel Mailing List , Andrew Hunter Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1102 Lines: 24 On Fri, Apr 8, 2016 at 10:46 AM, Mathieu Desnoyers wrote: > > By the way, the debugger can always decide to single-step through the > first iteration of the rseq, and then after it loops, decide to skip > single-stepping until the exit points are reached. A _human_ debugger may decide to do that yes. But the the debugger _program_ may not be that smart. For example, let's say that you - as a human - set a few watchpoints. The debugger will use hardware breakpoints for the first few, but in more complex cases the debugger will actually say "oops, no more hw breakpoints, I'll just start single-stepping instead". The human operator may not even be aware that the debugger has gone into that slower mode. Normally it's just slower. But you'd want it to be _only_ slower, not "oops, the program no longer makes any forward progress at all, because a library that the user didn't even know or care about - and never sees, because the single-stepping is all internal = happened to use a code sequence that doesn't work under single-stepping". Linus