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 BD3ADC433E0 for ; Thu, 4 Jun 2020 04:32:12 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1F8B42074B for ; Thu, 4 Jun 2020 04:32:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="H6SyE5sY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1F8B42074B 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 6FD4A28000D; Thu, 4 Jun 2020 00:32:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6AD8F8000E; Thu, 4 Jun 2020 00:32:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 59C2428000D; Thu, 4 Jun 2020 00:32:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0241.hostedemail.com [216.40.44.241]) by kanga.kvack.org (Postfix) with ESMTP id 3FC6B8000E for ; Thu, 4 Jun 2020 00:32:11 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 044FF180AD806 for ; Thu, 4 Jun 2020 04:32:10 +0000 (UTC) X-FDA: 76890257262.24.screw11_12fbadf7fff4e Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id D7D001A4A5 for ; Thu, 4 Jun 2020 04:32:10 +0000 (UTC) X-HE-Tag: screw11_12fbadf7fff4e X-Filterd-Recvd-Size: 4907 Received: from mail-lf1-f68.google.com (mail-lf1-f68.google.com [209.85.167.68]) by imf05.hostedemail.com (Postfix) with ESMTP for ; Thu, 4 Jun 2020 04:32:10 +0000 (UTC) Received: by mail-lf1-f68.google.com with SMTP id 202so2722038lfe.5 for ; Wed, 03 Jun 2020 21:32:10 -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=DooMCrTEOG305HO3IwM0i58DNrNQxCpJEZ8mna1T6aI=; b=H6SyE5sYOZFtmg245eTulTQIdiu9ghSyNm0wedCyMpvTT8cvMwPMT7u/s4b84bEBH/ nlEeXu82liucgUxyJL5jAD3lWONNbhUXl8xuhYCZsPJVOJHAJfAc+1XSpgxD7FWHNad2 BLh5n2LX4f2f6KlMM9ZvBywzWnMx/e8yOYHpM= 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=DooMCrTEOG305HO3IwM0i58DNrNQxCpJEZ8mna1T6aI=; b=NV4Pohb+mI8GjBFqvI8Ql2GP8HBtuSdCkPUQjUQq6i3GOJoHPOfFYXgSpOozHmv1u6 SXikWMA6morIjqyFvaKsgj5nJiJ6+P8lqhOLHRuG0ZXjTc/vYduJiDmAkNMMRl9TIrN8 JeYWHBUNARqScV8rksXyLdcs3Zbo5v1+GqLvOnxjb5Wq6BfsYRtQXOhIFTWBkGaeRZme 8BqXM5j4yweKE+222foE1HI8y2aFQe5ltP9GZqeHu1WVBaAuqIMH+cZ3XdCoPGCHKHF4 n0Uz02hHQaaM2bfjZ8VebV6eWqUp4D6w81FAx99bEnbhYRACm7JsZepR+IL1Wtnv1e+S Gltg== X-Gm-Message-State: AOAM532kpQHAZ8IhgYIn2EI5UwTQd4Oa3J/oSMCa7qsijCy1Zde0asi5 j/AaLjuneJ3wcmSs3vhsaMcJ3XTWVh8= X-Google-Smtp-Source: ABdhPJyV9Al0NrNvMT2AtcfOpmplXg+dLuBnjontAQEx2TEglAckr1sglObI5rd9gyR8rGXjkHz31Q== X-Received: by 2002:a19:c714:: with SMTP id x20mr1429093lff.100.1591245127216; Wed, 03 Jun 2020 21:32:07 -0700 (PDT) Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com. [209.85.208.174]) by smtp.gmail.com with ESMTPSA id a15sm936634ljn.105.2020.06.03.21.32.05 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 03 Jun 2020 21:32:05 -0700 (PDT) Received: by mail-lj1-f174.google.com with SMTP id y11so3896556ljm.9 for ; Wed, 03 Jun 2020 21:32:05 -0700 (PDT) X-Received: by 2002:a2e:7e0a:: with SMTP id z10mr1136856ljc.314.1591245124898; Wed, 03 Jun 2020 21:32:04 -0700 (PDT) MIME-Version: 1.0 References: <20200603155549.e041363450869eaae4c7f05b@linux-foundation.org> <20200603225630.dODblpnlR%akpm@linux-foundation.org> In-Reply-To: From: Linus Torvalds Date: Wed, 3 Jun 2020 21:31:48 -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: D7D001A4A5 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 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 8:19 PM Linus Torvalds wrote: > > I have tried to fix it up, partly by editing the patches directly, and > partly by then trying to fix up comments after-the-fact. The end result passes the smell test, boots for me, and looks like it might work. But I don't have any good real-world test for this, and I hope and assume that John has something GPU-related that actually uses the code and cares. Presumably there was _something_ that triggered those changes to de-duplicate that code? So please give it a look. Because of how I edited the patches (and Andrew edited them before me), what is attributed to John Hubbard isn't really the same as the patch he originally wrote. If I broke something in the process, feel free to let me know in less than polite terms. But it look better than the intermediate situation that definitely looked like it would just fail entirely on any read-only mappings due to not being able to fall back on the slow case. The drm code probably doesn't even care about the possible ambiguity with GUP picking a COW page that might later break the other way. Linus