Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp142159pxb; Mon, 2 Nov 2020 16:43:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJyxNwjR4looGDK0lnnUPKXygnP4WZWuUWR0BVa3bZbSVMnGsYvrYbhe1FKAUZ73WCYBeV1a X-Received: by 2002:aa7:d7c1:: with SMTP id e1mr19183707eds.4.1604364238252; Mon, 02 Nov 2020 16:43:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604364238; cv=none; d=google.com; s=arc-20160816; b=cuCyW2a7n5ys7PccUocLqPspopVxdqDFLmWpME0e5h2a1660fj58mGTTl4vJMnESMd 66udJ134E0YLjNV62O1E82hZzfB4KleyUaxnbS0gnBtNWng54VLk1Qo3eYBuzk+G6YVN WQlhFVCX2y95dhW3J1PCpfvX4vzjKBbGGzEhXXBOX3QPY3hiFMjMVGkfSof9bH5PxbEW CA1xqQFPRqoEtF64PJ48cFgFAEzS9K8qXRg7Rm/o0mr7VwohqDZqBC2c/Mbl64gRf+XU aoTw4DNMJ+PGVb9MuLAeHkEQ9uEMPs28u5GS/EjXM1zJA0hiyLl0lEOX2HhzaWWa2wgt DR8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature :dkim-signature:date; bh=G2AF0U76zm2s2iriIo7aiBnmjx967MYt2Q1XmrP87dI=; b=rVPO/dg6eHi19YSltnDZQ/xMJ1Q448FzElgSDmoE/YHIrkkSoy/gWKd36+DU96ZMuq SuRqyxt9BfJKBK28PPqvK5uxp/7Ct3aJ1ZekmfXwQBLivKE/C+n2WEpDtTg6wU62C/Mk aAGc9aVVjFy4tyvGg2GUk5/dcVnIGuy+j80MlxBBCuPV3OmFfD/XuJ2GAMQkbrVXdmPp NXJ2RgBzAO277N0OVFvppFCUWgqic97dTTQzz0q/umG7Wq4r7r7SJ79JNOGBiwUoyIR7 9Pa8gq+poYrM8vIsi+U0oqJV6SjA8mjmTvOXw+1HrYWyr/0oooXTR052VUZB7hUwdhfo gYMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=jEugjslv; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x4si7769808edv.297.2020.11.02.16.43.35; Mon, 02 Nov 2020 16:43:58 -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=@linutronix.de header.s=2020 header.b=jEugjslv; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726216AbgKCAlh (ORCPT + 99 others); Mon, 2 Nov 2020 19:41:37 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:34226 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725883AbgKCAlg (ORCPT ); Mon, 2 Nov 2020 19:41:36 -0500 Date: Tue, 3 Nov 2020 01:41:33 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1604364094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=G2AF0U76zm2s2iriIo7aiBnmjx967MYt2Q1XmrP87dI=; b=jEugjslvw9QOrtTL2Do5SiV7/CyTvmgbZSYkHWTDz32HsOFZROrs4eadYsnDoc0CdyKJfn qvOeHQyAUbDimOg8wvNIA8kR93DHki/4cOfNFnrilQVgUAilussv9ciVWAdUudBeBUxXz5 in5g42A6GoUKgo+GOy9PENlGsZeLHeSCdYjH+aaiADhFyTQbgdCgCqfhSiw0t83VuB2All NRsLwWIMzA5/bTY6qUMw8AkPMtlvRLf3cNdG4/dVADNV6Op5NPqXiUr4wbVZDUQEJ07OR6 dGUJqWMkchIKLQ1jdRtE24Q9sJ0alekjeahp/ei0ZqlbCV+ZNwg6GGrPSqutaQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1604364094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=G2AF0U76zm2s2iriIo7aiBnmjx967MYt2Q1XmrP87dI=; b=7gpvmw3b9a7Eha27uiUG0YOufYbUMYxwNHj8774DX5syjbP1Q2JYEiLbePoznnwOBMDvEi b6mUyiVAmRVu5HBw== From: "Ahmed S. Darwish" To: Jason Gunthorpe Cc: Peter Xu , linux-kernel@vger.kernel.org, Linus Torvalds , Andrea Arcangeli , Andrew Morton , "Aneesh Kumar K.V" , Christoph Hellwig , Hugh Dickins , Jan Kara , Jann Horn , John Hubbard , Kirill Shutemov , Kirill Tkhai , Leon Romanovsky , Linux-MM , Michal Hocko , Oleg Nesterov , Peter Zijlstra , Ingo Molnar , Will Deacon , Thomas Gleixner , Sebastian Siewior Subject: Re: [PATCH v2 2/2] mm: prevent gup_fast from racing with COW during fork Message-ID: <20201103004133.GD52235@lx-t490> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201103002532.GL2620339@nvidia.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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... > > Exactly. '*_seqcount_t_*' is a seqlock.h implementation detail, and it > > has _zero_ relevance to what is discussed in this thread actually. > > Add some leading __'s to them? > It's a bit more complicated than just adding some "__" prefixes, due to the massive compile-time polymorphism done through _Generic(). The '*_seqcount_t_*' format was the best we could come up with to distinguish (again, for internal seqlock.h code) between macros taking all seqcount_LOCKNAME_t types, and macros/functions taking only plain seqcount_t. Thanks, -- Ahmed S. Darwish Linutronix GmbH