Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp188651pxb; Mon, 2 Nov 2020 18:22:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJzamwXOitpbNTEtY+TxtPzI8LvQmYap0fCELsaVH5wRMqMWwOR6rE3u3k/etlrMkSXxygJ2 X-Received: by 2002:aa7:d690:: with SMTP id d16mr19207313edr.329.1604370152991; Mon, 02 Nov 2020 18:22:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604370152; cv=none; d=google.com; s=arc-20160816; b=wjJIbTO0DEBvaSWrzMVfdiRN3SXXb9SZSG3FOUsalw1J1fjPAnqVJSAF3UknGZDaJx 2Yq1cYP2oBjeIjOZJdSEikB7sMojOpBKDexMu3+1Zp5xXaglcCRtb1GL+QPGR6uFUoYO GZBRHv4mU1ftmEp5gKrwiNtKUen1csbMaoLHp1Os3sQJBwuMMzCtUgJ04mM5dshROHGM iDOp/41TlYi/LndDJYy1GGeP3SUDmcez+Op85SaVIbX/eJE6BIw6u0rXrEp7NiTLUW+R /Pi28cMeX+Tq0CCIGML1UPepQWMrDokZ4VEH0LJ4NZvgXrD1kjMw0WZe7bByXIHyfgiD Nl5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=SF/P3v4Ixbk7J/UkHQKXKJ3TSXKjJib+eDyvAh6jsJA=; b=Rs100BrXWn0dNYu/PcHD5WKzonty98zKMawpYew3YKPxcpikcI6e+L1XnrftOyvajN AFhgR9ZOu7wARfKalwMoYhdU4rvGk9RmNJsGyppz05vwmDBOsIGSSUwTUNSOKIQYQDuU oHfL4qQn3/Bou1Sn2ElSJKUSt3rJucwdGl/jFLdMIzpf0nN4Z8SkRM78TGVv/fIxyjT9 UVh1jDdzaBulBTFe6lofm2nCXYy7DmWd40vYFugrBIR3UoYFrusVY6FwfnACvKmftI0R NJSQHwTPgAjfxeG+k4dTk/ub6pQ8S6GrLk0ux/OALD+0mYZf0ueqOYoZhfMiW2Q3UlTs EBWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=MEzefkt1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id um17si8773635ejb.701.2020.11.02.18.22.10; Mon, 02 Nov 2020 18:22:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=MEzefkt1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726439AbgKCCUr (ORCPT + 99 others); Mon, 2 Nov 2020 21:20:47 -0500 Received: from hqnvemgate24.nvidia.com ([216.228.121.143]:14360 "EHLO hqnvemgate24.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725982AbgKCCUq (ORCPT ); Mon, 2 Nov 2020 21:20:46 -0500 Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Mon, 02 Nov 2020 18:20:49 -0800 Received: from [10.2.49.167] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 3 Nov 2020 02:20:45 +0000 Subject: Re: [PATCH v2 2/2] mm: prevent gup_fast from racing with COW during fork To: "Ahmed S. Darwish" , Jason Gunthorpe CC: Peter Xu , , "Linus Torvalds" , Andrea Arcangeli , Andrew Morton , "Aneesh Kumar K.V" , Christoph Hellwig , "Hugh Dickins" , Jan Kara , Jann Horn , Kirill Shutemov , Kirill Tkhai , Leon Romanovsky , Linux-MM , Michal Hocko , Oleg Nesterov , Peter Zijlstra , Ingo Molnar , Will Deacon , Thomas Gleixner , Sebastian Siewior References: <0-v2-dfe9ecdb6c74+2066-gup_fork_jgg@nvidia.com> <2-v2-dfe9ecdb6c74+2066-gup_fork_jgg@nvidia.com> <20201030225250.GB6357@xz-x1> <20201030235121.GQ2620339@nvidia.com> <20201103001712.GB52235@lx-t490> <20201103002532.GL2620339@nvidia.com> <20201103004133.GD52235@lx-t490> From: John Hubbard Message-ID: Date: Mon, 2 Nov 2020 18:20:45 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20201103004133.GD52235@lx-t490> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1604370049; bh=SF/P3v4Ixbk7J/UkHQKXKJ3TSXKjJib+eDyvAh6jsJA=; h=Subject:To:CC:References:From:Message-ID:Date:User-Agent: MIME-Version:In-Reply-To:Content-Type:Content-Language: Content-Transfer-Encoding:X-Originating-IP:X-ClientProxiedBy; b=MEzefkt1PnBx1WOH9jrfOAluwkT+KjHfzGPtAXK73U33qCSEyTM5etq70MOzWComl MWLFfn4J2IV/4gVS0pOwbN5GPKgfzmbs5JLyGUI0p4J60FrWUN2EvtuOCjztXWXTj4 WqZR1i/L0M+rZ5HR/80B5fr9f1OxGYdsEzImr4De5PSyGEDF2JdsCvkQE2GPqRDwyY wniaN73M/3ZMK2sWHT7MH6Lt+RYdhpJwrfO5SXNUz/mLDtQLh3EM45b/aWYHD8bFYr Ed8QroBfBjmp2Fus3sux31I3Z6rABf2qlH4OLiDGZ9FKdcoAXD65rD9otkQgNdo7yE dygKXGcWEiCZw== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/2/20 4:41 PM, Ahmed S. Darwish wrote: > On Mon, Nov 02, 2020 at 08:25:32PM -0400, Jason Gunthorpe wrote: >> On Tue, Nov 03, 2020 at 01:17:12AM +0100, Ahmed S. Darwish wrote: >> >>> Please stick with the official exported API: raw_write_seqcount_begin(). >> >> How did you know this was 'offical exported API' ?? >> > > All the official exported seqlock.h APIs are marked with verbose > kernel-doc annotations on top. The rest are internal... > OK, but no one here was able to deduce that, probably because there is not enough consistency throughout the kernel to be able to assume such things--even though your seqlock project is internally consistent. It's just not *quite* enough communication. I think if we added the following it would be very nice: a) Short comments to the "unofficial and internal" routines, identifying them as such, and b) Short comments to the "official API for general use", also identifying those as such. c) A comment about what makes "raw" actually raw, for seqlock. Since I'm proposing new work, I'll also offer to help, perhaps by putting together a small patch to get it kicked off, if you approve of the idea. thanks, -- John Hubbard NVIDIA