Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp785865rdb; Thu, 22 Feb 2024 22:37:34 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWPMo4hy59ccLLFgcOFDa0K6k48Gh8+Va5SlPxcLya666KgZ8/q0fcm85+2gQI4vtaK7LLCskttpbbscHB/5TigYd+MEhPS3TeqIIIWnQ== X-Google-Smtp-Source: AGHT+IEb+0mVjGGdd9PbWfioro0tYL5f48OOg0qEVFhomubcBBicwCkKvzKOEtyrsqsEleSk/RMt X-Received: by 2002:ad4:5ecd:0:b0:68f:6c38:c4b0 with SMTP id jm13-20020ad45ecd000000b0068f6c38c4b0mr2613926qvb.23.1708670253945; Thu, 22 Feb 2024 22:37:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708670253; cv=pass; d=google.com; s=arc-20160816; b=t+D1nGWtmrs9Ya7NADaiMmhcx7foUjiV5sVpeX+4xEZAO5wQLUtMcg4yNF9tyWA6fy mEDO3Bg8SxWlaSo0QN9+PwrYcwu8BAzw0UTn/2jiWZgNHFEXO4mCC1RpFXM51ve46whb IEwp1rdzRnLDIF1LA6H62Z+hxxddB/2HlmHNn4mFijM1cfofRuGwUpklAHA8gZbgoP7o 1LGwy7wd1JpuX3zNIfjXuEhtqVisTSWnRNpQeB55T6IdstkDh2UWuKxul4FBBKkKHePO ITsvnbYD9OZdqY/ak5KYjpx7YIo7v+QJ5tBsimhjtREPd/412kT8Ou41LvOEVcAvX7tz HxJQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=nFWZ8akL2ng6Z1rimW6t8RPNWAfNTWlPU8357gD9M7o=; fh=3nQQBFQqJ4Rg0hMvat/72aYYoWn1nHiKTKq7b8zhY4A=; b=ptSy6d66EJiM3ggJmdmgTFKEj3pHjonRJ7vTepL0eUu2B4hH0O1cEBttJJhFQMwRVw FX2DykZrgPAvglg3ljjBWfUFyiA4cTgE8GL5S944NQARPAHOBQXZ0EXaRhbsJXn0Z5r7 JYL7M9FbIKgq80xSL1Vtp6VxCtepmwyBHiS3qzjra+SrjKFOZxS/DbYhOZ9Vs7WZHMhC Hd1aBSsgDU/8ncuqFquteodB2NnFVZumcp116CGtgRjABBt+aIznbzy2OpzpRGlk1rZP OCovYi/94MuyppZbueB4xSJX9e3dLwfrCVb5EwEctA2Dbt0B6SQxsVHQkjJNFwT7uQrV x5Ig==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-kernel+bounces-77841-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77841-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id u7-20020a0562141c0700b0068cf8ab1139si14871731qvc.374.2024.02.22.22.37.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 22:37:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77841-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-kernel+bounces-77841-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77841-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id A52471C21CC6 for ; Fri, 23 Feb 2024 06:37:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D1EA512E43; Fri, 23 Feb 2024 06:37:30 +0000 (UTC) Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A74F12B6C for ; Fri, 23 Feb 2024 06:37:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708670250; cv=none; b=a9p2e0+NvaUAHAFiBTx3Qgfr0O2kDCw1t85cg7ZZMiY8+SCyDU0IPW6pw+HrJB2dSIxQkhm6iFV5OeXlUfWricTcNdtqjegCS++SBAOhrKIxXB9qR1eSrmoNh2HKaqFw/HqFHHXjQayv1wlDJqEuGF8uY+gl/ShD5v6MufgWXps= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708670250; c=relaxed/simple; bh=G7FfstsSz/agmPlMrQQ3PDPo+7Tic3vz0ZsyZkVN+Ys=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lqf1O/+23exM0B5OwCfOQpkKIfAnMSXO+UhWrQXf7zZAzya3ZWpY6RuVBV6GPRoRb4PNUn/7ETn53RhyC7PXj2orIycYio4TJw1EjrtwDdVpEaSQSaZ4Su8T3NYa5nbUZRhBqmpGI0GMBTFjUQ7u+OsV8buZeaCVa5U3xvRkEpo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id D3FE468D07; Fri, 23 Feb 2024 07:37:23 +0100 (CET) Date: Fri, 23 Feb 2024 07:37:23 +0100 From: Christoph Hellwig To: Howard Yen Cc: Christoph Hellwig , m.szyprowski@samsung.com, robin.murphy@arm.com, gregkh@linuxfoundation.org, andriy.shevchenko@linux.intel.com, rafael@kernel.org, broonie@kernel.org, james@equiv.tech, james.clark@arm.com, masahiroy@kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev Subject: Re: [PATCH v3] dma-coherent: add support for multi coherent rmems per dev Message-ID: <20240223063723.GB11004@lst.de> References: <20240208152808.3712149-1-howardyen@google.com> <20240213055426.GA22451@lst.de> <20240220055241.GA7554@lst.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) On Wed, Feb 21, 2024 at 05:27:58PM +0800, Howard Yen wrote: > The reason why I tried to propose this patch is that in the system I'm > working on, where the driver utilizes the coherent reserved memory in > the subsystem for DMA, which has limited memory space as its primary > usage. During the execution of the driver, there is a possibility of > encountering memory depletion scenarios with the primary one. > > To address this issue, I tried to create a patch that enables the > coherent reserved memory driver to support multiple coherent reserved > memory regions per device. This modification aims to provide the > driver with the ability to search for memory from a secondary region > if the primary memory is exhausted, and so on. This all seems pretty vague. Can you point to your driver submission and explain why it can't just use a larger region instead of multiple smaller ones?