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.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 6093BC18E5B for ; Tue, 17 Mar 2020 14:18:23 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 350212051A for ; Tue, 17 Mar 2020 14:18:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="RmOqUe+R" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 350212051A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 93E596E1E6; Tue, 17 Mar 2020 14:18:19 +0000 (UTC) Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by gabe.freedesktop.org (Postfix) with ESMTPS id 86C436E4C9 for ; Mon, 16 Mar 2020 19:59:25 +0000 (UTC) Received: by mail-qt1-x842.google.com with SMTP id l20so15397304qtp.4 for ; Mon, 16 Mar 2020 12:59:25 -0700 (PDT) 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:user-agent; bh=EAEH/7t5ubtIMhw4ZTeVgjQSlcx5QOWTPoLF4PtWhvw=; b=RmOqUe+R4l5H6YpqEib1W4LfA1h1/OZym/f9ehFr0qPoTlxgBeLu6AJhJEmNnQN1Dj VE0p9XlPU1CSB+PhFNJXeVAL1LDo4nVZlApvnbIOxbw+r/nV9Gg6fFNKzOdwP2Rv+Tcn jO4CyQOKGxDjCENXESz3JqP8SloGlWtsxFs4A+S9T2ZlNyxyjePg81CckrADJ18xntlN aHclWcT2nw64C3P/y74znOjO+t0uMLoSAJuwol49hiClFZErw7yVlf364WCNiDmO2nJm W+hBIi0t5YKyy6lPGMloSf+ZExCMZJ+fh4fYcxzQVhaJT+DK5PvzuCPkceNPvN3cAj8p AGog== 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:user-agent; bh=EAEH/7t5ubtIMhw4ZTeVgjQSlcx5QOWTPoLF4PtWhvw=; b=KHIecAmusIRCkM/olj0cVESddz/a+Ck5v9y0j5irW1yMVh7jaAnmCY2Du2hQh5ltBj 6y3P0UIzhAkxzyVYXK2FFHcE+8ZISRW2Aab4AfQITw2LjN95paWDD3Z2pU9WCfeN8qLg diYYnsw7rEXqKmqX+7HFlvIQenvdlW8fFBK1DmWGZpBFqeb69a+LdX2yWRRTanr9bKOI v0w3Ij8O9QMa5CtOCvZjiba9ml1dQbRwrwqifaL87KDTNijLupYx+CYOcQ4KDS9e99dD myNZmDML1d5ORZe8lljewEFfB+hb4QcZz7GHslrhWLP+lDsU6snuIMlnyza9Az4+k/Iw eodA== X-Gm-Message-State: ANhLgQ1p9MOK2t8PlRj2NodBzohLLoEkEpkcwGWKLV1tDK/MGN3kN7tf x59DHPmTN09mqQ1L29/bPlM+LQ== X-Google-Smtp-Source: ADFU+vtbRUKVYcUI2Gq+ZWCB4v8nheFcrqCqLhbHdThlbs4ZekZNUobGzi4WVSGLSw/oM8Fkr1QlJA== X-Received: by 2002:ac8:7396:: with SMTP id t22mr1961185qtp.182.1584388764690; Mon, 16 Mar 2020 12:59:24 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-68-57-212.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.68.57.212]) by smtp.gmail.com with ESMTPSA id x22sm488565qki.54.2020.03.16.12.59.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Mar 2020 12:59:24 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1jDvtT-00078y-K3; Mon, 16 Mar 2020 16:59:23 -0300 Date: Mon, 16 Mar 2020 16:59:23 -0300 From: Jason Gunthorpe To: Christoph Hellwig Subject: Re: [PATCH 3/4] mm: simplify device private page handling in hmm_range_fault Message-ID: <20200316195923.GA26988@ziepe.ca> References: <20200316193216.920734-1-hch@lst.de> <20200316193216.920734-4-hch@lst.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200316193216.920734-4-hch@lst.de> User-Agent: Mutt/1.9.4 (2018-02-28) X-Mailman-Approved-At: Tue, 17 Mar 2020 14:16:40 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: amd-gfx@lists.freedesktop.org, nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org, kvm-ppc@vger.kernel.org, Bharata B Rao , linux-mm@kvack.org, Jerome Glisse , Ben Skeggs , Dan Williams , Christian =?utf-8?B?S8O2bmln?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Mon, Mar 16, 2020 at 08:32:15PM +0100, Christoph Hellwig wrote: > diff --git a/mm/hmm.c b/mm/hmm.c > index 180e398170b0..cfad65f6a67b 100644 > +++ b/mm/hmm.c > @@ -118,15 +118,6 @@ static inline void hmm_pte_need_fault(const struct hmm_vma_walk *hmm_vma_walk, > /* We aren't ask to do anything ... */ > if (!(pfns & range->flags[HMM_PFN_VALID])) > return; > - /* If this is device memory then only fault if explicitly requested */ > - if ((cpu_flags & range->flags[HMM_PFN_DEVICE_PRIVATE])) { > - /* Do we fault on device memory ? */ > - if (pfns & range->flags[HMM_PFN_DEVICE_PRIVATE]) { > - *write_fault = pfns & range->flags[HMM_PFN_WRITE]; > - *fault = true; > - } > - return; > - } Yes, this is an elegant solution to the input flags. However, between patch 3 and 4 doesn't this break amd gpu as it will return device_private pages now if not requested? Squash the two? Jason _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel