Received: by 10.192.165.156 with SMTP id m28csp1097222imm; Mon, 16 Apr 2018 14:06:58 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+GIw1H6cV1gR3MbzwXiGTPwwFirCzI2fIVBiokx7VkkVJ12Z1pYPdRS3PYXbnxv0Dyh6WL X-Received: by 10.99.159.25 with SMTP id g25mr13847832pge.288.1523912818562; Mon, 16 Apr 2018 14:06:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523912818; cv=none; d=google.com; s=arc-20160816; b=SHfu1qYOGft5yD0cRIq/t9JiiVg0uQbhc86MrGSq039iSwWanead8y90CgrQvaYHZl yCtgD9dNCJRoSVJd93QL1rrttWDnAXvO4oyciKWPW/u1hLzG11LY3jHrCpwKIoDBgjTP UORjvKi3RfwVrOSDb8PqUUxkrIKFQuz83P5M2Opry4/2bL8gVCYN8Kvwxy/5o8g3H5+U a8t5Oq9uid7eQ/9gD8QfnxbTRH1WzqIMscVUH6wQ1vQMN3Dn3pWQq0Oyrl7ICYSeyXPc /9eDnSXJhn01v71oYaTb0qtsN+dqSg15dwafo1R1va7ParGL7xe020MsIJ9Zh/YvKt8h ofqw== 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=B7XAT+2r15Hz7QLAXz8H8ohUYaC5B7cxv6J1ZOohG4Q=; b=F5gK6qLSDvLFuNYsGzgucQkjrtSBnlxXfaEARnmePF0ssd3AYzTAGWx1DJSTKmZ4L5 GXCnLFIHNE56mrrUHmLEiT4hWCbupmgnkIjqXXOKp8PlCqbl5b7llyTeAEpmbdJal5jp fvyjl73lUq6rFdr86CfyfCeAeJNNEItz8AwN2lkjpDWoTotB+xlNebreCih0hb6am/Z+ bhzJEMWe1AhhHwiiI/iLyajjrcotgToIKwDNDqVT6YCgpu12dliG2PAZ9YqoQCDMk7hO MtyyDDctxe5i6WiB8z0wkEfOw/yS9au7JpmSB20jJDU36ioUIQHHwdgapG2ejSUVluUS wp2Q== 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 n185si5094604pga.151.2018.04.16.14.06.13; Mon, 16 Apr 2018 14:06:58 -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 S1751489AbeDPU6l (ORCPT + 99 others); Mon, 16 Apr 2018 16:58:41 -0400 Received: from mail.efficios.com ([167.114.142.138]:52046 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751099AbeDPU6j (ORCPT ); Mon, 16 Apr 2018 16:58:39 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id F0BF81B155D; Mon, 16 Apr 2018 16:58:38 -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 maPv9-BlhgTP; Mon, 16 Apr 2018 16:58:38 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 3BAB61B1556; Mon, 16 Apr 2018 16:58:38 -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 s5955dQ4dxqa; Mon, 16 Apr 2018 16:58:38 -0400 (EDT) Received: from mail02.efficios.com (mail02.efficios.com [167.114.142.138]) by mail.efficios.com (Postfix) with ESMTP id 1F5951B154F; Mon, 16 Apr 2018 16:58:38 -0400 (EDT) Date: Mon, 16 Apr 2018 16:58:37 -0400 (EDT) From: Mathieu Desnoyers To: Linus Torvalds Cc: Andy Lutomirski , Peter Zijlstra , "Paul E. McKenney" , Boqun Feng , 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: <1248652824.11527.1523912317964.JavaMail.zimbra@efficios.com> In-Reply-To: References: <20180412192800.15708-1-mathieu.desnoyers@efficios.com> <20180412192800.15708-13-mathieu.desnoyers@efficios.com> <542721578.11358.1523903708510.JavaMail.zimbra@efficios.com> <435471300.11403.1523906479091.JavaMail.zimbra@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: RuF2OosSEg2Wu4cnvUvTkLUnST/FrQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- On Apr 16, 2018, at 3:26 PM, Linus Torvalds torvalds@linux-foundation.org wrote: > On Mon, Apr 16, 2018 at 12:21 PM, Mathieu Desnoyers > wrote: >> >> And I try very hard to avoid being told I'm the one breaking >> user-space. ;-) > > You *can't* be breaking user space. User space doesn't use this yet. > > That's actually why I'd like to start with the minimal set - to make > sure we don't introduce features that will come back to bite us later. > > The one compelling use case I saw was a memory allocator that used > this for getting per-CPU (vs per-thread) memory scaling. > > That code didn't need the cpu_opv system call at all. > > And if somebody does a ldload of a malloc library, and then wants to > analyze the behavior of a program, maybe they should ldload their own > malloc routines first? That's pretty much par for the course for those > kinds of projects. > > So I'd much rather we first merge the non-contentious parts that > actually have some numbers for "this improves performance and makes a > nice fancy malloc possible". > > As it is, the cpu_opv seems to be all about theory, not about actual need. I fully get your point about getting the minimal feature in. So let's focus on rseq only. I will rework the patchset so the rseq selftests don't depend on cpu_opv, and remove the cpu_opv stuff. I think it would be a good start for the Facebook guys (jemalloc), given that just rseq seems to be enough for them for now. It should be enough for the arm64 performance counters as well. Then we'll figure out what is needed to make other projects use it based on their needs (e.g. lttng-ust, liburcu, glibc malloc), and whether jemalloc end up requiring cpu_opv for memory migration between per-cpu pools after all. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com