Received: by 10.192.165.156 with SMTP id m28csp2395651imm; Thu, 12 Apr 2018 13:37:00 -0700 (PDT) X-Google-Smtp-Source: AIpwx4957hLiYST6M597XrzrMCbdSxZwjCebuJtuhP1XST1QbFm0qnqs9jCTNL10gN7ynGED9fNU X-Received: by 10.101.77.67 with SMTP id j3mr1879542pgt.210.1523565420671; Thu, 12 Apr 2018 13:37:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523565420; cv=none; d=google.com; s=arc-20160816; b=w8OqrN8tE6sxugVfOjV5jaFcEK/0ol6TsCx/QzTt5OOWcBs9WUMel3ZAqcW7mj/hOR p38TgrIyfmjYcadNhcen8ck2tPZQH+8PeCBK3H+3WdC6A2rzqHfBOBs4OBbhEa0gDT0B ZP5p4DcsebNNTn2ItX7xA1yaOMppKG+t4l6daoE27B2ro+883zihpFtxyK7gMRjFZ4SU MXFemaVtX/p/d3F8Sg+iDEhZysp/DrlQUdWCszjYpz/E/bjLFtC+MNbp+uiVT+nrX16z 3miLedbR1+G7o46CvlmECGz/B/kexx2yx2HTNqUJG4k2t3c/4NhCShpDAPmJVk0irdAO zCLg== 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=wM9kU/2p99VFEZnJc2pWM0iPhYB9Ssz83ETRsrFEIds=; b=oW4qEihW0X76VRaKKw2zJ/EGi3pvUHEgC+lOG89PqMSlY/c3fTQBbPYG4WHMa21yhF 2fkIfG/mDpvF5K8w+m60GxfNki/+tP0XprZ3q6sL84HWKrKVVX+HoXv6SjDs2uUka4YO 5hUSfLCww0YXy8vq9Q70TQI1eFbycIcT9M/Hpjuw8rQ8AiyZSmFqRYA4SD8WNmSSXNfm NVzo4nKqh+FHhIADITYxJIs0L2LDuc10+ux+Ou8ew1M9hBu963qZCKisEYfP9Ew67Q8z vxBQU9bMb552QQXzo/+eWcN5maBdJYLEpkn4bq69d88CtR4N1HUHIhs/P9m43qwQp4Z8 ib6A== 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 t10si1506317pgr.548.2018.04.12.13.36.46; Thu, 12 Apr 2018 13:37:00 -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 S1753328AbeDLT7a (ORCPT + 99 others); Thu, 12 Apr 2018 15:59:30 -0400 Received: from mail.efficios.com ([167.114.142.138]:47798 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752821AbeDLT72 (ORCPT ); Thu, 12 Apr 2018 15:59:28 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 1745B1B0EE7; Thu, 12 Apr 2018 15:59:28 -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 6jkW7viX7gDe; Thu, 12 Apr 2018 15:59:27 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 4B6C31B0EDB; Thu, 12 Apr 2018 15:59:27 -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 0YIFuByPymy2; Thu, 12 Apr 2018 15:59:27 -0400 (EDT) Received: from mail02.efficios.com (mail02.efficios.com [167.114.142.138]) by mail.efficios.com (Postfix) with ESMTP id 2CF661B0ED2; Thu, 12 Apr 2018 15:59:27 -0400 (EDT) Date: Thu, 12 Apr 2018 15:59:27 -0400 (EDT) From: Mathieu Desnoyers To: Linus Torvalds 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 , Chris Lameter , Ben Maurer , rostedt , Josh Triplett , Catalin Marinas , Will Deacon , Michael Kerrisk Message-ID: <1580648199.9463.1523563167045.JavaMail.zimbra@efficios.com> In-Reply-To: References: <20180412192800.15708-1-mathieu.desnoyers@efficios.com> <20180412192800.15708-13-mathieu.desnoyers@efficios.com> 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: waubI5rPDESSVglebr9CwnpMfIO0/w== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- On Apr 12, 2018, at 3:43 PM, Linus Torvalds torvalds@linux-foundation.org wrote: > On Thu, Apr 12, 2018 at 12:27 PM, Mathieu Desnoyers > wrote: >> The cpu_opv system call executes a vector of operations on behalf of >> user-space on a specific CPU with preemption disabled. It is inspired >> by readv() and writev() system calls which take a "struct iovec" >> array as argument. > > Do we really want the page pinning? > > This whole cpu_opv thing is the most questionable part of the series, > and the page pinning is the most questionable part of cpu_opv for me. What are your concerns about page pinning ? Do you have an alternative approach in mind ? > 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. The main problem with the incremental approach is that it won't deal with remote CPU data accesses, and won't deal with cpu hotplug in non-racy ways. For *some* of the use-cases, the other issues solved by cpu_opv can be worked-around in user-space, at the cost of making the userspace code a mess, and in many cases slower than if we can rely on cpu_opv for the fallback. All the rseq test-cases depend on cpu_opv as they stand now. Without cpu_opv to handle the corner-cases, things become much more messy on the user-space side. Thanks, Mathieu > > I think that would make Andy happier too. > > Linus -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com