Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp750361pxk; Thu, 17 Sep 2020 15:29:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLr6X27eGfAY00oltFd2polrXP3I8N+sFNFxH/vHeevJ/Dg4j4yVQDPRTBl5shfVshVtqa X-Received: by 2002:a05:6402:1bc2:: with SMTP id ch2mr34566294edb.60.1600381779772; Thu, 17 Sep 2020 15:29:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600381779; cv=none; d=google.com; s=arc-20160816; b=D5qL+CIgFtisFtY8+BCi9763kHVO49W4y7swDANjW0RHzsU22OG1rFkp3t1FQq5YU1 slxs2TAqNGSXFpFwS3RpnxanlQ2h+IyNHuwFo1DnzR4AjG0fvJSoPoCa87hPG7P2BZVT rqhoeEKY4vdhok5LuNxdjbUIGQm5zsSVLngZlppC6ccZbIFgkcVpJDhsyr6FUx3YTMp6 3Z4pplEJBm3Oy6V33OgwcNa5WPX2TdU3EMiVRWL3w5K4wlhKp2izte21DzngXvJasBl1 rUpDNBvmqQB3a6Cv+pMZC82dppgi0H4zN2ZaH5dbGX2Phu2mBcY4byffYgIQMULmT1Im IXCw== 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=RRAUbmInUiqP/WbwfvunToW9UzvahCwMncy+b1qkhqg=; b=1KBmoowKJ8yjSCocMyZxcOqf2Mw03GCbbDSnutYUASSEarLh9Gamxqjl+V1Qxg4X8N lCXkV/o2B+EEvAYhCVymxHfOPFDLsvKzwLqjCM8UyQSG2YhRKdBwu6TV7bzyt2R9Bk2k ZJjXLoXE2IyeJ8KjVHNKyBGw+bCWyX9qC6UJscSfEeeQGVycp747Gapnf56BikXEtm2j wqkCIrAyapMHtMjvdYdjB/Bow+j17GWDJHj3SORIZmp6GU1TURDWi6431hxPARGop1ce wcwwFoBB3DcFokqYvGTH83lDEwpRz3HQN10XEo60exQI6cwCmLDfZqp4JpYEIhxN5Yrv HmMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=YYkU5m9X; 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 h22si884922ejd.367.2020.09.17.15.29.16; Thu, 17 Sep 2020 15:29:39 -0700 (PDT) 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=YYkU5m9X; 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 S1725858AbgIQWZ4 (ORCPT + 99 others); Thu, 17 Sep 2020 18:25:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725886AbgIQWZ4 (ORCPT ); Thu, 17 Sep 2020 18:25:56 -0400 Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C21A5C06174A for ; Thu, 17 Sep 2020 15:25:55 -0700 (PDT) Received: by mail-lj1-x244.google.com with SMTP id c2so3366481ljj.12 for ; Thu, 17 Sep 2020 15:25:55 -0700 (PDT) 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=RRAUbmInUiqP/WbwfvunToW9UzvahCwMncy+b1qkhqg=; b=YYkU5m9XeRDXjzSEnA7vwi17L60Cp0ziRma2cQ2SDktGTHyJtA9I4Eb6RpHtyVg7jk 59G0u2LYoMx7A8D30rKwm69ZapWlw5WtVN1JuqByirafx7lSoCfc6YLIkK3gkJdnrpBO em2p6bmd9TNWAhmT9CLMEIzr1qSmxB384cbak= 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=RRAUbmInUiqP/WbwfvunToW9UzvahCwMncy+b1qkhqg=; b=k12R99gZemT8yFWJXrRcEvQIf9Cc3xkydHW+9mQjqyNK8LHzlFTbMTIJtky+IrPZtv x8o8XnZ6hDkC6TXQ4h/ZlhdzQiNoRe+0IOmKNvERaMc/16KnrYrJ1oYgjg0W4mtnIzk4 5fIPKdHn+s2C3fp37sBeF2aD5UaIjY0/WQxfgJZa83kr58n0mAwPzzfGUh+fyL4d3odR y93IHXppOF7UsZXbsGX9r3U/Ml9vUNUJAFwh9c2KQOc5vG1pW87Vf9kmAEMgJM5tvpSj d+kmXGWS2kse3Ummn9Zvm4pKjW+oscfGINI4/Vq+iEw+f0/bDsNj2OG0SzYXDPRYLxxG XCyw== X-Gm-Message-State: AOAM530qGWl79iDJmzOGq1j6jINHIJebglZ54dcxEnzTS/gpPsMig3G+ REyahptM+Woo/tvwFNDvnLsH9gi3v//vdw== X-Received: by 2002:a2e:7410:: with SMTP id p16mr10119644ljc.156.1600381553835; Thu, 17 Sep 2020 15:25:53 -0700 (PDT) Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com. [209.85.167.44]) by smtp.gmail.com with ESMTPSA id j20sm176201lfe.181.2020.09.17.15.25.51 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Sep 2020 15:25:52 -0700 (PDT) Received: by mail-lf1-f44.google.com with SMTP id d15so3907048lfq.11 for ; Thu, 17 Sep 2020 15:25:51 -0700 (PDT) X-Received: by 2002:a19:521a:: with SMTP id m26mr11015777lfb.133.1600381551270; Thu, 17 Sep 2020 15:25:51 -0700 (PDT) MIME-Version: 1.0 References: <20200916174804.GC8409@ziepe.ca> <20200916184619.GB40154@xz-x1> <20200917112538.GD8409@ziepe.ca> <20200917181411.GA133226@xz-x1> <20200917190332.GB133226@xz-x1> <20200917200638.GM8409@ziepe.ca> <20200917214059.GA162800@xz-x1> <20200917220900.GO8409@ziepe.ca> In-Reply-To: <20200917220900.GO8409@ziepe.ca> From: Linus Torvalds Date: Thu, 17 Sep 2020 15:25:35 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/4] mm: Trial do_wp_page() simplification To: Jason Gunthorpe Cc: Peter Xu , John Hubbard , Leon Romanovsky , Linux-MM , Linux Kernel Mailing List , "Maya B . Gokhale" , Yang Shi , Marty Mcfadden , Kirill Shutemov , Oleg Nesterov , Jann Horn , Jan Kara , Kirill Tkhai , Andrea Arcangeli , Christoph Hellwig , Andrew Morton Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 17, 2020 at 3:09 PM Jason Gunthorpe wrote: > > My advice for this -rc fix is to go with a single bit in the mm_struct > set on any call to pin_user_pages* Ack, except make sure it's a byte rather than a bitfield that could have races. Or even just a separate atomic_t. Keep it simple ans stupid and obvious. As you say, we can aim for cleanups later, make it obvious and reliable right now. Linus