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 B1B8DC197A0 for ; Mon, 20 Nov 2023 15:46:25 +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=oEcOw1lPC07jyK5alXeVa6OGbE6QQkS6oYG27RUzz6I=; b=eNdSqBw2QRPipZ ELdtFUBgjw/gpRQRfl92McvCbtD9gBdqHVPddSg4bf91YtWrnnn+cqkX3OpRi7uWv/qciIvXBkDLW aX8vYMZRovg1+yJgDTO3IH3ziSNzB5g7iMNQ7JqmRAjWB+oDCHcth0In94DDUKtAcUcdfWdkL+qO9 d+Ze/RUchAh5qcvPIsjbs+/KRjUZ7dBTmm6YPLFVQrp2znGX8Bxr4XhSnwMIn4u0KSU4t6EqJBfju doaEiHMuwHRXH5NlKZYO7W4VBl446jvjtJzj+NftcWQS7TOmGCtvzYkHMbV7J8TujrVZzLUEwWdiY 9ZMx4fIpe0yuJGjZ0jIg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r56T2-00Cotu-2S; Mon, 20 Nov 2023 15:45:45 +0000 Received: from mail-ot1-x32b.google.com ([2607:f8b0:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r56Sy-00Copm-2D for linux-arm-kernel@lists.infradead.org; Mon, 20 Nov 2023 15:45:42 +0000 Received: by mail-ot1-x32b.google.com with SMTP id 46e09a7af769-6ce327458a6so2217802a34.1 for ; Mon, 20 Nov 2023 07:45:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1700495138; x=1701099938; 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=OM9uvcoV5ag+HkmTgVNIfQvYLbzKwuT2srRTitPCGCI=; b=G4zOVNIpZGYE/0BoQqIqzeme/AZwV+zxbdJQg7HoY7Xpi/z/XGZlE57Bq5Jql9HVwS OK17wdENRHNhRuxtcK+cGf5E/ohvTJSgMxIatEOMxmVrksgjLPxMpwcOe3BYeGSePnPP 1uK9fvC5zDWeOQ7HzSROlLaG+RqZYhlnwZmrXHEUelQGQz3ApbWOkMhntzkCv1bYnjqN 1AW9MxUHQklal6CZlepN9znWDPVDEcXClze/ZDexOUOX0Xtzrjhq2qerlVQlgxxoKM3P b9ozwvdCRDmjMYE+jwMDsyaiZi5jEbF4Fd4xoGcARz1ktxunDVE4mOEjiWCpMxs6+gvO 1T4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700495138; x=1701099938; 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=OM9uvcoV5ag+HkmTgVNIfQvYLbzKwuT2srRTitPCGCI=; b=QCciOcb9sJ5ejBl0csmjcnQHTWdPczq3Bd3zCtbUnL23Y5SD0m5s74lHwvg0QW1tpz ZVueYPOyZWwfx4Z1forbeY6JIXqqlOeFuFs7JR72MSoaLdEvMWZpNHka8G447OEU0WiK F8FHN1hmiffO4NAkVV/K7PCY6GM9GOM2Sr4jGg44ga2wwYK7Kzo1/eRA+OZO46H+Bfmq fM0CoOTIumTG1v71phVrve6JeZETdLATaThf5TQIGycEl/yR9TpuAwFOmE8jGb4BE0kJ iW67NIIqR6ft+tScqYER5y5fMRm2lZDI5cbBQT5lx62YbF3XFaXzUUmQKijGO+0BOUhj AL4Q== X-Gm-Message-State: AOJu0Yx4i82nPofG1LBrYjbDDpyEuB/i9tZ+SzOLZ/2PDGziO+Z0NxQG XjMg05tqXfuZ3nQLee3LnGCyn+KdMnyKC0mZymAEew== X-Google-Smtp-Source: AGHT+IHazKAMmMUu7WG6XKk34HRvrp2GXdikeXTyF9zWwYYOH3ewfnPuO4HJIzH8J7s1XmGRpIszKw== X-Received: by 2002:a05:6830:2007:b0:6d6:c0ec:6de8 with SMTP id e7-20020a056830200700b006d6c0ec6de8mr3231220otp.14.1700495138014; Mon, 20 Nov 2023 07:45:38 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-134-23-187.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.134.23.187]) by smtp.gmail.com with ESMTPSA id cu24-20020a056830681800b006c4d822bea7sm1216744otb.31.2023.11.20.07.45.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 07:45:37 -0800 (PST) Received: from jgg by wakko with local (Exim 4.95) (envelope-from ) id 1r56Su-000j0f-EH; Mon, 20 Nov 2023 11:45:36 -0400 Date: Mon, 20 Nov 2023 11:45:36 -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: <20231120154536.GE10140@ziepe.ca> References: <20231110164809.270f82bc@collabora.com> <20231110161229.GA462657@nvidia.com> <20231110201652.629b7228@collabora.com> <20231110194215.GR4488@nvidia.com> <20231113101103.1cc05c8c@collabora.com> <20231120140425.GA10140@ziepe.ca> <20231120153838.2166e7b8@collabora.com> <20231120144604.GD10140@ziepe.ca> <20231120161418.5eca178e@collabora.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231120161418.5eca178e@collabora.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231120_074540_990820_3CFCCC0E X-CRM114-Status: GOOD ( 34.87 ) 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 Mon, Nov 20, 2023 at 04:14:18PM +0100, Boris Brezillon wrote: > On Mon, 20 Nov 2023 10:46:04 -0400 > Jason Gunthorpe wrote: > > > On Mon, Nov 20, 2023 at 03:38:38PM +0100, Boris Brezillon wrote: > > > > > > At LPC there was quite a lot if interest in improving the io page > > > > table stuff to work better. Based on that I'm even more against adding > > > > an external allocator at this time. :\ > > > > > > I'm sure this has been discussed with the IOMMU maintainers, but I'd > > > really like to hear it from them if you don't mind. Especially since, > > > as I mentioned, the custom allocator idea comes from Robin, not me... > > > > It is a community effort - this is my opinion. We now understand this > > io page table area needs a lot of work to meet all the new needs. I'm > > against hacking it up like this and making that work harder. > > Consider it a hack if you like, but the thing is pretty self-contained, > and I doubt it will get to a point where things become unmaintainable > before you get the generic caching system working. Not to mention > Gaurav's use case, which can't really be solved with your caching > solution. Gaurav doesn't need a custom allocator, he needs a way to manage sharing page table memory with the hypervisor. A different set of ops that don't replace the entire allocator would be fine for them. The issue with taking away the alloc_page is that it complicates the ability for the common code to use the struct page fields and more. We already know we are going to need those to do some of the things that are being asked for, eg RCU freeing and refcounting. > > I would not expect a resolution in a few weeks. > > OOC, what's the time frame? The larger need has been discussed is considerable work, I would be surprised if something could be merged in less than 6 months, especially with the upcoming holiday season > I've maintained a subsystem for a few years, so I know what it means > to contribute upstream and ask or being asked to extend the core to do > something the right way. I'm generally patient and try to follow > maintainers' recommendations, but there's some point where waiting is > no more an option, and you have to be more pragmatic, because there's > always a better way of doing things, and perfection is often the enemy > of good... Here I am not talking about perfection, I am concerned about messing up work that I now see as important for other iommu drivers related things by making a hack for a DRM driver (which as I've said has, unravelling these hacks has been traumatic for many of us historically) So while I would not like you copying the code to DRM, but I think it would be less troublesome to everyone in the longer term. Jason _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel