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=-5.8 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 1FDD8C433DB for ; Wed, 13 Jan 2021 23:57:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BF52A22460 for ; Wed, 13 Jan 2021 23:57:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729501AbhAMXzv (ORCPT ); Wed, 13 Jan 2021 18:55:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729601AbhAMXuZ (ORCPT ); Wed, 13 Jan 2021 18:50:25 -0500 Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8187BC061385 for ; Wed, 13 Jan 2021 15:39:39 -0800 (PST) Received: by mail-qk1-x731.google.com with SMTP id 143so4693347qke.10 for ; Wed, 13 Jan 2021 15:39:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=bVM8PSQASGB9YKywzUCM8V5VzV6PKuh9sY20nc50KSA=; b=UGcubavSPOsHT7uXGBHVmPUf2TOiqp5e7vGxfcQE1zBt+eqXF2BNg3w2d7jTas6PIh x+4RlJdWItO0N3Li7lxSJWyc4HUEDNTT11UJUq+qQJNjkZeDTsvUokracKZ2i89pMKab tLvnt23vzpJpA4ALgXyvUnAHPHn4EznPq8zQUFE6VUvYOKF2+4epiLF8K4shiqBEoioy N3iQhhWYLKy5jUsYTVjMF86/pbB/qODacqA3en/HvqqCWGz/3we7VuJtZfdKMnbeaXo9 ZHphQM9b6Q5qsKc+qlETWtFIdeKYv0xqtNGcP5UwjYsEGzz419s4Mu8IyLDExMu5/N7C vlcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=bVM8PSQASGB9YKywzUCM8V5VzV6PKuh9sY20nc50KSA=; b=unTyrw/YxbPtGMEpECSRvn1N8Qlu0ys0V+b8lC8tOCA5O/24vFplOFq2ceTfO+antY ReopxwMsw9l8XFQNgsPaYqZOOiEHzRrmek2KFFndIjwjdJF1KbFOjCuGihjCl9NyC5M1 m+qC1kW9O4QvocCjJX4TBELx0c/HOsz5ZnijcxKKi8K2i1Ot32zJ+fhA5K4kgLXrK/Y+ 3LqJRq2hD4SRPGxcJvf0jjI27VZ5Y+l/63Z12ZAi6ONGzq3q7lonNNlgZt/DZHNoUFe+ jCLmF85AcGxQVNUvjS5BtrzSI6huuGKRpXX07GCQGSkWloglAfyik2a2SfNpTLOXzSOd zt4w== X-Gm-Message-State: AOAM533BhVcgljAbfC7oxglTrpYZL7g23pVArS7EXfbci8S37yeagxh2 HzzZRz1Q2wuoMjRe8j/Ii8XJrw== X-Google-Smtp-Source: ABdhPJxmwZhxjI4npvHDNwscdTYWjSGmpv5m5qP95pAKhhXrZD5gA10c/i3bjEUoWSUf7fsEEDZNtA== X-Received: by 2002:a37:642:: with SMTP id 63mr4738273qkg.123.1610581178769; Wed, 13 Jan 2021 15:39:38 -0800 (PST) Received: from ziepe.ca ([206.223.160.26]) by smtp.gmail.com with ESMTPSA id x49sm2049268qtx.6.2021.01.13.15.39.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jan 2021 15:39:38 -0800 (PST) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1kzpjk-000hrf-Un; Wed, 13 Jan 2021 19:39:36 -0400 Date: Wed, 13 Jan 2021 19:39:36 -0400 From: Jason Gunthorpe To: Jerome Glisse Cc: Andrea Arcangeli , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Yu Zhao , Andy Lutomirski , Peter Xu , Pavel Emelyanov , Mike Kravetz , Mike Rapoport , Minchan Kim , Will Deacon , Peter Zijlstra , Linus Torvalds , Hugh Dickins , "Kirill A. Shutemov" , Matthew Wilcox , Oleg Nesterov , Jann Horn , Kees Cook , John Hubbard , Leon Romanovsky , Jan Kara , Kirill Tkhai Subject: Re: [PATCH 0/2] page_count can't be used to decide when wp_page_copy Message-ID: <20210113233936.GE4605@ziepe.ca> References: <20210107200402.31095-1-aarcange@redhat.com> <20210107202525.GD504133@ziepe.ca> <20210108133649.GE504133@ziepe.ca> <20210108181945.GF504133@ziepe.ca> <20210109004255.GG504133@ziepe.ca> <20210113215638.GA528828@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210113215638.GA528828@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 13, 2021 at 04:56:38PM -0500, Jerome Glisse wrote: > is a broken model and the way GPU use GUP is less broken then RDMA. In > GPU driver GUP contract with userspace is that the data the GPU can > access is a snapshot of what the process memory was at the time you > asked for the GUP. Process can start using different pages right after. > There is no constant coherency contract (ie CPU and GPU can be working > on different pages). Look at the habana labs "totally not a GPU" driver, it doesn't work that way, GPU compute operations do want coherency. The mmu notifier hackery some of the other GPU drivers use to get coherency requires putting the kernel between every single work submission, and has all kinds of wonky issues and limitations - I think it is net worse approach than GUP, honestly. Jason