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=-3.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 BD01BC388F9 for ; Mon, 2 Nov 2020 23:18:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 28AA922268 for ; Mon, 2 Nov 2020 23:18:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="mRP53UFQ"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="yfbdBEdU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 28AA922268 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4F4416B005C; Mon, 2 Nov 2020 18:18:32 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4A5CA6B005D; Mon, 2 Nov 2020 18:18:32 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 36CCC6B0068; Mon, 2 Nov 2020 18:18:32 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0051.hostedemail.com [216.40.44.51]) by kanga.kvack.org (Postfix) with ESMTP id 014896B005C for ; Mon, 2 Nov 2020 18:18:31 -0500 (EST) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 90CEC181AEF09 for ; Mon, 2 Nov 2020 23:18:31 +0000 (UTC) X-FDA: 77441044422.16.price37_231743a272b3 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin16.hostedemail.com (Postfix) with ESMTP id 6FD5C100E6903 for ; Mon, 2 Nov 2020 23:18:31 +0000 (UTC) X-HE-Tag: price37_231743a272b3 X-Filterd-Recvd-Size: 3892 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by imf10.hostedemail.com (Postfix) with ESMTP for ; Mon, 2 Nov 2020 23:18:30 +0000 (UTC) Date: Tue, 3 Nov 2020 00:18:21 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1604359108; 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=yVJlgI2Jg2jaYgAMQidX6deypd1QfekkTNPC7CxbpzQ=; b=mRP53UFQTqDKOQYHH0J/Ll3N7qtXQL4HgQwnaphvUQbnJ8ZZByCQJhsGiIMZpQLpH4Knw3 xK9nWzlpLqN1w+8DpL2+KjTsKSnDeLUL/xDrsqn483LUJQtAc7JtbKBnPZTUVdj+/mxg7y sXtuZQwLQrnfrXUUresWpyNAgUiH3O1Sd8N5j2hoVuW92ohCd0HG88DwcWUCX7WfasW1YH gQ0VUirYVADtovgEE8ajyC0ERY9e89HKHek9q2ChpTTwFzd1lag6AlUoEFU2YCQKc20dp1 EdKseBelNT3FQSKfr2nFbvYSCin+6EA8ak1oVd5sIfSSp+hYJui3CMyUGXZEgQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1604359108; 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=yVJlgI2Jg2jaYgAMQidX6deypd1QfekkTNPC7CxbpzQ=; b=yfbdBEdU/ow879IuX+su1cP+Z7unJs/HOWIARjR8Nr0VrMZTbrpHwBWdoNAQY9v0bF2gJS VDhc9OyqRHVAHyAg== From: "Ahmed S. Darwish" To: Linus Torvalds 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 Subject: Re: [PATCH v2 0/2] Add a seqcount between gup_fast and copy_page_range() Message-ID: <20201102231821.GA51715@lx-t490> References: <0-v2-dfe9ecdb6c74+2066-gup_fork_jgg@nvidia.com> <20201102221945.GA48454@lx-t490> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Mon, Nov 02, 2020 at 02:39:49PM -0800, Linus Torvalds wrote: > 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. > Sure, and this is one of the reasons the lockdep non-preemptibility check is only added to the non-raw variants of the seqcount write APIs. Presumably, users of the raw_*() part of the API know what they're doing, and they don't need to read seqlock.rst :) (I'm in progress of replying to patch #2, which touches a bit on this and other points).. > Linus Thanks, -- Ahmed S. Darwish Linutronix GmbH