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=-3.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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 B95A3C433DF for ; Fri, 21 Aug 2020 12:41:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8241720724 for ; Fri, 21 Aug 2020 12:41:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598013686; bh=F2v5LXwRyl5ExXcb2vop/ComQcWGfSLmhZjsNMtBduc=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=rcKtm7sruOivCv+/nh2mxjdleOvrGntmCobXYZstoM3beRuxFY6xMS+ZlrxbniqSP XkIY32dSO+Loq7GcTlKvehArkXKdlIxUME3OiZea/UMHjMGFkszMiPJj9HWfnKdfi2 l8VOPvAp4d0/Ua5rlBGUTQL0KJ2xOAMa/xNIexsQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728690AbgHUMlZ (ORCPT ); Fri, 21 Aug 2020 08:41:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728622AbgHUMlX (ORCPT ); Fri, 21 Aug 2020 08:41:23 -0400 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4FDDC061385 for ; Fri, 21 Aug 2020 05:41:22 -0700 (PDT) Received: by mail-lj1-x243.google.com with SMTP id h19so1653146ljg.13 for ; Fri, 21 Aug 2020 05:41:22 -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=vQ8YtZUq2JY+BH1jqqQCLSvh1WL0FVc7UY1mYQp2AQM=; b=Ehr1XCOBzdD5uog8ufwc8p/ZeibsGALJ/DPSRGA30L6oGq3HsS0KFwdyYUsug7ybHg uQac9t59HdWh/sctxLtx59MZmp9zKkXTcoNFgYd3aDVl9zN5KUBN1oZjufXKLn1TDuXt Wtw75wC4NFAvIaPTbdwVKS/HWohfj3La+pWL0= 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=vQ8YtZUq2JY+BH1jqqQCLSvh1WL0FVc7UY1mYQp2AQM=; b=Mtb20piS/UYeOZmQxnuNOBxYp+rCpPBcfSvYmivdpGeBUe4n64ut3GNupfXwxubTj5 Mkdef/VbLxDKsKSjusfqIXYD5mKsYTw2Td3AXrvx1GZ7gAjHNg1PK36SLP5tg4Zrp5de edAFHlTN7j779+FyZMr8eDGut66XBTejFgIILhrF3iaMGxPaO2nrRsinkoinxmDjE/Ql 1UnBGoj/NMyKJ7hush34Hz5gMTcfbAwC5DgGX5Aeml6WfUuPB/4JQGwqj6og9ojaajqR nBx5f4BsjEbUOs87aRTLGP7YO+izUcbAu746b6wwP7Z0T04t0l0yMGFFI71au4WXybIb P1eg== X-Gm-Message-State: AOAM533ZYJCzihN8GmauIJcfy5wUjjS02F4451M6F5LluhP9EXR/Zzuq 4wce85qHbhm1wGr5NgE3OiF7q3sJ0nRBMg== X-Google-Smtp-Source: ABdhPJyPdAGMT+EnupUkes03p2cxV44HtW43PeCJVu3GQx5X6BjVk4dg5VFgWKbaoQBoIuZy9o4nSw== X-Received: by 2002:a2e:b6cc:: with SMTP id m12mr1315840ljo.256.1598013680721; Fri, 21 Aug 2020 05:41:20 -0700 (PDT) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com. [209.85.167.50]) by smtp.gmail.com with ESMTPSA id a2sm375612ljj.40.2020.08.21.05.41.19 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 21 Aug 2020 05:41:19 -0700 (PDT) Received: by mail-lf1-f50.google.com with SMTP id b30so833950lfj.12 for ; Fri, 21 Aug 2020 05:41:19 -0700 (PDT) X-Received: by 2002:a19:408d:: with SMTP id n135mr1384989lfa.192.1598013678967; Fri, 21 Aug 2020 05:41:18 -0700 (PDT) MIME-Version: 1.0 References: <20200821085011.28878-1-chris@chris-wilson.co.uk> <20200821085011.28878-2-chris@chris-wilson.co.uk> In-Reply-To: <20200821085011.28878-2-chris@chris-wilson.co.uk> From: Linus Torvalds Date: Fri, 21 Aug 2020 05:41:03 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/4] drm/i915/gem: Sync the vmap PTEs upon construction To: Chris Wilson Cc: Linux Kernel Mailing List , intel-gfx , Linux-MM , Pavel Machek , Andrew Morton , Joerg Roedel , Dave Airlie , Joonas Lahtinen , Rodrigo Vivi , stable Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 21, 2020 at 1:50 AM Chris Wilson wrote: > > Since synchronising the PTE after assignment is a manual step, use the > newly exported interface to flush the PTE after assigning via > alloc_vm_area(). This commit message doesn't make much sense to me. Are you talking about synchronizing the page directory structure across processes after possibly creating new kernel page tables? Because that has nothing to do with the PTE. It's all about making sure the _upper_ layers of the page directories are populated everywhere.. The name seems off to me too - what are you "flushing"? (And yes, I know about the flush_cache_vmap(), but that looks just bogus, since any non-mapped area shouldn't have any virtual caches to begin with, so I suspect that is just the crazy architectures being confused - flush_cache_vmap() is a no-op on any sane architecture - and powerpc that mis-uses it for other things). Linus 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=-3.9 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 53449C433DF for ; Fri, 21 Aug 2020 12:41:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0E9A620724 for ; Fri, 21 Aug 2020 12:41:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="Ehr1XCOB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0E9A620724 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 AC7278D0050; Fri, 21 Aug 2020 08:41:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A77248D0006; Fri, 21 Aug 2020 08:41:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 93F318D0050; Fri, 21 Aug 2020 08:41:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0146.hostedemail.com [216.40.44.146]) by kanga.kvack.org (Postfix) with ESMTP id 7D51B8D0006 for ; Fri, 21 Aug 2020 08:41:24 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 242A0180AD817 for ; Fri, 21 Aug 2020 12:41:24 +0000 (UTC) X-FDA: 77174536488.23.bird12_581107527039 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin23.hostedemail.com (Postfix) with ESMTP id E4B5837604 for ; Fri, 21 Aug 2020 12:41:23 +0000 (UTC) X-HE-Tag: bird12_581107527039 X-Filterd-Recvd-Size: 4487 Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) by imf37.hostedemail.com (Postfix) with ESMTP for ; Fri, 21 Aug 2020 12:41:23 +0000 (UTC) Received: by mail-lj1-f194.google.com with SMTP id f26so1669034ljc.8 for ; Fri, 21 Aug 2020 05:41:23 -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=vQ8YtZUq2JY+BH1jqqQCLSvh1WL0FVc7UY1mYQp2AQM=; b=Ehr1XCOBzdD5uog8ufwc8p/ZeibsGALJ/DPSRGA30L6oGq3HsS0KFwdyYUsug7ybHg uQac9t59HdWh/sctxLtx59MZmp9zKkXTcoNFgYd3aDVl9zN5KUBN1oZjufXKLn1TDuXt Wtw75wC4NFAvIaPTbdwVKS/HWohfj3La+pWL0= 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=vQ8YtZUq2JY+BH1jqqQCLSvh1WL0FVc7UY1mYQp2AQM=; b=HJgj5W1kxS3IkIlr/5ftzowHaD5exUgVIpv/XvFgXEyjSIj9cGZgbguHbid0Ai6hCr lPVPW9257Hj8ThnG/K7aOamVw5r9cneO5XWXEerWPefzvXjiqHOckxq28xf2l8Dzymnf /xAxjqlZ2OreAq+WnXeDmglpBCE8AIh87o/qKDFaGM4LYCUeP4nGnHqtn9e33vv499Ws ld2z7yD6D/5xFZD4P/1GyXaIFaAY/t3yRbPTwI64VI6xF50yWvzIkx3052SC7bVV+2bX 36MB9cmKwtalVBuaekcSkjDTuwViDmfI9JrQhhwRwYLuy5G7M+nLChzAVeyH5/IHF9u9 4E4Q== X-Gm-Message-State: AOAM5332CQGPuMuOUqYBJ4wiQc5XYFfPa+GsG/Q/f6m6BzEwKOCvz3Ln 3BLyta4WB4o0PFPFY/4WjvAxrxzhkzk65w== X-Google-Smtp-Source: ABdhPJwK3BHSNV3Lmfl7YD4tE0Ub9x6VixeOiOzHscWkju5aAhoOegc+ULyEnG5JZwgeXWBWMi2KSA== X-Received: by 2002:a2e:321a:: with SMTP id y26mr1366159ljy.388.1598013680953; Fri, 21 Aug 2020 05:41:20 -0700 (PDT) Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com. [209.85.167.47]) by smtp.gmail.com with ESMTPSA id m15sm363933ljh.62.2020.08.21.05.41.19 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 21 Aug 2020 05:41:19 -0700 (PDT) Received: by mail-lf1-f47.google.com with SMTP id b11so840440lfe.10 for ; Fri, 21 Aug 2020 05:41:19 -0700 (PDT) X-Received: by 2002:a19:408d:: with SMTP id n135mr1384989lfa.192.1598013678967; Fri, 21 Aug 2020 05:41:18 -0700 (PDT) MIME-Version: 1.0 References: <20200821085011.28878-1-chris@chris-wilson.co.uk> <20200821085011.28878-2-chris@chris-wilson.co.uk> In-Reply-To: <20200821085011.28878-2-chris@chris-wilson.co.uk> From: Linus Torvalds Date: Fri, 21 Aug 2020 05:41:03 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/4] drm/i915/gem: Sync the vmap PTEs upon construction To: Chris Wilson Cc: Linux Kernel Mailing List , intel-gfx , Linux-MM , Pavel Machek , Andrew Morton , Joerg Roedel , Dave Airlie , Joonas Lahtinen , Rodrigo Vivi , stable Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: E4B5837604 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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 Fri, Aug 21, 2020 at 1:50 AM Chris Wilson wrote: > > Since synchronising the PTE after assignment is a manual step, use the > newly exported interface to flush the PTE after assigning via > alloc_vm_area(). This commit message doesn't make much sense to me. Are you talking about synchronizing the page directory structure across processes after possibly creating new kernel page tables? Because that has nothing to do with the PTE. It's all about making sure the _upper_ layers of the page directories are populated everywhere.. The name seems off to me too - what are you "flushing"? (And yes, I know about the flush_cache_vmap(), but that looks just bogus, since any non-mapped area shouldn't have any virtual caches to begin with, so I suspect that is just the crazy architectures being confused - flush_cache_vmap() is a no-op on any sane architecture - and powerpc that mis-uses it for other things). Linus 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=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 83DADC433E1 for ; Fri, 21 Aug 2020 12:41:24 +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 2FE2820724 for ; Fri, 21 Aug 2020 12:41:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="Ehr1XCOB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2FE2820724 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 61D776E116; Fri, 21 Aug 2020 12:41:23 +0000 (UTC) Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id B17586E116 for ; Fri, 21 Aug 2020 12:41:22 +0000 (UTC) Received: by mail-lj1-x242.google.com with SMTP id v9so1685190ljk.6 for ; Fri, 21 Aug 2020 05:41:22 -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=vQ8YtZUq2JY+BH1jqqQCLSvh1WL0FVc7UY1mYQp2AQM=; b=Ehr1XCOBzdD5uog8ufwc8p/ZeibsGALJ/DPSRGA30L6oGq3HsS0KFwdyYUsug7ybHg uQac9t59HdWh/sctxLtx59MZmp9zKkXTcoNFgYd3aDVl9zN5KUBN1oZjufXKLn1TDuXt Wtw75wC4NFAvIaPTbdwVKS/HWohfj3La+pWL0= 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=vQ8YtZUq2JY+BH1jqqQCLSvh1WL0FVc7UY1mYQp2AQM=; b=okxFeAyTqcKpLaCF935uhW7LvClmFsHjRBR7z212lKTTpo7pGkipuSN+lR60HBmHvk uQ16L/rURhvUAIS2L7RHonMYqWLgkJxIbh5CSTPCzlf1/B0C/NOWUuyndULOfaNuJ1r3 1HevkRwNI34FYCl++ZBa5W+N0ALBWhLTWV6x6+dPTc5f09yfrqAi7UDMfrmEBQCQRn21 7JGPe6V+wXPOypAwvImx6KS1HbH5ZOrG9d3xZhJvvQYgaV9Sa6bkz88nKIWhQW252MlO XM9JfiqR5Bp05YlvTE6Ptoy9AmX7kKSIWKCmEYtOXPff2e73xrxSaPVg4O1a07X96CLf MVyw== X-Gm-Message-State: AOAM531Z1fjurNJz0v2CqPZg8F1TOvm9HARdovw0ULIQQEUA3A/FTQgB QMsA8xoHSTTq7NI5sw+fuWgjLqiB+UsKuA== X-Google-Smtp-Source: ABdhPJwYQaRlK+YDuor0JB24vK4bKdRcqZbZ04zTtsLxvNTYw08kRZK7MDVQPEqEvKOccE5HdRfeag== X-Received: by 2002:a2e:8510:: with SMTP id j16mr1410542lji.196.1598013680624; Fri, 21 Aug 2020 05:41:20 -0700 (PDT) Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com. [209.85.167.48]) by smtp.gmail.com with ESMTPSA id j2sm364415ljb.98.2020.08.21.05.41.19 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 21 Aug 2020 05:41:19 -0700 (PDT) Received: by mail-lf1-f48.google.com with SMTP id b11so840441lfe.10 for ; Fri, 21 Aug 2020 05:41:19 -0700 (PDT) X-Received: by 2002:a19:408d:: with SMTP id n135mr1384989lfa.192.1598013678967; Fri, 21 Aug 2020 05:41:18 -0700 (PDT) MIME-Version: 1.0 References: <20200821085011.28878-1-chris@chris-wilson.co.uk> <20200821085011.28878-2-chris@chris-wilson.co.uk> In-Reply-To: <20200821085011.28878-2-chris@chris-wilson.co.uk> From: Linus Torvalds Date: Fri, 21 Aug 2020 05:41:03 -0700 X-Gmail-Original-Message-ID: Message-ID: To: Chris Wilson Subject: Re: [Intel-gfx] [PATCH 2/4] drm/i915/gem: Sync the vmap PTEs upon construction X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joerg Roedel , intel-gfx , Linux Kernel Mailing List , stable , Linux-MM , Pavel Machek , Dave Airlie , Andrew Morton Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Fri, Aug 21, 2020 at 1:50 AM Chris Wilson wrote: > > Since synchronising the PTE after assignment is a manual step, use the > newly exported interface to flush the PTE after assigning via > alloc_vm_area(). This commit message doesn't make much sense to me. Are you talking about synchronizing the page directory structure across processes after possibly creating new kernel page tables? Because that has nothing to do with the PTE. It's all about making sure the _upper_ layers of the page directories are populated everywhere.. The name seems off to me too - what are you "flushing"? (And yes, I know about the flush_cache_vmap(), but that looks just bogus, since any non-mapped area shouldn't have any virtual caches to begin with, so I suspect that is just the crazy architectures being confused - flush_cache_vmap() is a no-op on any sane architecture - and powerpc that mis-uses it for other things). Linus _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx