From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752895AbdKTSlB (ORCPT ); Mon, 20 Nov 2017 13:41:01 -0500 Received: from mail.efficios.com ([167.114.142.141]:45306 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751914AbdKTSk7 (ORCPT ); Mon, 20 Nov 2017 13:40:59 -0500 Date: Mon, 20 Nov 2017 18:42:00 +0000 (UTC) From: Mathieu Desnoyers To: Thomas Gleixner Cc: Peter Zijlstra , "Paul E. McKenney" , Boqun Feng , Andy Lutomirski , Dave Watson , linux-kernel , linux-api , Paul Turner , Andrew Morton , Russell King , Ingo Molnar , "H. Peter Anvin" , Andrew Hunter , Andi Kleen , Chris Lameter , Ben Maurer , rostedt , Josh Triplett , Linus Torvalds , Catalin Marinas , Will Deacon , Michael Kerrisk Message-ID: <326295786.18485.1511203320323.JavaMail.zimbra@efficios.com> In-Reply-To: References: <20171114200414.2188-1-mathieu.desnoyers@efficios.com> <20171114200414.2188-9-mathieu.desnoyers@efficios.com> <1766414702.18278.1511194398489.JavaMail.zimbra@efficios.com> Subject: Re: [RFC PATCH v3 for 4.15 08/24] Provide cpu_opv system call MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [167.114.142.141] X-Mailer: Zimbra 8.7.11_GA_1854 (ZimbraWebClient - FF52 (Linux)/8.7.11_GA_1854) Thread-Topic: Provide cpu_opv system call Thread-Index: xYJjpcOH6ekWDDURi0qn6Er8eHojog== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- On Nov 20, 2017, at 1:03 PM, Thomas Gleixner tglx@linutronix.de wrote: > On Mon, 20 Nov 2017, Thomas Gleixner wrote: >> On Mon, 20 Nov 2017, Mathieu Desnoyers wrote: >> > >> + * The reason why we require all pointer offsets to be calculated by >> > >> + * user-space beforehand is because we need to use get_user_pages_fast() >> > >> + * to first pin all pages touched by each operation. This takes care of >> > > >> > > That doesnt explain it either. >> > >> > What kind of explication are you looking for here ? Perhaps being too close >> > to the implementation prevents me from understanding what is unclear from >> > your perspective. >> >> What the heck are pointer offsets? >> >> The ops have one or two pointer(s) to a lump of memory. So if a pointer >> points to the wrong lump of memory then you're screwed, but that's true for >> all pointers handed to the kernel. > > So I think you mix here the 'user space programmer guide - how to set up > the magic ops - into the kernel side documentation. The kernel side does > not care about the pointers, as long as they are valid to access. > > Again. Try to explain things at the conceptual level. Yes, I took the sentence you suggested for that reason: it removes usage details that are meant for user-space implementer, which do not belong in those comments. Thanks, Mathieu > > Thanks, > > tglx -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com