Received: by 10.192.165.156 with SMTP id m28csp838764imm; Mon, 16 Apr 2018 09:29:57 -0700 (PDT) X-Google-Smtp-Source: AIpwx49ZEj7VqwWr4Mje2L3dVH9adF0WZBySl8HTLNiAwZL3mw0we/YcemAs+jHRa8EkIHqwq1k2 X-Received: by 10.99.121.194 with SMTP id u185mr4484969pgc.409.1523896197737; Mon, 16 Apr 2018 09:29:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523896197; cv=none; d=google.com; s=arc-20160816; b=I4+mJ1SLPmesvhAOQezeIlQ4fSPsdAPV/p1e7T9bJWgTkvbTQ/Q4cM5S7cTLBPSgpk LvCNPNxp9sq0MysSxQ5oQpuSs9y17LC3Rk2OS69uT0/9M6A+UjVpZzpAH+SA42PS9xwX GgScIqA3Cyd0+dFCVvA+b/mpfFtvrXtUWaXMQdGzS0KAyN4WoBIFg2Hnh8OnR1TnJvd5 jg888p0sE2nd3WFfycK1S6z4ksJ7w3oEamh6AKTHcpMaVlNYmL9SYl3p9iteIBwyYoC8 rlYaPuSTBhCyufQKQgMmRer63cOIW836//78SmhrIa5uFTnF+cwQiy9njnKe72fEmXZL ilgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:arc-authentication-results; bh=BBcK502jjyNH0hHP5i9gZbneQjzoU94E3uQsVEeML1Q=; b=jjFbfmrLD+3PGXcgkcvuuk5Afib/yVMRMjExk1mnzR3NFDD6GnWFW0a2fLH6zMWCzF TSuf6RpFxbEQaUtyURXeYVCo4+x6bwV5Rg5FHDuzSwDczVWFWNzH+LcbT6bthju4xTpQ zBPzdqq7BQBoB2Z2780bbujZr06yMB1c3k68EcoBI1v14yKx4QvEIf0G1ds5VwuYtKZw LARqNGh0zn+JKPK3gH5Uk2U55BiUL7419njK78MJXekFWi/cHJeg/BmW71wfSOm8HhAm Yx9QiBryk6IEAdF0PupcepOEg63QcvKLrU3VH2I1t2dmcMf8mLUbrfY3Bx6nlKw0mC0p OIKw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b17-v6si6950584plz.469.2018.04.16.09.29.43; Mon, 16 Apr 2018 09:29:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752900AbeDPQ2T (ORCPT + 99 others); Mon, 16 Apr 2018 12:28:19 -0400 Received: from mail.efficios.com ([167.114.142.138]:39470 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752850AbeDPQ2Q (ORCPT ); Mon, 16 Apr 2018 12:28:16 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id E0CDD1B0376; Mon, 16 Apr 2018 12:28:15 -0400 (EDT) Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail02.efficios.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id cu-mkeKyo978; Mon, 16 Apr 2018 12:28:15 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 2489C1B036D; Mon, 16 Apr 2018 12:28:15 -0400 (EDT) X-Virus-Scanned: amavisd-new at efficios.com Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail02.efficios.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 1oOh6r4GZnUw; Mon, 16 Apr 2018 12:28:15 -0400 (EDT) Received: from mail02.efficios.com (mail02.efficios.com [167.114.142.138]) by mail.efficios.com (Postfix) with ESMTP id 0ADA31B0363; Mon, 16 Apr 2018 12:28:15 -0400 (EDT) Date: Mon, 16 Apr 2018 12:28:14 -0400 (EDT) From: Mathieu Desnoyers To: Andi Kleen Cc: Linus Torvalds , 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 , Chris Lameter , Ben Maurer , rostedt , Josh Triplett , Catalin Marinas , Will Deacon , Michael Kerrisk Message-ID: <751033048.11156.1523896094938.JavaMail.zimbra@efficios.com> In-Reply-To: <20180412202302.xnw5jdl3upl46ywt@two.firstfloor.org> References: <20180412192800.15708-1-mathieu.desnoyers@efficios.com> <20180412192800.15708-13-mathieu.desnoyers@efficios.com> <20180412202302.xnw5jdl3upl46ywt@two.firstfloor.org> Subject: Re: [RFC PATCH for 4.18 12/23] cpu_opv: Provide cpu_opv system call (v7) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [167.114.142.138] X-Mailer: Zimbra 8.8.7_GA_1964 (ZimbraWebClient - FF52 (Linux)/8.8.7_GA_1964) Thread-Topic: cpu_opv: Provide cpu_opv system call (v7) Thread-Index: AzbF3m/WdYsw0+uAgSYGs70R/e7CfQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- On Apr 12, 2018, at 4:23 PM, Andi Kleen andi@firstfloor.org wrote: >> Can we plan on merging just the plain rseq parts *without* this all >> first, and then see the cpu_opv thing as a "maybe future expansion" >> part. > > That would be the right way to go. I doubt anybody really needs cpu_opv. > We already have other code (e.g. vgettimeofday) which cannot > be single stepped, and so far it never was a problem. Single-stepping is only a subset of the rseq limitations addressed by cpu_opv. Anoher major limitation is algorithms requiring data migration between per-cpu data structures safely against CPU hotplug, and without having to change the cpu affinity mask. This is the case for memory allocators and userspace task schedulers which require cpu_opv for migration between per-cpu memory pools and scheduler runqueues. About the vgettimeofday and general handling of vDSO by gdb, gdb's approach only takes care of line-by-line single-stepping by hiding Linux' vdso mapping so users cannot target source code lines within that shared object. However, it breaks instruction-level single-stepping. I reported this issue to you back in Nov. 2017: https://lkml.org/lkml/2017/11/20/803 Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com