Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2252374rdb; Wed, 21 Feb 2024 01:37:07 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVj2rmZ4JM+g3g/8YJ4XpwtYQIKX5j2TZ2pZWfegi0v1/3fe5k/+yqTSTESraiCw/3s9f0gHH2AzdPrFE3pXJnrB+74STT0jXHat8aubw== X-Google-Smtp-Source: AGHT+IHQeecjVkBygW8SrliXTZ23E6evyYm44wq3Xcdc37pEV1Zq+bfpRRlZpVE70kT1+XpSpW4E X-Received: by 2002:a05:6a21:3a44:b0:19f:c0d3:4604 with SMTP id zu4-20020a056a213a4400b0019fc0d34604mr17152628pzb.46.1708508227521; Wed, 21 Feb 2024 01:37:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708508227; cv=pass; d=google.com; s=arc-20160816; b=NY/+Btx71HVpBbFi9UeBMHTrOWF1vZQ7iQAZF1cb6/uQZoNeDK5twUaPokVhhWOAaH E9V2oDfbzQgFIFx/W63YaCUsk03fn3iGG4a6LicQwhBaMZxyic5s+jOlWidpTBSYpU7X UZg7Y4Ot6rpqXSd8poDh4yvp9h/WBDKO3ICih2s2u16lJwAogDmEGQKXLv6Nx//hi7Wc Kbq+w3YbRBnfd9gbQ8ddYQo0EhT87ME3g6pj1mmq+r/PAVtG0h6G4/3Oc352kMTpfB0z FVgWQ1yFTsY93rCoZJVqK+TN2mdvwIymXbyvLvkZ+bYQS/j7M9OVnHW+6VXa5JRRjtkM +dvw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=Hq8KJ6FUW+dUn5EF4x4k+Yc0eSHWRUNZYxQmVAAMYJc=; fh=zwnI5eAclB3/E7NEx5s4I/NQ52yl7hNs1tHeZf9L5ME=; b=kYY37UPEiPfjmd97YGXbv0+HF7VsoUkb5hBzlM/Zw7HcvjdBNnLG2Yen4jPZH7mfN0 1/BnJKTw8kF3tQDc3rNDuSfI79vCb73Nc0tbg7qQJCm4OO8Ae6s7H40xKwqLZL0dUsJF RPCPinbZqhWAOR2P+0z3GCI8GUogJghPkN54FOfAkXUf5DyiAVKR0SY24kkTuXd7jOou JBBmOmwZ0/whcEmjC0wUu026bXE2kHPfvFUVeO025SoaF4v5XOy0RtbDEyA9xAvccICj la9LQwBKMn7l7fAl3p7PLN2sYlOQ5fuBGmPswfmpt2NorFHrbbCzU4W7WYKj1jiMzFcF yh+g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=CeCAWyFr; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-74410-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74410-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d5-20020a17090ab30500b002995fa56919si1137196pjr.15.2024.02.21.01.37.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 01:37:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-74410-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=CeCAWyFr; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-74410-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74410-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id D9550B25A05 for ; Wed, 21 Feb 2024 09:32:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DF74345BFE; Wed, 21 Feb 2024 09:28:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="CeCAWyFr" Received: from mail-yw1-f174.google.com (mail-yw1-f174.google.com [209.85.128.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5237445977 for ; Wed, 21 Feb 2024 09:28:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708507717; cv=none; b=HmJWcBuXwGyVM59xAxELDJLUmf2GvxpOWQ8dbJNJV0y2rnzX6TwJXd5M39gn6PSikT23l5h/XC06v6/apn1yRTcRQ9KyjlPkNh7WpqI9uwXY98GkPa1P/e7QF8sFbDT2MLtsL0ZvvK9LdnnpOsP0NR1XCylvjzLVip4BuI+HKjg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708507717; c=relaxed/simple; bh=Hq8KJ6FUW+dUn5EF4x4k+Yc0eSHWRUNZYxQmVAAMYJc=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=mo/XZQTQHiYSRLWeOMAnHoBCudeE134z05VwCPJsr9NVDC2h77pJ9Ryi8RME4HBMaYDEeZaRRTsNMtI3eC5bWg0s0QC7FRzIJ883uKK/vRPIGn5E9JaeY61Rnr+bwvUdDvQIuGKXiSuplkzml9bdo5BXWymNonGFd4YUhLbQXEY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=CeCAWyFr; arc=none smtp.client-ip=209.85.128.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-yw1-f174.google.com with SMTP id 00721157ae682-60818d338bfso34852097b3.0 for ; Wed, 21 Feb 2024 01:28:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1708507715; x=1709112515; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Hq8KJ6FUW+dUn5EF4x4k+Yc0eSHWRUNZYxQmVAAMYJc=; b=CeCAWyFrEP23vabvzE9+4zzalLAR+p93QODZQ9HwjaqT451oHESJm3T3jyCJ3m5bOW mrbi3cbXF8JCNgEXFceTnb8MinIWXVWUPnSSoQMvEp/1YWTew6so6vjUubC12nzj4BXR 3PWq1ulo7IBO3sTQ76GQeYG2gTJi2rmOuG1T3QLSJvmlErbBWEiJDc0foghpHrSDIFtu qjtPRfjKA+2CeXyrN+cmNPJRNnJOr3F24d1oXQRHfdZotXTnX4V/MMQQyWROklIBB7Oz Y4nRsvnAQD/dcvt6ac9OndehZLsxIEoxqDjMj25CAGxsQFRewZiJdYt6Pi1Vom7nHEDK jpKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708507715; x=1709112515; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Hq8KJ6FUW+dUn5EF4x4k+Yc0eSHWRUNZYxQmVAAMYJc=; b=iMFRSpkmQ4hJNoO11ZtKa2rDbJ2xQRmUZhboBaVhiEc6N3LIOJy5XqaeCfKEgM8fau YDYOr7jVATI49/i27Mf7R88fF75cg6KZ4nr7o0+3R6qSrKuwG1XVdPmU/dMbaJ4pR6xb HmTFUEEAqY6jeFr1x1KKLa3vU7WdBG/l6VHVJXgpIoQ0Bs0iYGvP19ZCxsKjKrHlqMAd 5q2HPDOOzfvSpdV7TNd/W2aqmyE+DosXiupsqfr1EdraAZZCCgzqrbwCerMdpJHNDVh+ Y/5EgRY5KhF1R/PC40cb4Zj0lJ9rzZubT4L5EakK7aFBkgrMBvDlBpAfA12XV8JOSHZh BMFg== X-Forwarded-Encrypted: i=1; AJvYcCUyW9c6splakWR8UPU+rNwBj1UuB/am3W1EmcvKqhfGBcwQrZNBhOoKJVVrrd9iYKhLffJus3LgjmWF6GzEzUy1qtZuBg+HWYXl8azN X-Gm-Message-State: AOJu0Yzrc57aG7UnYynWGOUlXF/HD0bGcbaIje/Q2/Mh5oBpe5ypu0RG VgcCslQAsq3DwjFjw2ft0QWca3TT1vHysY7X2b4fS3WNA42RNMNnsD49GvntB0nzrq+DobPcZIi lji28CpF2IymFFIwyXDqBG55gJZcTM1MS4jm8 X-Received: by 2002:a0d:e8c7:0:b0:604:dd57:7845 with SMTP id r190-20020a0de8c7000000b00604dd577845mr17964155ywe.2.1708507715007; Wed, 21 Feb 2024 01:28:35 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240208152808.3712149-1-howardyen@google.com> <20240213055426.GA22451@lst.de> <20240220055241.GA7554@lst.de> In-Reply-To: <20240220055241.GA7554@lst.de> From: Howard Yen Date: Wed, 21 Feb 2024 17:27:58 +0800 Message-ID: Subject: Re: [PATCH v3] dma-coherent: add support for multi coherent rmems per dev To: Christoph Hellwig Cc: 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Feb 20, 2024 at 1:52=E2=80=AFPM Christoph Hellwig wrot= e: > > On Mon, Feb 19, 2024 at 07:12:18PM +0800, Howard Yen wrote: > > I tried to upload the patch to support multiple coherent rmems per devi= ce > > because in some system, the primary memory space for the device might > > be limited, so that add multiple coherent rmems support per device to s= atisfy > > the scenario. > > I'm not sure what the means. > > If you have non-trivial patches you really need to explain why you're > doing in detail as you need to convince maintainers that it is useful. Thanks for the response, let me explain more. 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. -- Regards, Howard