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 841E5D3C53F for ; Mon, 21 Oct 2024 06:19:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:References:Cc:To:From:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=qX4zIhNfxYlQrlR7WHo7Qz8LQENp4Om9Aokp2bYEp7U=; b=XKsPMOpBPJgygtqMPGLxajCEDV o0Nd5SqYRoTF3dwCHFbBDF6yhb0iyY4ewUb83VT2tkQarmjp3c4AvVMy+NhKVhonBi3nhviQ+olt0 f6wlIjZ4KLlh2cwYydtXX+2WSaBciyI6+/+Oag47z4a/QQPPPnj+4P6BUeC3MXSFKIs4SAJCbAjuI KjIXWs02DHIkS9CGrxPkcfTx9kEYDihCIDsx+qVDNws2kSnPgtvbKdig5uGLXc+wYb9kJX0jGWry/ 9R0sXJ6cVcBQcVyuMW6ziBVvH4+oRtDMWtYghMC1t0ifjwNtRvtXnUX+saZ1cTJyw7ItUlcWmcI49 oTvSlW1Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t2llY-00000006Brk-1TbV; Mon, 21 Oct 2024 06:19:44 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t2lk4-00000006BkG-0U9i for linux-arm-kernel@lists.infradead.org; Mon, 21 Oct 2024 06:18:13 +0000 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-37d8901cb98so3220946f8f.0 for ; Sun, 20 Oct 2024 23:18:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729491490; x=1730096290; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=qX4zIhNfxYlQrlR7WHo7Qz8LQENp4Om9Aokp2bYEp7U=; b=CYHNrdzJkk10mKXa+5ziOdMIgshSMetyNhK2A0BdHET7ge3sCzD6St0f1B78FqZtDc rkxyVF7le4I0HaYZsWrL2o+8SzJiB9qmw58JnugGLYTvNrC1dIj6fSAX9UUD1D/tURdu jl7TLYFvltKq+Y2dr1nZCWEwoQjBFSQr5t/qRGXB2Cu6xGzuQNRpySv7IWpVEXCncVV5 /h2Q5KUsW2CR0kdqndxpQB0vuFBMjbD3jBhGznn/Faoas67AGxYFGibQ3+OmOawCr1tR Vz0tqqeGlmFM85sFtE2j4F6kGXM+SwzPyDXxxbkj1wrDfpVEHrD64xPnGs6XBXNjsdgU zdkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729491490; x=1730096290; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=qX4zIhNfxYlQrlR7WHo7Qz8LQENp4Om9Aokp2bYEp7U=; b=Sed2/4jH17w+CAjKy6ksebERBA9qKmWOj1OL16AkgMx4gpJcdA5DPd8j6jkQFTbhoc cXIaMj+dniNLScaIHLXG+kP/xeosjzkRvCLAQoR+r8AiRdFC8JKI1zxToDFa7qRodQSm tc58J6XcYIXxmMQNTUzYreAp4TJ62PLQx8tnyKyjvPe0nffQVpcGvd4EuMEiOxt64t/0 DOwl5QzFixpmZ3U3R4t5JhvY4o4ioBLH+eMGkeUtdXDhr+6flCdGmfm0VqqvvDDO8Y5M BVYXzDZHSbigZtXvEVzffjbrzczNVhi8Uk+cArNpWhNt1Yc4R8pLPKBKDtvN+qNBgLjK X0FQ== X-Forwarded-Encrypted: i=1; AJvYcCWCOS6yODs5mp7qrBQ9f1lC8pYu4NeEG5F64vsZIk/YYkOEeci3+8CQmMw0qtHmMyJk/Nxl0cg01e46STJDxeRh@lists.infradead.org X-Gm-Message-State: AOJu0YzSG46u/GBqObkYc6pAytGQqj2ck+4p/SwH705qkft+CQDbSLSJ Wmi6wfu6MxMexdXrQyzBhVUtZnXf4gbdYpgLnlSjk+mTa7PTk4Lo4EPhFS+4KF8= X-Google-Smtp-Source: AGHT+IFzCvQqkE64bi/xeJMd7XgYjjCcYTd15/aGONceMWdvvyWn015PNuTIjGOK5MpJw4Jfe1ZObQ== X-Received: by 2002:a05:6000:e83:b0:374:cee6:c298 with SMTP id ffacd0b85a97d-37d93e2492bmr9009274f8f.21.1729491489769; Sun, 20 Oct 2024 23:18:09 -0700 (PDT) Received: from [192.168.0.157] ([82.76.204.4]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37ee0b9bb4dsm3378273f8f.97.2024.10.20.23.18.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 20 Oct 2024 23:18:09 -0700 (PDT) Message-ID: <1df84f83-40d7-4719-a9f9-dfa10d25c667@linaro.org> Date: Mon, 21 Oct 2024 07:18:07 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/2] mailbox: add async request mechanism to empower controllers w/ hw queues From: Tudor Ambarus To: Jassi Brar Cc: krzk@kernel.org, alim.akhtar@samsung.com, mst@redhat.com, javierm@redhat.com, tzimmermann@suse.de, bartosz.golaszewski@linaro.org, luzmaximilian@gmail.com, sudeep.holla@arm.com, conor.dooley@microchip.com, bjorn@rivosinc.com, ulf.hansson@linaro.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, marcan@marcan.st, neal@gompa.dev, alyssa@rosenzweig.io, broonie@kernel.org, andre.draszik@linaro.org, willmcvicker@google.com, peter.griffin@linaro.org, kernel-team@android.com, vincent.guittot@linaro.org, daniel.lezcano@linaro.org References: <20241017163649.3007062-1-tudor.ambarus@linaro.org> <20241017163649.3007062-2-tudor.ambarus@linaro.org> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241020_231812_207590_45084B77 X-CRM114-Status: GOOD ( 20.90 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, Jassi, On 10/18/24 8:49 AM, Tudor Ambarus wrote: >>> The active request is considered completed when TX completes. But it seems >>> that TX is not in direct relation with RX, >>> >> Correct, and it is not meant to be. >> You are assuming there is always an RX in response to a TX, which is > Not really. If there's no response expected, clients can set req->rx to > NULL. Then the controllers know that no response is expected and can > complete the request when TX completes. > >> not the case. Many platforms just send a message and only need to know >> when it is sent. Many platforms only listen for incoming messages. > these 2 cases are covered with the req approach. > >> Many platforms have TX and RX but not as parts of one exchange. In > I don't think I understand this case. Is it related to what you describe > below? > >> fact, only minority of platforms expect RX after each TX. Btw, what if > Right, I noticed. > >> some platform sends only and always after each receive? For these > This case is covered as well with the req approach. One just needs to > serialize the requests: > > ret = mbox_send_request(dc->mbox_chan, req1); > ret = mbox_wait_request(ret, req1->wait); > if (ret) > return ret; > > // req1 completed, send req2 > ret = mbox_send_request(dc->mbox_chan, req2); > ret = mbox_wait_request(ret, req2->wait); > if (ret) > return ret; > > This shall work regardless if the client expects a response or not. If > no response is expected, but just a TX completion, then the client can > set req->rx = NULL. > >> reasons, it is left to the user to tie an incoming RX to some previous >> TX, or not. Is there a specific driver that I can look at in order to understand the case where RX is not tied to TX? It will speed me up a little. Also, if you think there's a better way to enable controllers to manage their hardware queues, please say. Thanks, ta