Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3756274pxk; Tue, 22 Sep 2020 01:30:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfLAPT5l3Uyak5AW7Vnlj5MGGAVqWHdSnpNFC5472MXj2MEyG98EGYawwwCEgDPYdFbflQ X-Received: by 2002:a05:6402:1805:: with SMTP id g5mr2695340edy.135.1600763411660; Tue, 22 Sep 2020 01:30:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600763411; cv=none; d=google.com; s=arc-20160816; b=nZg0jKGK/qCpZLR0vfZZI62GtcE8ityFuD35sZXOEedhrRLSLmjMphz10CrTyVjYXa 4ezavriQksC3yrPneyNhsM+8xbB4bitq8S2LSmNm8VEP5i+mMxR9dkNzl6uoyB1hoP4S cUoFZU7l3VIAlbdk9JyZOom+999mh8GjMw1veIMh9yJGfPCYhd3khyr4Z0qedNNBx5hx THLbqLHgUPdE17m5l+J97KH5699nPJaBccITKE8NIkT5AgV6NPfiTu1dvrBQXgfxgUfM javRuGi6JJjPw7AeMJ/PMHxKmy5ayhF8dhg6NL7PdjWlrJPSlS2LF9mNhLGQYNMI8yuT vYuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=rKqK8axX6R6anhSEPvzIMXJwyL98IxGCU4Vg3J9H+Jg=; b=vqOjNA7e57KMrSl4EJcyheaXeDhiwgjdJRCnjwQcr3Vf7Yl3AOjJtq0CEFRzNw8vtX jWAGXCILr3wXWDxRJfG+AYzlDXRMgxjOkXH+Q4rPQSCa7AWQNRidYC4BN9GTUN3nf9kN vws1tNZAr1TRMLz/EinzGA6xIA/hKAID2r3tGI9IgnuSQRrGvaJpz/5fjgH3xzzSjkn5 n0ZOikkyZ1VuF9ylLSL1/dvsOtAHM/4ucoz95aEe5M8R1zvgnRyynwMp5G8hA42wmdUU /FSqYgFDvvjlzER827wRpq0cBQuKD3oMEoY2g/3/Uxh3NcknLFWgpZySdq5llzYReBG8 bdVw== ARC-Authentication-Results: i=1; mx.google.com; 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 o12si10032787eje.30.2020.09.22.01.29.48; Tue, 22 Sep 2020 01:30:11 -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; 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 S1728325AbgIVGWy (ORCPT + 99 others); Tue, 22 Sep 2020 02:22:54 -0400 Received: from verein.lst.de ([213.95.11.211]:43268 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727939AbgIVGWy (ORCPT ); Tue, 22 Sep 2020 02:22:54 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 17D146736F; Tue, 22 Sep 2020 08:22:50 +0200 (CEST) Date: Tue, 22 Sep 2020 08:22:49 +0200 From: Christoph Hellwig To: Matthew Wilcox Cc: Christoph Hellwig , 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: <20200922062249.GA30831@lst.de> References: <20200918163724.2511-1-hch@lst.de> <20200918163724.2511-4-hch@lst.de> <20200921191157.GX32101@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200921191157.GX32101@casper.infradead.org> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.