Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1336645pxk; Fri, 18 Sep 2020 09:44:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgdZHdOijwysctyT5JMUK9Kwbw8KWYoDiXA+Cc8iD6h1TGXA3iKRv08SgXgZbBkJ/J4tx4 X-Received: by 2002:a05:6402:10c9:: with SMTP id p9mr3593366edu.156.1600447452151; Fri, 18 Sep 2020 09:44:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600447452; cv=none; d=google.com; s=arc-20160816; b=YgDN4f6E0MnBVTShH/nLGEuw7+A+RaV9chOl0smMqefZ5hXl5mri5UEQFrmr054/gi 1y6EMn5AtEHZtteYuaO5+3optNcYqfca07GY9XpsLwzGjTDilPAcU5btPRVOXNmk8rCh 8NsLZnrf6qkwBxqa5QkVZRE9wyghywIcop2XF8JMfL9vukwqlYQzemvdzOzVUTmxIxSh nyLz7e0bb+6A/NHqWmQRnNy0iXGg582UHMJ5GadN4C2zn3sjH8L1kZfuH4+OKHm1WAnp zl49m7bQe4QLbknqbtIiYb4IccJTujG678HqzxNKesaciPjV9X7mdRSasppXg+1sHRo6 F3BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=kbkCOaAVGW2W0qtF3ILC2dY2YuGuU78+gf+gMb7gwmg=; b=WstDH8V7BY3/rEB7UNcBX/Dduhj+IqG4BHEzoq0Wj3vJ0dI/tPo/dHBPhf0Jc1oITS cpsy0x4EpwqHHG8Obztmrac1CJNLXT0CUaeCprnBRoyxkaz00etZMnmTOxJNF/bDJ+FG jlH3nttWJzqkp38XnzGhyqJJQMFTAEE8F6wQqtNU3T1etLF4RmssR2+bGmd5fRxYjtMx 3e3n4TYsu0SQcBosuYuao9nLOH1InkkS6Y4Bh9XuxQSUTdjjCC4TLqor4zZ9LHGCuCnk WIx7o2N9dmggbAvzkprz98ttdG0ThHDdwwu08Nw78sP+RuQgPgd+x15lhcgpq3ETGsTM CPCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="kW/m5vnU"; 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 g10si2853344edv.314.2020.09.18.09.43.49; Fri, 18 Sep 2020 09:44:12 -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="kW/m5vnU"; 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 S1726475AbgIRQj6 (ORCPT + 99 others); Fri, 18 Sep 2020 12:39:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726343AbgIRQj6 (ORCPT ); Fri, 18 Sep 2020 12:39:58 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCD22C0613CE for ; Fri, 18 Sep 2020 09:39:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=kbkCOaAVGW2W0qtF3ILC2dY2YuGuU78+gf+gMb7gwmg=; b=kW/m5vnUNR9hH31GcXuVcpd9j2 YA6VaBH1j/TiUI3s10h53oQiEx5bSqjcpwY8JemDJbytieos8zt+gRB1FpEaZE9ZsAKzL4LQC0jza iqqFAttfNNTd4/5l8lRTxiHEru6CjyH/WYZRSvfVriw/iqmEjMdx7BgGWHp8bWD5i5kx+iWa6kL8H gBcyIRucV67OIH/x5iE4iVZODxkkwqs3zdZ+XmOdUAkQoickM8doXsxt/7EZ+p93DBYP3QdoVQtAN 2milUFpS2U5fzp8jyoapCmfH59wTxVZclqKH1diAZY87+wVGYpDlWdBfpnNKB0VdioTh1sC8mAgnG JPit0e+w==; Received: from 089144214092.atnat0023.highway.a1.net ([89.144.214.92] helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJJQ7-00071w-B7; Fri, 18 Sep 2020 16:39:35 +0000 From: Christoph Hellwig To: Andrew Morton Cc: 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: remove alloc_vm_area Date: Fri, 18 Sep 2020 18:37:18 +0200 Message-Id: <20200918163724.2511-1-hch@lst.de> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andrew, this series removes alloc_vm_area, which was left over from the big vmalloc interface rework. It is a rather arkane interface, basicaly the equivalent of get_vm_area + actually faulting in all PTEs in the allocated area. It was originally addeds for Xen (which isn't modular to start with), and then grew users in zsmalloc and i915 which seems to mostly qualify as abuses of the interface, especially for i915 as a random driver should not set up PTE bits directly. Note that my laptop doesn't seem to actually exercise the new vmap_pfn path, so careful review from the i915 maintainers is very welcome. Also I wonder why zsmalloc is even doing the manual allocation of kernel virtual address space plus mapping into it. IMHO zsmalloc should be using our normal vm_map_ram / vm_unmap_ram interface instead of being so special, which would also allow building it as a module again for the virtual mapping case. Diffstat: arch/x86/xen/grant-table.c | 27 +++++--- drivers/gpu/drm/i915/Kconfig | 1 drivers/gpu/drm/i915/gem/i915_gem_pages.c | 101 +++++++++++++----------------- drivers/gpu/drm/i915/gt/shmem_utils.c | 90 +++++++++++--------------- drivers/xen/xenbus/xenbus_client.c | 30 ++++---- include/linux/vmalloc.h | 6 - mm/Kconfig | 3 mm/nommu.c | 7 -- mm/vmalloc.c | 93 +++++++++++++-------------- mm/zsmalloc.c | 2 10 files changed, 172 insertions(+), 188 deletions(-)