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=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 C42CEC433DF for ; Thu, 4 Jun 2020 02:19:46 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 39260207D0 for ; Thu, 4 Jun 2020 02:19:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="L3Tf9HJx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 39260207D0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 99ED98000D; Wed, 3 Jun 2020 22:19:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 94F948000C; Wed, 3 Jun 2020 22:19:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 817168000D; Wed, 3 Jun 2020 22:19:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0097.hostedemail.com [216.40.44.97]) by kanga.kvack.org (Postfix) with ESMTP id 6A5578000C for ; Wed, 3 Jun 2020 22:19:45 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 21B15180AD804 for ; Thu, 4 Jun 2020 02:19:45 +0000 (UTC) X-FDA: 76889923530.28.pail46_1ae29f1c9f151 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin28.hostedemail.com (Postfix) with ESMTP id 04A036D64 for ; Thu, 4 Jun 2020 02:19:45 +0000 (UTC) X-HE-Tag: pail46_1ae29f1c9f151 X-Filterd-Recvd-Size: 6314 Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) by imf11.hostedemail.com (Postfix) with ESMTP for ; Thu, 4 Jun 2020 02:19:44 +0000 (UTC) Received: by mail-lj1-f195.google.com with SMTP id c11so5316324ljn.2 for ; Wed, 03 Jun 2020 19:19:44 -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=JSiOcm/ZPiReT8td5p9ER31x1RSLcUe1DlDavodT30Q=; b=L3Tf9HJxWcDd+EaxOl1S681h3xlukvF1E2k5jOnzoF+mdpNKNKbp0A3oq6PIEBNZEc urx45BwY11EW0vNvZq+7pucdAhUWMhIXWew75kCQq/Z+EKqKIlKiIJLo1BxcTCkU2+tH i7YpJAOYj+itvYqRgYOiIixLvU7Ik8aIF5T8w= 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=JSiOcm/ZPiReT8td5p9ER31x1RSLcUe1DlDavodT30Q=; b=MhEp4QN37E5dhFkIiLQR17ZKEpNeU0YHRgLL7rOLfdLGlBgEi+Vg7ZRTbG6eFF8JtU Kk+7vG6PreVX6AJHQtn7EBgjDYIVSZs1u8wPIyx70EsLNipBlLS6fmc+52o8kvVMH7m3 8dNeDeax7iXu6RV8o6XN08KdvGZN6K0ndci2q4hqnPUQ5j4Bhow389KNW8kUVlLD7RDN hXNXg/RYLKfD2U0s3obVsoSim5Ob8ydCyPfNO1N5LWtMsk0m9qAabGHtvV+DCzuBNdWH mKxzZAh6SJxRmYaC7c/bkYJJKBB/aNJR1sxkApadP9d8aALLT1If2eug5+SEOvaCfzf1 C2AA== X-Gm-Message-State: AOAM531OgGVf1gkSurKObs69kAq5Yia7vkvXbbBR46wWS/YbWc1+WU5Y MGq/aZvux3xwAfukGTcrmL4aZFe9v1c= X-Google-Smtp-Source: ABdhPJyrNXL3OBeAZnz82hxSVEYbRNYKqspHcF08rF/60vVX4hzolgNOkF+twEnqfCCyAMT/AI+7tw== X-Received: by 2002:a2e:8255:: with SMTP id j21mr946481ljh.85.1591237181708; Wed, 03 Jun 2020 19:19:41 -0700 (PDT) Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com. [209.85.208.170]) by smtp.gmail.com with ESMTPSA id m11sm1351243lfj.9.2020.06.03.19.19.40 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 03 Jun 2020 19:19:40 -0700 (PDT) Received: by mail-lj1-f170.google.com with SMTP id y11so3643718ljm.9 for ; Wed, 03 Jun 2020 19:19:40 -0700 (PDT) X-Received: by 2002:a2e:b5d9:: with SMTP id g25mr1023658ljn.285.1591237179998; Wed, 03 Jun 2020 19:19:39 -0700 (PDT) MIME-Version: 1.0 References: <20200603155549.e041363450869eaae4c7f05b@linux-foundation.org> <20200603225630.dODblpnlR%akpm@linux-foundation.org> In-Reply-To: <20200603225630.dODblpnlR%akpm@linux-foundation.org> From: Linus Torvalds Date: Wed, 3 Jun 2020 19:19:23 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [patch 004/131] mm/gup: refactor and de-duplicate gup_fast() code To: Andrew Morton Cc: Dave Airlie , Chris Wilson , Daniel Vetter , Jani Nikula , jhubbard@nvidia.com, Joonas Lahtinen , jrdr.linux@gmail.com, Linux-MM , matthew.auld@intel.com, mm-commits@vger.kernel.org, Rodrigo Vivi , tvrtko.ursulin@intel.com, Matthew Wilcox Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 04A036D64 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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 Wed, Jun 3, 2020 at 3:56 PM Andrew Morton wrote: > > From: John Hubbard > Subject: mm/gup: refactor and de-duplicate gup_fast() code > > There were two nearly identical sets of code for gup_fast() style of > walking the page tables with interrupts disabled. This has lead to the > usual maintenance problems that arise from having duplicated code. Andrew, this is actually an example of why you absolutely should *not* rebase your series in the middle of the development tree. Now you've rebased it on top of my commit 17839856fd58 ("gup: document and work around "COW can break either way" issue") and in the process you broke the result completely for read-only pages. Now it uses FOLL_WRITE (because that's what internal_get_user_pages_fast() does), which will disallow read-only pages (in order to handle them properly for COW in the slow path), and then the fact that the slow-path is entirely disabled for this case means that it doesn't work at all. This "rebase onto whatever random base Linus has today" absolutely has *got* to stop. It's not ok for git trees, but it's not ok for these patch-queues either. It means that all the testing your patch queue got in linux-next is completely worthless, because what you send me is something very different from what was tested. Exactly as with the git trees, where I tell people constantly not to rebase their patches. Give me a base that it has been tested on, and a series that has actually been tested. Not this "rebased for your convenience" thing. I'd _much_ rather get a merge conflict when your patch series changes something that somebody else also changed. Because then I know something clashed, and if I screw up the merge, I only have myself to blame. If it's a very complex merge, I'll ask for help. That would be much better than getting a patch-bomb with 131 patches that all _look_ sane and build cleanly, but can be randomly broken because they got rebased hours before with no testing. The "let me fix things up onto a daily snapshot" really is a completely broken model. You are making it _harder_ for me, not easier, because now I have to look for subtle issues in every single commit rather than the big honking clue of "oh, I got a merge error, I'll need to really look at it". It so happened that with this one, I was very aware of the rebase, because you rebased on a patch that I wrote so when I looked through the patches I went "Hmm.." What about all the other times when I wouldn't have noticed and been so aware of what changed recently? Again: merge conflicts are *much* better than silently rebasing and hiding problems. Linus