Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp85624pxb; Mon, 2 Nov 2020 14:49:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJzSNPnvAawLsJZ15QYlFL5M7brcj336HErMq2MK2BrB4MNcQKWk6wDoQhbtxTBGC977xQOK X-Received: by 2002:a05:6402:22d9:: with SMTP id dm25mr18590252edb.182.1604357389738; Mon, 02 Nov 2020 14:49:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604357389; cv=none; d=google.com; s=arc-20160816; b=lwNFxoClQJCNvb1AAjDp9RvIGnkVWHQNinlKTlwdwYhsajMZjUYDW0ybTngyv7u5JR VGMGBD3wgL+nWVq0FUJKAQ3zCPTtw6JeCJ81tv/qVGPe3CB9Rhu5NB2w3E8vsADN0EXn jd0v1oxQK90b5U/bp0ZEaPVhxJuiszMSC+Crp7aaEyDSqgiQeofjjHuI0ffv4W49c779 +vJQRMdjoJbvJd34CqsDWWps3+qTflMy9VFvfm5CNttPInfHz/C/QzpCd1t2yV91KE23 /5WuhOXaxQdoCDmEArAxYHe48hVT7PLjzQV8LtVRTrRxLfefEwoaFEQim4Wp1dYQ2sjf nDZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=bHmrWcB28t+p1qKGTaL2HwJFTWqvAXTmNpjEsdlRDSE=; b=pjwsdIMddwfaakKWJrrZ/4gweV019eMJNNfTawayjPMflOnHH5bAyDWqOsZVQme5oK b0HxZgRTetIWa+5LrNPMuznoqP6desPIu75qmHhOjFeZh3pUDwmBHu3dTPKs78GS9lBx FMAhHOIJRdDK62zOxNNBy323qe3ayModRny6xR9cyoPStpZ23qFv2BU+EPWMMNHzpLI6 T0y7ETnYfi4Tl9Ar/08l4nFvd3ICUJRXdNDo9FLaj7q2OUUFU0/Cz4tHcsIPvFw8MZib QZLDIuOrB1OOuzZG2/7hjHp+PMcc+IM8W1q6dbzwCOcZiwwi3MHnaFiLyKg/KVfAw8O+ ijUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=gGhY1uNS; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v21si5002248ejx.104.2020.11.02.14.49.27; Mon, 02 Nov 2020 14:49:49 -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=@linux-foundation.org header.s=google header.b=gGhY1uNS; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726671AbgKBWpO (ORCPT + 99 others); Mon, 2 Nov 2020 17:45:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725807AbgKBWpN (ORCPT ); Mon, 2 Nov 2020 17:45:13 -0500 Received: from mail-ed1-x544.google.com (mail-ed1-x544.google.com [IPv6:2a00:1450:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88CA7C0617A6 for ; Mon, 2 Nov 2020 14:45:13 -0800 (PST) Received: by mail-ed1-x544.google.com with SMTP id a71so10653518edf.9 for ; Mon, 02 Nov 2020 14:45:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bHmrWcB28t+p1qKGTaL2HwJFTWqvAXTmNpjEsdlRDSE=; b=gGhY1uNSf4FP1azS+0gtexs5ubkXNa6Y+X7/tw2Rv6kI7Jb4bqOpZSey7J8MCytmWU Dzx3AACL1k96LPYIlaBioCuTT67IXwmj9ctOIIngGob1aBPlGWw4qfHho8eVCygiy7NI QTwEz2+eUWEYh8NsUyFUf0cKZQzyyiQI0IaLo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bHmrWcB28t+p1qKGTaL2HwJFTWqvAXTmNpjEsdlRDSE=; b=qImAlT+0cNoeapNKhiNmKCqTuF+kkTsoiCjtOM+8DCMfkv7qt6fhdryP1i7sRijx0L UC08sf5dM/LGKXsgXoX06VOzmr/W9Io67uvRHJR/AEbP/wr/04u2pLb8uowU/hSn1WZ1 QX7wsE4g5pqc12do9QASgVL61F93DQEf9FADglDXzSnoOYa3i3CbrCv9q3KkOgPvlIDC LGNOUp4gltaatqEaI3k/cglo3GiVihOZDnBYskBrxe3rhDuDy5by/6WT70LULiorAu3R zaBMxhOW75vT45KyvlfSK0P94ZiCX12dTNBOdPY2QD6uTIXLRJIKqpHRVJIhlMLL6G88 NbkQ== X-Gm-Message-State: AOAM53066JzBPOpAlOOia+idKr1P+Pb7a0v+BgBLgdampSR/t5NRjTCz zg9jA+V6rtjHxMpKneIHQXAv5fsVwLCdbg== X-Received: by 2002:a50:fb18:: with SMTP id d24mr19400960edq.43.1604357111263; Mon, 02 Nov 2020 14:45:11 -0800 (PST) Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com. [209.85.208.42]) by smtp.gmail.com with ESMTPSA id mc2sm3886316ejb.1.2020.11.02.14.45.10 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 Nov 2020 14:45:11 -0800 (PST) Received: by mail-ed1-f42.google.com with SMTP id a71so10653442edf.9 for ; Mon, 02 Nov 2020 14:45:10 -0800 (PST) X-Received: by 2002:ac2:52ad:: with SMTP id r13mr6025281lfm.534.1604356805454; Mon, 02 Nov 2020 14:40:05 -0800 (PST) MIME-Version: 1.0 References: <0-v2-dfe9ecdb6c74+2066-gup_fork_jgg@nvidia.com> <20201102221945.GA48454@lx-t490> In-Reply-To: <20201102221945.GA48454@lx-t490> From: Linus Torvalds Date: Mon, 2 Nov 2020 14:39:49 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 0/2] Add a seqcount between gup_fast and copy_page_range() To: "Ahmed S. Darwish" Cc: Jason Gunthorpe , Linux Kernel Mailing List , Peter Xu , 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 2, 2020 at 2:19 PM Ahmed S. Darwish wrote: > > Disabling preemption for seqcount_t write-side critical sections was > never a new requirement. It has always been this way, for the reasons > explained at Documentation/locking/seqlock.rst, "Introduction" section. Note that that is only true if you spin on the reading side (either of the two kinds of spinning: (a) spinning to wait for it to become even, or (b) repeating if they don't match) Which this code doesn't do, it just fails. I'm not sure how to perhaps document that. Linus