Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3849847pxk; Tue, 22 Sep 2020 04:25:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmwaGugijjo2OGEHVcgvW6kpqA3ZLrBBjoamCRvofq6eeB5mf7LY3+ajhmEedjSEsI3JL3 X-Received: by 2002:a17:906:dbe6:: with SMTP id yd6mr4224953ejb.120.1600773938041; Tue, 22 Sep 2020 04:25:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600773938; cv=none; d=google.com; s=arc-20160816; b=RKpiljfCgxkriZ4qP8wi/3p1sXdy7gekGco5TVzxyTsUjjlQEi/XxNHRzG2OTzx6Qz ClTZ/TBrFx7W/jTuc0ZAS5cGCIHVxTHzASHaUNS+TNpR6mxUf/rSqTjwzFMcmf3O/4xm 8tyoERh0JISxiEjRwnuGDFqmrRUTw9isTIPOkU82k/Rcl3uxbtro8OpeH03YUSjXTH3+ slNkymrMlKbKBOBWWP3UxBhzcYjNKVe+laDskNyu3lrHQ/tAHjBfwEdRBsJ/30IACwXu 2A+F4LxgA6Fo+2HYmpF6WKFwmGeLBnNX/CA4yloRKO0mduEroEMHz9bVUv6fNGz2o3Bq 8TnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=v+IUea/CGhLMdjL8zbCOPAxfGNu+qZhlo3dcebaU5kY=; b=rJNXA03pY1uc5JD+lec43WtOpnc92rUJvTWNmcaaP9RA8GqmZR90ta6/TLIpmw6R/X ifvRr2sf9B10+k+xTh387b3LRwOAT76A0CDnDNb5OivcIixEsmtalrS6p3iDzEyPi18l KBOfUpF9QIs/VgFO2xWyAXkVjzBphVJjd1MT3oE4lwwmJMTbxh0HmOHXeALRUJu5/4+x dSV0RzRKNVHSey6URAlrAvuWK/yKH/4bR5lBcVSyrVm5T7U8eOgip4E63YgcoP/atsaa uHyARG7E8jTende876UqAuDmwP+AWy2nbXcB3ErLmnD/Xb56ZiFIOTdwXriUlHdg75Aa C7EQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=iLgsfzwx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lu12si10129692ejb.359.2020.09.22.04.25.14; Tue, 22 Sep 2020 04:25:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=iLgsfzwx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726586AbgIVLWK (ORCPT + 99 others); Tue, 22 Sep 2020 07:22:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726454AbgIVLWK (ORCPT ); Tue, 22 Sep 2020 07:22:10 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE2C4C061755 for ; Tue, 22 Sep 2020 04:22:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=v+IUea/CGhLMdjL8zbCOPAxfGNu+qZhlo3dcebaU5kY=; b=iLgsfzwxwT611QKOl+WmOf2wbN /apXK6gTmDsVL/BXsA2nSeYw00AYm7of+qlZIT5seKhZdu6vVFYUh9VHKNyMaCNUtuxTWQsjq/fQb o+HH9FqL3yy9RUdN/gEnhHaw8zj6LjLVf/SMpazertMDW0M+AsMsYpsjEY6RqiGrpxc2TfV1v186b /dak9QRJGkXVmw5CYmBXsQSP0ryzf3Fj1FCPgdtdTrj8+Ud5C+5S63kHgzqMV4tMTbzbXE/7lodhh 8x3U5eQq2tiq0PS1EC76b9HHLbxCqMbJHon71YuO6JArA0Hf33RL3+JVtd3CmHZv47m4GshGX8kOv xhVaWjtQ==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKgMi-000579-Gi; Tue, 22 Sep 2020 11:21:44 +0000 Date: Tue, 22 Sep 2020 12:21:44 +0100 From: Matthew Wilcox To: Christoph Hellwig Cc: Andrew Morton , Peter Zijlstra , Boris Ostrovsky , Juergen Gross , Stefano Stabellini , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Minchan Kim , Nitin Gupta , x86@kernel.org, xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-mm@kvack.org Subject: Re: [PATCH 3/6] drm/i915: use vmap in shmem_pin_map Message-ID: <20200922112144.GB32101@casper.infradead.org> References: <20200918163724.2511-1-hch@lst.de> <20200918163724.2511-4-hch@lst.de> <20200921191157.GX32101@casper.infradead.org> <20200922062249.GA30831@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200922062249.GA30831@lst.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 22, 2020 at 08:22:49AM +0200, Christoph Hellwig wrote: > On Mon, Sep 21, 2020 at 08:11:57PM +0100, Matthew Wilcox wrote: > > This is awkward. I'd like it if we had a vfree() variant which called > > put_page() instead of __free_pages(). I'd like it even more if we > > used release_pages() instead of our own loop that called put_page(). > > Note that we don't need a new vfree variant, we can do this manually if > we want, take a look at kernel/dma/remap.c. But I thought this code > intentionally doesn't want to do that to avoid locking in the memory > for the pages array. Maybe the i915 maintainers can clarify. Actually, vfree() will work today; I cc'd you on a documentation update to make it clear that this is permitted. From my current experience with the i915 shmem code, I think that the i915 maintainers are experts at graphics, and are unfamiliar with the MM. There are a number of places where they do things the hard way.