From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0ED1C4742C for ; Tue, 3 Nov 2020 02:20:50 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 137972225E for ; Tue, 3 Nov 2020 02:20:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="MEzefkt1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 137972225E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 312536B005C; Mon, 2 Nov 2020 21:20:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 24D2D6B005D; Mon, 2 Nov 2020 21:20:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 114656B0068; Mon, 2 Nov 2020 21:20:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0172.hostedemail.com [216.40.44.172]) by kanga.kvack.org (Postfix) with ESMTP id D58A86B005C for ; Mon, 2 Nov 2020 21:20:48 -0500 (EST) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 80723181AEF07 for ; Tue, 3 Nov 2020 02:20:48 +0000 (UTC) X-FDA: 77441503776.29.pipe41_0413db9272b5 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin29.hostedemail.com (Postfix) with ESMTP id 62163180868D1 for ; Tue, 3 Nov 2020 02:20:48 +0000 (UTC) X-HE-Tag: pipe41_0413db9272b5 X-Filterd-Recvd-Size: 4295 Received: from hqnvemgate24.nvidia.com (hqnvemgate24.nvidia.com [216.228.121.143]) by imf23.hostedemail.com (Postfix) with ESMTP for ; Tue, 3 Nov 2020 02:20:47 +0000 (UTC) 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== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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