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