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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A2323C4332F for ; Fri, 10 Nov 2023 15:14:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=v8ZkaqfkyeTBB8a+q0k9H5SV5IIPIxCvWmN7mnw3YrY=; b=FdMkHVeaIxk5FZ P3scHU3ZexK2D+8SSiaW+wS5AO1NDnfwhQHf9Lexee1vbm7ElQTVBIyTPIR3ZZBb9upO0r3aD8tzZ 39qMTkFtC94s3e00emG8o84gpfMz73/bbtwl5gikDPEv2mZxEdPVQ87XRoJFmwhNI8zLBHwZef13o Pc5Ni85MTUAKiuVQDo0S6+qNPAA2YivHZVtIrq3BvhSQRTC/1QJXN+PUCNOXMnrHaTeRPJYx0yrk9 I7i9G1UAJkii4Voel0AgL6P/xqAa/1LbgCvC0K6N4B4/K5cNyeYlJEvaoFeYFC27UrbSjk0g5FWsr 7JeoRa1sdDNWRhHfaUqg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r1TDR-008zDq-1p; Fri, 10 Nov 2023 15:14:37 +0000 Received: from mail-oi1-x230.google.com ([2607:f8b0:4864:20::230]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r1TDO-008zD3-1o for linux-arm-kernel@lists.infradead.org; Fri, 10 Nov 2023 15:14:36 +0000 Received: by mail-oi1-x230.google.com with SMTP id 5614622812f47-3b6cfc62514so277550b6e.0 for ; Fri, 10 Nov 2023 07:14:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1699629270; x=1700234070; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=zMq1v3p4HQgOttJjlBnBYwrQ6535gvD/7NO5PHEOGK4=; b=XmcY25VK6g7PrGLWv2zIxcV8K64XHEdphmNpIVJs4aUb2sJsA5Px7/UPW4bP//aw/p Ze2DukmnlzZf3p+CMhyGSS8RY7JW1w1x5u0YJ+MGGhliwNAqVRY3R/T7WvFM2UfrqPvv 2Crz0uM3GJeCmu9S+FITvFb0t/D2lSi5E665VUYaI77bjkt8LYNQIuSP7n0q1NHZNQ1n qQL7/wxOkk3LQV0vX68GATL90P5fe4h8PC6HLsTzJ9F6Ncix+rBDEEl15CkLBlWpFrVJ WpqkgoMVi9UzCNCZe+8d/IKX/qMalrO0OmMenAg0Lb47BOT1Y3VTsja7Po+oZ+b4OaG2 6x2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699629270; x=1700234070; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=zMq1v3p4HQgOttJjlBnBYwrQ6535gvD/7NO5PHEOGK4=; b=TckF3X3WVO4unOkWQcdbiR11jeFkF+tZFOf6u6wYQkfirB7mreEYZhJDeqfi983lhB QXDw0rNFmDI9hQQ6aomtKtL15V0l4rJWdyrlq7GdhBYZ7umPB2dfYy9EQ8MqvXge1/7u 3DVsBIX2TfbbIqForWGM9Rx2zS/RAfs19C55RXDnGfVx4Ji4cHwcu09hrFXKdBO53Qoi L3mO/rjdWmBCoScaU3ewKVZvjnm6BEKI09GegP3gCkjkrKwCuDXqZ9W+dmi0Dy3as5Ih 7yJ/W25BC5VAdIX+Ck4MBlug9/tgMmi2hh5Wk7ZPQkzhDvqlz53fzBWE+qjtCfs0w8pN BBJA== X-Gm-Message-State: AOJu0YwvpTwmFuqxi0/yCJ4YQ6LH3r4dDOo5kIIpdLtz2Dn/c09Zgzm1 KWA4gAalJGcM11BNMkJn4yR5Bg== X-Google-Smtp-Source: AGHT+IGuh1b5v1kCUEbOXbs/awEXDd6LUow2Eg27ekh7iqFCop1h457YmE1lrZUZmqI+kjyq/ulirA== X-Received: by 2002:a05:6808:2222:b0:3b2:f4a2:e7fc with SMTP id bd34-20020a056808222200b003b2f4a2e7fcmr1398117oib.25.1699629269804; Fri, 10 Nov 2023 07:14:29 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-68-26-201.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.68.26.201]) by smtp.gmail.com with ESMTPSA id x12-20020a05680801cc00b003b2e4754cc2sm413795oic.26.2023.11.10.07.14.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Nov 2023 07:14:29 -0800 (PST) Received: from jgg by wakko with local (Exim 4.95) (envelope-from ) id 1r1TDI-001w4a-6x; Fri, 10 Nov 2023 11:14:28 -0400 Date: Fri, 10 Nov 2023 11:14:28 -0400 From: Jason Gunthorpe To: Boris Brezillon Cc: Joerg Roedel , iommu@lists.linux.dev, Will Deacon , Robin Murphy , linux-arm-kernel@lists.infradead.org, Rob Clark , Gaurav Kohli , Steven Price Subject: Re: [PATCH v2 0/2] iommu: Allow passing custom allocators to pgtable drivers Message-ID: <20231110151428.GJ4634@ziepe.ca> References: <20231110094352.565347-1-boris.brezillon@collabora.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231110094352.565347-1-boris.brezillon@collabora.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231110_071434_904126_3C7D1BD3 X-CRM114-Status: GOOD ( 19.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Nov 10, 2023 at 10:43:50AM +0100, Boris Brezillon wrote: > Hello, > > This patchset is an attempt at making page table allocation > customizable. This is useful to some GPU drivers for various reasons: > > - speed-up upcoming page table allocations by managing a pool of free > pages > - batch page table allocation instead of allocating one page at a time > - pre-reserve pages for page tables needed for map/unmap operations and > return the unused page tables to some pool Why would these topics be unique to GPU drivers as a user? Shouldn't improving the allocator in the io page table be done generically? > A real example of how such custom allocators can be used is available > here[1]. v2 of the Panthor driver is approaching submission, and I > figured I'd try to upstream the dependencies separately, which is > why I submit this series now, even though the user of this new API > will come afterwards. If you'd prefer to have those patches submitted > along with the Panthor driver, let me know. Patches like this should come with users, but I think you should refocus this effort to improving the io pagetable itself not allowing a GPU driver to replace its insides. That seems like a cop-out. Jason _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel