[{"id":3672840,"web_url":"http://patchwork.ozlabs.org/comment/3672840/","msgid":"<CABb+yY0ub51k-eFpPfgARXtwYjWzRSjbPDLtoMD77YQR8JH+=Q@mail.gmail.com>","list_archive_url":null,"date":"2026-04-02T17:59:32","subject":"Re: [PATCH v3 1/2] mailbox: Use per-thread completion to fix wrong\n completion order","submitter":{"id":4220,"url":"http://patchwork.ozlabs.org/api/people/4220/","name":"Jassi Brar","email":"jassisinghbrar@gmail.com"},"content":"On Thu, Apr 2, 2026 at 12:07 PM Joonwon Kang <joonwonkang@google.com> wrote:\n>\n> Previously, a sender thread in mbox_send_message() could be woken up at\n> a wrong time in blocking mode. It is because there was only a single\n> completion for a channel whereas messages from multiple threads could be\n> sent in any order; since the shared completion could be signalled in any\n> order, it could wake up a wrong sender thread.\n>\n> This commit resolves the false wake-up issue with the following changes:\n> - Completions are created just as many as the number of concurrent sender\n>   threads\n> - A completion is created on a sender thread's stack\n> - Each slot of the message queue, i.e. `msg_data`, contains a pointer to\n>   its target completion\n> - tx_tick() signals the completion of the currently active slot of the\n>   message queue\n>\nI think I reviewed it already or is this happening on\none-channel-one-client usage? Because mailbox api does not support\nchannels shared among multiple clients.\n\nThanks\nJassi","headers":{"Return-Path":"\n <linux-tegra+bounces-13545-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-tegra@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=oRDRVYNO;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-tegra+bounces-13545-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=\"oRDRVYNO\"","smtp.subspace.kernel.org;\n arc=pass smtp.client-ip=209.85.167.180","smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=gmail.com"],"Received":["from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fmqQ76zwSz1yCs\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 03 Apr 2026 05:00:15 +1100 (AEDT)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id B0A6B3012C48\n\tfor <incoming@patchwork.ozlabs.org>; Thu,  2 Apr 2026 17:59:46 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 8C5C93E3DBD;\n\tThu,  2 Apr 2026 17:59:46 +0000 (UTC)","from mail-oi1-f180.google.com (mail-oi1-f180.google.com\n [209.85.167.180])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 24D4A3DA5CE\n\tfor <linux-tegra@vger.kernel.org>; Thu,  2 Apr 2026 17:59:45 +0000 (UTC)","by mail-oi1-f180.google.com with SMTP id\n 5614622812f47-4671cbce32bso261633b6e.3\n        for <linux-tegra@vger.kernel.org>;\n Thu, 02 Apr 2026 10:59:44 -0700 (PDT)"],"ARC-Seal":["i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775152786; cv=pass;\n b=j7z2ms/9lK2OfHu2Y1TnAoeWCrG58UEkvQjUi17LnswZ7WNFNTuGe+qxF8B/v7I1Y0F9kscQsz0zUXrV/PQZXs6/rF1TOt+zhey3tgMQXe2D3wWA2O48NNJwwvcXnfR/TCeBOuBsAZh1UZiPErt9LdjfLpKWj2XjmqrjaJEMN58=","i=1; a=rsa-sha256; t=1775152784; cv=none;\n        d=google.com; s=arc-20240605;\n        b=eLEZPZQdmvCdhSE1PiDSJn/q0m5M43ynBaw+6CVo4JCNPNa9E/efNBBcfQqg7K9rDS\n         Ng7FQTJsl0QHiIWtk5l6V7JuIy0A+5TJiKMBRQZMFPg5klajHDjfLhBLmYRjl0wNdQU9\n         BXsvsolvQUFwkvgl1M72lkrcCFYtjTGTJ4MmrXw7I7GLc98KYdPxAqv+fmy0ceLCmQGt\n         r9ZQFuI4f4yAFgZbhprp5BjdJQ5LNDubTaAphAlg3oODArNTCjbSPDbhVBgOl5zgoqmk\n         l1rSmlFhM+5Xz0x9DI46rgM2Xi3HRpxiymyotgoZORR3qmyZB2kCpl4F1hxpJs9PlAfk\n         GWmg=="],"ARC-Message-Signature":["i=2; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775152786; c=relaxed/simple;\n\tbh=h8gHEy/QL3Y3VZcM7IRovIie1NiKMInttxTfM5XohLM=;\n\th=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:\n\t To:Cc:Content-Type;\n b=To3LTBCtef80dtfeRg8wsGGntq7UwjV9ciK35A6ZhWmsIqeL8N3Zi1DAHZwKo6jXJFg7JrYbzIowtycn8pG3j0I0exCmJYQLwMrymAEmlCr9A0lQmzg1/SUsSZfMDAG/rXZe1h7eiDlL6SbyiOMRApDHoPIhonVjZ4irZ4Ed5hg=","i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n s=arc-20240605;\n        h=content-transfer-encoding:cc:to:subject:message-id:date:from\n         :in-reply-to:references:mime-version:dkim-signature;\n        bh=6oBfne9CbSq7TsD62MWlNbHi0ATWBOcJIGvZTuwhO+c=;\n        fh=/ZBHHMb1tlO5RQ7wY4/LTraVfDQor2E8taF5atXsbuA=;\n        b=QgwYgZaEKE6bCNrjAqokJNErQ03M9/6x715t9VbD1MWtEu92oOb/TILY66MMRwkgQC\n         a373Q3mGqrcX5Ih3ZDQykey7ULKd5TqnYquFaGzW0yHphNdzVSL8XWC9PUWaRu145gVW\n         j26lxb5ADor5xiRq+88Ji+JSQsedFUzqRlw7x4Fkp1ZWV/k/I0q7QsYNoBGVyIoZrUJA\n         ojnKxsqLtGr9Qc1YhzAAF5rV1rO3V6TzJRpU2XyHMbmQpP0TT42dqxlO/Dx7X5q8iOXx\n         J7GwnyQzRsIzVGNgWaVlxFTkKLT7d+l1FliG2KVhg+jN7pj2yyca/VJV74o2zE+sOT7d\n         +8+g==;\n        darn=vger.kernel.org"],"ARC-Authentication-Results":["i=2; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com;\n spf=pass smtp.mailfrom=gmail.com;\n dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=oRDRVYNO; arc=pass smtp.client-ip=209.85.167.180","i=1; mx.google.com; arc=none"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1775152784; x=1775757584;\n darn=vger.kernel.org;\n        h=content-transfer-encoding:cc:to:subject:message-id:date:from\n         :in-reply-to:references:mime-version:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=6oBfne9CbSq7TsD62MWlNbHi0ATWBOcJIGvZTuwhO+c=;\n        b=oRDRVYNOSBnKTAVxkKyJokHK2Vhg+kFwt7+Xj9sByK9O45EV2zmpAj26sVwijltkRb\n         TmZ3LRBGwWKalGdDgffYzclhmxhQXGr8Td2zvBNZDER+HUhkgnMHlk27gQc84p6xnTb+\n         6HU1buSBR9filMZRXdm6P2u2bMbrgskRFadqHQYMDcJjw0nvl5z1K6pPCOfAtcIXCjTH\n         pTx8UMrgZ0oXMU06DIRwEYcwhRuxPicjnbEya2AvMmUnuIjdaIjcXryjzv9+NwKaoM7T\n         CFSd9G3v3QG6sBX8V7fEGz5hg9oVHDobnUFr+EkNAKFvxBCuhTpXwD9UEpEoGl/6QGeI\n         Bdow==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1775152784; x=1775757584;\n        h=content-transfer-encoding:cc:to:subject:message-id:date:from\n         :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from\n         :to:cc:subject:date:message-id:reply-to;\n        bh=6oBfne9CbSq7TsD62MWlNbHi0ATWBOcJIGvZTuwhO+c=;\n        b=Mhf1RFyx34cEFkq+JGjk6BaP6wCXX0RoV9eIpjJTCaKquuY6omnRFZ2enhrs2wyeWn\n         5ufVvt1sCL68lWbukh0CqEMLod8fhsgfiu5z2gqXOu/u0YaTWN3H63FyYu+aXU9D1UYx\n         Maav94v00+UeIOS5PjhanP54zcHQUvIzeoD4+wgPT+NxgKZ59m6e0Y9+hJU3TU+6HDvG\n         23SBw5oqCabNuShrszpbujAwLwCo1mMnJ3yv0vq0ZoTOgQgIVKl/momcu4PMhA1cfGHd\n         qiAOdlreqSK9ZPOtQsa7BGPSlp2OAwS25UtoPiO5rifHXCRBlLLV9sTv7xFMY4SbN6Nb\n         HszA==","X-Forwarded-Encrypted":"i=1;\n AJvYcCUrd+1Z74Zl3F+nzN7TazuwFef+PSd6mXeMhbkXe2Mgqlg5qNZ/LeL7OcQvw4dvyc1I5gOHUBg2llsatw==@vger.kernel.org","X-Gm-Message-State":"AOJu0Yy6t1MMe301Gf4GjnMe3RpnFtt6Gx1azxC0zFXZ+8idE6Zpee67\n\tdY6iC4mxlJuWCbnbG41OMrupAus4GjWOxFc49D1mWZRbswO+zD3WDIjVllqbvPZvJlVMV/lNVYE\n\tQOv+gwHwTdPjUkutR8GW6Tb2VVpKbNmM=","X-Gm-Gg":"ATEYQzx5AyiRqVrorvQjqXVgdst0XK6iTAG9Z9CB3CpSQLLXqwgYvbS0M7HWU+3BFWI\n\t6+C+de4Dy6jfWET78FYUHj1BZxZTRUcPKs+5bU1qCHy+BfJMwX7vsGbHlqH2CLUrwr3cE6py6Ky\n\tY4szgbjzwFoiyUjuoZMzOPQgcHsUTMu72w1TbotLzsYd0daksKQ58IsAAyQomlq+WPNjwD4WWnK\n\tLgEAHwF+1MVV53IyTkVUPfTtGVOk6ymS9NLrgDT9ZlcxA4irblTJ/9ht312+/ai9XPbQDy4YZj/\n\t3QJDKvLN","X-Received":"by 2002:a05:6808:d47:b0:450:bbed:7a75 with SMTP id\n 5614622812f47-46ef7309386mr165326b6e.28.1775152783969; Thu, 02 Apr 2026\n 10:59:43 -0700 (PDT)","Precedence":"bulk","X-Mailing-List":"linux-tegra@vger.kernel.org","List-Id":"<linux-tegra.vger.kernel.org>","List-Subscribe":"<mailto:linux-tegra+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-tegra+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","References":"<20260402170641.2082547-1-joonwonkang@google.com>\n <20260402170641.2082547-2-joonwonkang@google.com>","In-Reply-To":"<20260402170641.2082547-2-joonwonkang@google.com>","From":"Jassi Brar <jassisinghbrar@gmail.com>","Date":"Thu, 2 Apr 2026 12:59:32 -0500","X-Gm-Features":"AQROBzAmx7Mp6DrgKOrwAcb8k8UUyDzlYzRN_6Wdz-72pTbSanHYGSjh0AuoTJQ","Message-ID":"\n <CABb+yY0ub51k-eFpPfgARXtwYjWzRSjbPDLtoMD77YQR8JH+=Q@mail.gmail.com>","Subject":"Re: [PATCH v3 1/2] mailbox: Use per-thread completion to fix wrong\n completion order","To":"Joonwon Kang <joonwonkang@google.com>","Cc":"matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com,\n\tthierry.reding@gmail.com, jonathanh@nvidia.com, linux-kernel@vger.kernel.org,\n\tlinux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org,\n\tlinux-tegra@vger.kernel.org, stable@vger.kernel.org","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable"}},{"id":3673157,"web_url":"http://patchwork.ozlabs.org/comment/3673157/","msgid":"<20260403145119.2581034-1-joonwonkang@google.com>","list_archive_url":null,"date":"2026-04-03T14:51:18","subject":"Re: [PATCH v3 1/2] mailbox: Use per-thread completion to fix wrong\n completion order","submitter":{"id":91088,"url":"http://patchwork.ozlabs.org/api/people/91088/","name":"Joonwon Kang","email":"joonwonkang@google.com"},"content":"> On Thu, Apr 2, 2026 at 12:07 PM Joonwon Kang <joonwonkang@google.com> wrote:\n> >\n> > Previously, a sender thread in mbox_send_message() could be woken up at\n> > a wrong time in blocking mode. It is because there was only a single\n> > completion for a channel whereas messages from multiple threads could be\n> > sent in any order; since the shared completion could be signalled in any\n> > order, it could wake up a wrong sender thread.\n> >\n> > This commit resolves the false wake-up issue with the following changes:\n> > - Completions are created just as many as the number of concurrent sender\n> >   threads\n> > - A completion is created on a sender thread's stack\n> > - Each slot of the message queue, i.e. `msg_data`, contains a pointer to\n> >   its target completion\n> > - tx_tick() signals the completion of the currently active slot of the\n> >   message queue\n> >\n> I think I reviewed it already or is this happening on\n> one-channel-one-client usage? Because mailbox api does not support\n> channels shared among multiple clients.\n\nYes, this patch is handling the one-channel-one-client usage but when that\nsingle channel is shared between multiple threads. From my understanding, the\ndiscussion back then ended with how to circumvent the issue rather than whether\nwe will eventually solve this in the mailbox framework or not, and if yes, how\nwe will, and if not, why. I think it should still be resolved in the framework\nfor the reasons in the cover letter. Could you help to give a second review\nwith regards to those aspects?\n\nThanks,\nJoonwon Kang","headers":{"Return-Path":"\n <linux-tegra+bounces-13552-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-tegra@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256\n header.s=20251104 header.b=KFEIvQTc;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-tegra+bounces-13552-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=google.com header.i=@google.com\n header.b=\"KFEIvQTc\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.214.202","smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=google.com","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=flex--joonwonkang.bounces.google.com"],"Received":["from tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fnM9v2kVzz1yCs\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 04 Apr 2026 01:51:31 +1100 (AEDT)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 4BDA7301E9A7\n\tfor <incoming@patchwork.ozlabs.org>; Fri,  3 Apr 2026 14:51:24 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 2D09F3C3BF2;\n\tFri,  3 Apr 2026 14:51:23 +0000 (UTC)","from mail-pl1-f202.google.com (mail-pl1-f202.google.com\n [209.85.214.202])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id DB478392815\n\tfor <linux-tegra@vger.kernel.org>; Fri,  3 Apr 2026 14:51:21 +0000 (UTC)","by mail-pl1-f202.google.com with SMTP id\n d9443c01a7336-2b0b339b8dbso20410945ad.0\n        for <linux-tegra@vger.kernel.org>;\n Fri, 03 Apr 2026 07:51:21 -0700 (PDT)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775227883; cv=none;\n b=lPRF3prb3udWblPC+7BzmeBog4ALWslf1vFahDtTtZoWCLpuYP2Wj+qdLVgBx4iyYLJqOYCCb/tEkSFuWuK98gRZphClrvvaVwI85B49/Y6/9R1diKtRc9h5YxhXngahtEeW5kZNvuPk7McBOJszd6Av56bXKCNJjzBNTjwpYhk=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775227883; c=relaxed/simple;\n\tbh=lzi8vanqoY23RZvoxmfl6DfLoVT0+U5Of4Av0npR8KQ=;\n\th=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From:\n\t To:Cc:Content-Type;\n b=nDoJZIpM8EMJAe48aptnJ0gA5JX5Erd8nyDlDIbi8yTqcv+D5GjBn+Zbu7SWQwIjzqaoQtenFB2sXg/ICXVHtkeJ2dzLkjx4McwXJ7UfZSAFOFyzCrvVaNubbszT9NUXk2Pqm2xDUbGtyidnkDX0CxoHppLb9PV/2y+1wG79YPA=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=google.com;\n spf=pass smtp.mailfrom=flex--joonwonkang.bounces.google.com;\n dkim=pass (2048-bit key) header.d=google.com header.i=@google.com\n header.b=KFEIvQTc; arc=none smtp.client-ip=209.85.214.202","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=google.com; s=20251104; t=1775227881; x=1775832681;\n darn=vger.kernel.org;\n        h=content-transfer-encoding:cc:to:from:subject:message-id:references\n         :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id\n         :reply-to;\n        bh=UsueJAB8iWMZmH12hTqYKPYVxfUoBPtsPuD5qctzJns=;\n        b=KFEIvQTcxayFA/382PfH+WayA5yJekNqxGLlSBajU76J27sEf46lei5Xn8zQp6OeUH\n         KcZ9BhTcHPVTIclssmpgmbDtjcubOh9DafzEdXeOdKl7gHH0FeWYqI5NSm3cpOKbWEr9\n         g3dDWzcg4VmaapDUKTcDPLUr5KMiKBFnjnA6Ch7XDYdA3EUDl0gJvSYnjhkA83Ue/kYi\n         6T+U7b9OPCkDeff3OtbBCIpxETm7ZUxBlUeFEVKoKWg8ar4InveULdQjyVpD5zKBWJwu\n         bIJDhSlOvohto8w6zSO9T1c2TlYp/Puc6DPLAscxTH5dNXTpCF2kErmxfqJoaPdroSJ+\n         kU4w==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1775227881; x=1775832681;\n        h=content-transfer-encoding:cc:to:from:subject:message-id:references\n         :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject\n         :date:message-id:reply-to;\n        bh=UsueJAB8iWMZmH12hTqYKPYVxfUoBPtsPuD5qctzJns=;\n        b=WZx2BbqXZsWjI2kPXAT2ZcN5A7D+JvinXWlVSFN20He4PMA0mfjlh5j8Xi5VxSKXoF\n         AcUEUV+f96sO3ExCNFoKGm0QpsgM4zwhOiOyX0fpSo3L9YSOpP5myhTt7ZSOsuED4zt7\n         SIjiYOoU9nnO3myE9Jmxfy511OWsC671LEdfZr/dDdCcml8g3zqTnEuEEiE0/5VkOyqe\n         maDnX82CUU3dCM7z6po8H+l3KX6yysvXogsoG+TvJScwS0G1w7RX3e3A26j2E9Jl0kAw\n         seNFEVrNRUoxBfq0ys5NmMMMLMDz5HN4/FSPIE6JjGnfeoQ8g358WodXJPMzclBmiouK\n         u7HA==","X-Forwarded-Encrypted":"i=1;\n AJvYcCUprXA3stQPSHRvdihZeYZADqD01mQH9PBSIbqYPGRCmwtuqpiBG0+2EQFoEBx6YmTyJ19OTD9baV4BGQ==@vger.kernel.org","X-Gm-Message-State":"AOJu0YwHxvbN0hIkzrQmVe5v28YsODG5dCZ4KOoMh9CmOy2FC/2A7Bi+\n\trHYGEw5zdFCwpKPqvK5Rg4y2WfUxWZXkL4hskys2mz96kayLNZpI8MjBgpSA7DHtYUVnXFruFwN\n\t9bMZUhPVCNYoTr9oPiwDwkChf6g==","X-Received":"from plblw8.prod.google.com ([2002:a17:903:2ac8:b0:2b0:af9b:aa3c])\n (user=joonwonkang job=prod-delivery.src-stubby-dispatcher) by\n 2002:a17:903:2ac5:b0:2b2:42da:25cc with SMTP id\n d9443c01a7336-2b28163ad55mr35530115ad.1.1775227881118;\n Fri, 03 Apr 2026 07:51:21 -0700 (PDT)","Date":"Fri,  3 Apr 2026 14:51:18 +0000","In-Reply-To":"\n <CABb+yY0ub51k-eFpPfgARXtwYjWzRSjbPDLtoMD77YQR8JH+=Q@mail.gmail.com>","Precedence":"bulk","X-Mailing-List":"linux-tegra@vger.kernel.org","List-Id":"<linux-tegra.vger.kernel.org>","List-Subscribe":"<mailto:linux-tegra+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-tegra+unsubscribe@vger.kernel.org>","Mime-Version":"1.0","References":"\n <CABb+yY0ub51k-eFpPfgARXtwYjWzRSjbPDLtoMD77YQR8JH+=Q@mail.gmail.com>","X-Mailer":"git-send-email 2.53.0.1213.gd9a14994de-goog","Message-ID":"<20260403145119.2581034-1-joonwonkang@google.com>","Subject":"Re: [PATCH v3 1/2] mailbox: Use per-thread completion to fix wrong\n completion order","From":"Joonwon Kang <joonwonkang@google.com>","To":"jassisinghbrar@gmail.com","Cc":"angelogioacchino.delregno@collabora.com, jonathanh@nvidia.com,\n\tjoonwonkang@google.com, linux-arm-kernel@lists.infradead.org,\n\tlinux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,\n\tlinux-tegra@vger.kernel.org, matthias.bgg@gmail.com, stable@vger.kernel.org,\n\tthierry.reding@gmail.com","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable"}},{"id":3673202,"web_url":"http://patchwork.ozlabs.org/comment/3673202/","msgid":"<CABb+yY0uDQh-3cadPQONV=NJKjMtc4mJekgjmHYVaHnfHXvGZQ@mail.gmail.com>","list_archive_url":null,"date":"2026-04-03T16:19:51","subject":"Re: [PATCH v3 1/2] mailbox: Use per-thread completion to fix wrong\n completion order","submitter":{"id":4220,"url":"http://patchwork.ozlabs.org/api/people/4220/","name":"Jassi Brar","email":"jassisinghbrar@gmail.com"},"content":"On Fri, Apr 3, 2026 at 9:51 AM Joonwon Kang <joonwonkang@google.com> wrote:\n>\n> > On Thu, Apr 2, 2026 at 12:07 PM Joonwon Kang <joonwonkang@google.com> wrote:\n> > >\n> > > Previously, a sender thread in mbox_send_message() could be woken up at\n> > > a wrong time in blocking mode. It is because there was only a single\n> > > completion for a channel whereas messages from multiple threads could be\n> > > sent in any order; since the shared completion could be signalled in any\n> > > order, it could wake up a wrong sender thread.\n> > >\n> > > This commit resolves the false wake-up issue with the following changes:\n> > > - Completions are created just as many as the number of concurrent sender\n> > >   threads\n> > > - A completion is created on a sender thread's stack\n> > > - Each slot of the message queue, i.e. `msg_data`, contains a pointer to\n> > >   its target completion\n> > > - tx_tick() signals the completion of the currently active slot of the\n> > >   message queue\n> > >\n> > I think I reviewed it already or is this happening on\n> > one-channel-one-client usage? Because mailbox api does not support\n> > channels shared among multiple clients.\n>\n> Yes, this patch is handling the one-channel-one-client usage but when that\n> single channel is shared between multiple threads.\n\nhmm.... how is this not single-channel-multiple-clients ?\nA channel is returned as an opaque token to the clients, if that\nclient shares that with other threads - they will race.\nIt is the job of the original client to serialize its threads' access\nto the channel.\n\n> From my understanding, the\n> discussion back then ended with how to circumvent the issue rather than whether\n> we will eventually solve this in the mailbox framework or not, and if yes, how\n> we will, and if not, why.\n\nIt will be interesting to see how many current clients actually need\nto share channels. If there are enough, it makes sense to implement\nsome helper api\non top of existing code, instead of changing its nature totally.\n\nThanks\nJassi","headers":{"Return-Path":"\n <linux-tegra+bounces-13555-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-tegra@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=LSqLh9dz;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.232.135.74; helo=sto.lore.kernel.org;\n envelope-from=linux-tegra+bounces-13555-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=\"LSqLh9dz\"","smtp.subspace.kernel.org;\n arc=pass smtp.client-ip=209.85.210.49","smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=gmail.com"],"Received":["from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fnP890y7mz1yCs\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 04 Apr 2026 03:20:09 +1100 (AEDT)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sto.lore.kernel.org (Postfix) with ESMTP id 41D1C300A332\n\tfor <incoming@patchwork.ozlabs.org>; Fri,  3 Apr 2026 16:20:06 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id D023D3C9EE6;\n\tFri,  3 Apr 2026 16:20:04 +0000 (UTC)","from mail-ot1-f49.google.com (mail-ot1-f49.google.com\n [209.85.210.49])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 74B212517A5\n\tfor <linux-tegra@vger.kernel.org>; Fri,  3 Apr 2026 16:20:03 +0000 (UTC)","by mail-ot1-f49.google.com with SMTP id\n 46e09a7af769-7d7eb85fb81so2115283a34.0\n        for <linux-tegra@vger.kernel.org>;\n Fri, 03 Apr 2026 09:20:03 -0700 (PDT)"],"ARC-Seal":["i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775233204; cv=pass;\n b=IuBiwclW0j3GcpIiPFiIIFTMh7yldnjgZlk+ARhcwiHviDA9EgkUxCUaE/8Ax47dW1I67/QAdh202G1aACelqV0+xcWNOBkLqEGN/oMNRFMLjrng2Wmtt7NAJutl2NI2yzw5d9fCbP2ESaqUPAUAx0i5GN7wvWga/4k9lXOI/ow=","i=1; a=rsa-sha256; t=1775233202; cv=none;\n        d=google.com; s=arc-20240605;\n        b=V6QjLSCF4zoSEKsVvlU7kIW4HYxZvsXyoHPnDk5kw0UDwZXABtTzQOBp1LSQbkmyow\n         OIKog63sB+IDcravS3PFH1m0STyszKdk18p/enLOcuugl41IVUMnG/SDJt0alD3fxXId\n         ECZkee5Clf56/sfWduQVYBE/SqZJknZ0iI9HUH17Ip/AgZ6yXBJkrOBOqHw0GKJ16/RE\n         ao5z+zt6J3FbgHRlK5OalcOK2MX/eOvdKkElhISKZDitjWCG/1YHr8g9CuxHG3zdMmdQ\n         7rhyr1mipfT/eCle2Cw5u7XGDVFthsc7WfcnQSlR2nHCTnN+Sszkxe55b71MpxPQEuOI\n         lnhw=="],"ARC-Message-Signature":["i=2; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775233204; c=relaxed/simple;\n\tbh=D1y1DSZ24fieEFS/2aK46LPRiEzKTQE6w5wGIEwhqyA=;\n\th=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:\n\t To:Cc:Content-Type;\n b=CcnPEF0QYcqTueh5HCCaOvXCSf1wgftihLoQD1+rwiLsPETP4EHkeKtNjWcEHdiX2LRuQcdWOrThkjOtXyVxIqOgjGZ2yK+avGSzjaDFFgl/FCXmWci8ObNQRG9U/qaTz6GdQk/qMeGXWTYS6IYZNZJGilw1jxCsYPFGa4xA+qY=","i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n s=arc-20240605;\n        h=content-transfer-encoding:cc:to:subject:message-id:date:from\n         :in-reply-to:references:mime-version:dkim-signature;\n        bh=+V1E+/KFBONHYKrDP8YAiJIHIjVU2b7P8j+yHhcYHMc=;\n        fh=9JZq8trWPsHJfelEvWU5kHXhk3/02FK/TogASfOrW74=;\n        b=jGHyL9LDBEiSER5JegJzasSHng+pXnnE8xhqKn+WzatG/nK6vVOD3kBeg8KR8OOh8S\n         s+Ke+8gDcsK7Xs+kb0sZ5e2XfHYap55pqypC+fdn2wH9WgRbzwcaad94Xw2QaXx63sU2\n         Rrr3xBO1kwlrl6pc40JtVjX5vG56OW8wFgycKIAuVh5ziGG7I67P6KHfGcS/nAMQxb2B\n         sCmEziKL/dxEBdebpZwyiDEAGir1qjHSlrK8uwYpUN9iHYRfT2SY123AoSqSZz4abaXR\n         ubs5bOdNlKoSFumRJ3CVBbjJ6hx9xmZK3Ww0bwmWZGq0yQrs637L5qwVu35zEg0woxLs\n         V3XQ==;\n        darn=vger.kernel.org"],"ARC-Authentication-Results":["i=2; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com;\n spf=pass smtp.mailfrom=gmail.com;\n dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=LSqLh9dz; arc=pass smtp.client-ip=209.85.210.49","i=1; mx.google.com; arc=none"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1775233202; x=1775838002;\n darn=vger.kernel.org;\n        h=content-transfer-encoding:cc:to:subject:message-id:date:from\n         :in-reply-to:references:mime-version:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=+V1E+/KFBONHYKrDP8YAiJIHIjVU2b7P8j+yHhcYHMc=;\n        b=LSqLh9dzKcgeO58OJAjNLJC3lkpslDPlFFLi0iEoIZqyBUC088MzlxzECPWTAUiS/Q\n         /ai81neGRzHMqoVFv9E/dqzsM5WBRYBDC82MKQ53uRrReJ6Eyp+vIOHTmMBw1clWx51X\n         GkNWd/Y8Q/UfzO5ZUzosW2rjL+0EHW8bEtIGBU27hUxiCc0suA5HbmmVYEGnh9KWdNT5\n         yDrqOhq1n72N9INnN6jJ2y2INxB5igtLJy+GVe7gldauZMdhN+blFzHFWnNGi3mCQHY9\n         JA11P1zzhc/ujHBWispYtjoD+ug/uzJdKLloyrOpphG1RWGZxhtUNbQz/y5st88LB427\n         9Dpw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1775233202; x=1775838002;\n        h=content-transfer-encoding:cc:to:subject:message-id:date:from\n         :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from\n         :to:cc:subject:date:message-id:reply-to;\n        bh=+V1E+/KFBONHYKrDP8YAiJIHIjVU2b7P8j+yHhcYHMc=;\n        b=di+SFBsgn6B89DOHs193aV4AnA8dxzcrNyaaS3f9OCfSzclqeJ0a+P9TRIrfpABeHB\n         p4jSfeW5FY+Pois/N5ShZZe8qo6mMgvYofTwbChMpnubTcY8sWVtE1H7A3/Qek16opVP\n         l04gXa052XGUz4wPjRRq9AOYJp9tTKO3yAxCG/GZdt8SbiI5PnD/gsx0Ai0OiLPmKJgh\n         cI1hWjrOFPBUgPrN5CFTnNhVExyEhcb2XCzufMFzxrEMj+Koz+nzU+yGSqFA/Y7Cs09n\n         jq2I+Od0m/A5ovGsPWo3GTUqh3lvFNn19ho8e9r844MU5k1UqkxC1/GflLDC5GSzy/6b\n         IciQ==","X-Forwarded-Encrypted":"i=1;\n AJvYcCUBlk0G+qCLVnoK1GkY2lz4p9/eg0hEBJPPHEMjrgs35shdcpX+BLvbvA6aySXTz/+CKdxlW6SpCLxX1A==@vger.kernel.org","X-Gm-Message-State":"AOJu0YzYJ28tnazfRqcJfJGru1pX2MPMBrNqShZh28SAFJbEY4wt3SWT\n\ttznY5Q9+naMrHH+CrTUCcUEUKEfsdAVeWl9X/4fMm7UOoDWTlHQ2cB+piZQk030D4SDaPKObDyP\n\t3rkW2bfYf8+tYnuoPmrtpIvYMNhuxOTg=","X-Gm-Gg":"ATEYQzz4dYNY8Iu5RIXLfX1DWal+qEt+1Sz1OR/OY39idYVM2fR0jmyc30uyWhwkrJU\n\tuS2vZzTuNHEMa5ZFwi2u5gqpSbVBrpyQv+6F+Ene4yPRaCeD+Ons/pjeJOKnca2xcWJYGJPqSRf\n\tepdrbtYR8uQO3VmPuS60R35tjdXg27fzUBXlr6EGXFEKfYC3qR3lpErwqFRZ54k4GpwzR+ULTB6\n\tsFC4Lupq9iDgdAS9eZU5WzkewHlygYCOdTBdW1sbp3tbXE1Al9d3qoCDH03OKfwvGdLaNXsTcY5\n\tj8RoyVF+","X-Received":"by 2002:a05:6830:83ba:b0:7d9:ad90:5677 with SMTP id\n 46e09a7af769-7dbb75d7260mr2353806a34.30.1775233202503; Fri, 03 Apr 2026\n 09:20:02 -0700 (PDT)","Precedence":"bulk","X-Mailing-List":"linux-tegra@vger.kernel.org","List-Id":"<linux-tegra.vger.kernel.org>","List-Subscribe":"<mailto:linux-tegra+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-tegra+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","References":"\n <CABb+yY0ub51k-eFpPfgARXtwYjWzRSjbPDLtoMD77YQR8JH+=Q@mail.gmail.com>\n <20260403145119.2581034-1-joonwonkang@google.com>","In-Reply-To":"<20260403145119.2581034-1-joonwonkang@google.com>","From":"Jassi Brar <jassisinghbrar@gmail.com>","Date":"Fri, 3 Apr 2026 11:19:51 -0500","X-Gm-Features":"AQROBzBimCWicSTdSy1XOK425eepJ2fZaf0LPQosLeZZ5fVq1iHQtw7KN5njBvw","Message-ID":"\n <CABb+yY0uDQh-3cadPQONV=NJKjMtc4mJekgjmHYVaHnfHXvGZQ@mail.gmail.com>","Subject":"Re: [PATCH v3 1/2] mailbox: Use per-thread completion to fix wrong\n completion order","To":"Joonwon Kang <joonwonkang@google.com>","Cc":"angelogioacchino.delregno@collabora.com, jonathanh@nvidia.com,\n\tlinux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org,\n\tlinux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org,\n\tmatthias.bgg@gmail.com, stable@vger.kernel.org, thierry.reding@gmail.com","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable"}},{"id":3673432,"web_url":"http://patchwork.ozlabs.org/comment/3673432/","msgid":"<20260404124428.3077670-1-joonwonkang@google.com>","list_archive_url":null,"date":"2026-04-04T12:44:27","subject":"Re: [PATCH v3 1/2] mailbox: Use per-thread completion to fix wrong\n completion order","submitter":{"id":91088,"url":"http://patchwork.ozlabs.org/api/people/91088/","name":"Joonwon Kang","email":"joonwonkang@google.com"},"content":"> On Fri, Apr 3, 2026 at 9:51 AM Joonwon Kang <joonwonkang@google.com> wrote:\n> >\n> > > On Thu, Apr 2, 2026 at 12:07 PM Joonwon Kang <joonwonkang@google.com> wrote:\n> > > >\n> > > > Previously, a sender thread in mbox_send_message() could be woken up at\n> > > > a wrong time in blocking mode. It is because there was only a single\n> > > > completion for a channel whereas messages from multiple threads could be\n> > > > sent in any order; since the shared completion could be signalled in any\n> > > > order, it could wake up a wrong sender thread.\n> > > >\n> > > > This commit resolves the false wake-up issue with the following changes:\n> > > > - Completions are created just as many as the number of concurrent sender\n> > > >   threads\n> > > > - A completion is created on a sender thread's stack\n> > > > - Each slot of the message queue, i.e. `msg_data`, contains a pointer to\n> > > >   its target completion\n> > > > - tx_tick() signals the completion of the currently active slot of the\n> > > >   message queue\n> > > >\n> > > I think I reviewed it already or is this happening on\n> > > one-channel-one-client usage? Because mailbox api does not support\n> > > channels shared among multiple clients.\n> >\n> > Yes, this patch is handling the one-channel-one-client usage but when that\n> > single channel is shared between multiple threads.\n> \n> hmm.... how is this not single-channel-multiple-clients ?\n> A channel is returned as an opaque token to the clients, if that\n> client shares that with other threads - they will race.\n\nThey will race because of the current blocking mode implementation. With this\npatch, they should not race as it handles the known racing point. So, I think\nit will be important to decide whether to support multi-threads in blocking\nmode or not.\n\n> It is the job of the original client to serialize its threads' access\n> to the channel.\n\nI can see the disparity with the non-blocking mode here. Currently, the client\ndoes not need to serialize its threads' access to the channel in non-blocking\nmode whereas it needs to in blocking mode. It would be nice if the client does\nnot need to in both modes, but it may also depend on the necessity as you said.\n\n> > From my understanding, the\n> > discussion back then ended with how to circumvent the issue rather than whether\n> > we will eventually solve this in the mailbox framework or not, and if yes, how\n> > we will, and if not, why.\n> \n> It will be interesting to see how many current clients actually need\n> to share channels. If there are enough, it makes sense to implement\n> some helper api\n> on top of existing code, instead of changing its nature totally.\n\nI agree that we may need research on the current uses of channels and the\nnecessity of shared channels. However, it may require non-trivial amount of\ntime since it requires thorough understanding of the context of every client\ndriver. At this point, I think we at least need a clear documentation in terms\nof multi-threads support as we have none now. Since it is obvious that\nmulti-threads is not supported for now, I can create another patch to add this\nto the API doc to be clear. How do you think?\n\nThanks,\nJoonwon Kang","headers":{"Return-Path":"\n <linux-tegra+bounces-13562-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-tegra@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256\n header.s=20251104 header.b=KjDDAt5k;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.105.105.114; helo=tor.lore.kernel.org;\n envelope-from=linux-tegra+bounces-13562-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=google.com header.i=@google.com\n header.b=\"KjDDAt5k\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.214.202","smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=google.com","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=flex--joonwonkang.bounces.google.com"],"Received":["from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fnwK003Xzz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 04 Apr 2026 23:44:35 +1100 (AEDT)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 48AF9300A4E1\n\tfor <incoming@patchwork.ozlabs.org>; Sat,  4 Apr 2026 12:44:33 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id B37C9345CDD;\n\tSat,  4 Apr 2026 12:44:32 +0000 (UTC)","from mail-pl1-f202.google.com (mail-pl1-f202.google.com\n [209.85.214.202])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 4F1AE2DB7BF\n\tfor <linux-tegra@vger.kernel.org>; Sat,  4 Apr 2026 12:44:31 +0000 (UTC)","by mail-pl1-f202.google.com with SMTP id\n d9443c01a7336-2b2523e0299so71929265ad.3\n        for <linux-tegra@vger.kernel.org>;\n Sat, 04 Apr 2026 05:44:31 -0700 (PDT)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775306672; cv=none;\n b=BujF6hc1o3JSVuy1tMbYmsVsd6kzG5d9tY+A++CeEKYA8SviwQARr3cBbzwxhjVcdXF3UwJ/AxPtf+gj9p8h271uK2jxHc4adoE96V+/iOwkTYufryhWwmkbq6yZiRf3HAY+IJSkD2JeLXvme38Fqjy7251tGqfd7W62egUR8qY=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775306672; c=relaxed/simple;\n\tbh=6x4+gdTKW6z5iGkG21DDDihOqybDWtH12NpDzzaC5ZI=;\n\th=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From:\n\t To:Cc:Content-Type;\n b=Y2kllAK0dDj8dmp+3RQjj1BTSNpVnGL8fkdK/YfppLlRK+c0xuBG+ULDInTSUnQSxnNa1bqyEzc581gVissxPlSm5yhGHatJcCMbJcETdImOkYjbUr50UwLq1XZR//pSdmgocTLmBvDnaeLaeGwsWqln89CjX95A0HItXhZX3KA=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=google.com;\n spf=pass smtp.mailfrom=flex--joonwonkang.bounces.google.com;\n dkim=pass (2048-bit key) header.d=google.com header.i=@google.com\n header.b=KjDDAt5k; arc=none smtp.client-ip=209.85.214.202","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=google.com; s=20251104; t=1775306671; x=1775911471;\n darn=vger.kernel.org;\n        h=content-transfer-encoding:cc:to:from:subject:message-id:references\n         :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id\n         :reply-to;\n        bh=q1l0x4W+UvoXzUmEv9e5e/HxO0/QK/ip62Tt8sY3EdQ=;\n        b=KjDDAt5kGR0Iuq0ShmJgU1XnUrSQJ5FwFnWfziq13bwtnVB/cmgvoslH9ulhtJ5I1v\n         dQHuVgT2N/JAZttz+ofOadtku+MW9ZTQoYYmYwmCnYAupr3xZBfiU1yxm4fvUbSgrwnf\n         5HCHX8optEwRaXmDDQ5OvgA5XQLUM185mL4meaWIyEj6juTDSWwoYZECBHsEAVZTgSYG\n         8Qg/dFQmbvYljuP+ghE+GQz++KCtw91Zx6szxXmZikfnJ6rOytUil3ZGxuOm2lsqa0Rs\n         dAgNIkQ+1fdosVhMPrSQoL4cpPamogRdawdWD4nAVqbwdR7DblRHjoLzCeN5XJEJQF53\n         7Csw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1775306671; x=1775911471;\n        h=content-transfer-encoding:cc:to:from:subject:message-id:references\n         :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject\n         :date:message-id:reply-to;\n        bh=q1l0x4W+UvoXzUmEv9e5e/HxO0/QK/ip62Tt8sY3EdQ=;\n        b=X8yzwNrYt/1LQWZ2XkxWBmo/5OdNgZWDa0kW7ITY6K7QOqZtq3yzQHq7t8sF41tEBr\n         Vf4zPs2u4g0HgPjEEjgkS/WOig0oiAPi87veh2DTobgZtly8xKBwlyrAT9b/R+WIT/XM\n         A6nLWH1RvE6v5KmdZ9/KlWSga/56DVAKxrbNYluBuhdRA38q1OSN/RH8DV841C7VFJ7A\n         RAnPrUln0Q9UL61cL8iktbTzRAmc7sDXVfNNh0/23s3qaLxvxm57xwijtYhUCBh57P0e\n         WB2seAnumnYuZGlKGHp4wSvTFsUk+NZDYE46ghvMxIikXF/yvZtK01/7/PowkEWjCybi\n         /AWQ==","X-Forwarded-Encrypted":"i=1;\n AJvYcCXw4QzehB8RgXVUFegPoyje+fscO6KztbV+XyKYUKMyEoXv2OX2GDI/a7cUqpvOmc1CdihybkeANIRkKQ==@vger.kernel.org","X-Gm-Message-State":"AOJu0YxV3cTtBPPYvF2giyKY2ZmeBmfecVkdMFifqGffuXNahDHXnpRd\n\tL8JGjNTVnUUDGva5w2UBwrAUlzo5xFCaerVydipK4zjBuQ8VRR+V7nZ3CNRgwkP98lbYgwNRFIv\n\tONtNqfaFCivcqdvPVEd6ogxqC8A==","X-Received":"from plwg14.prod.google.com ([2002:a17:902:f74e:b0:2b0:5b0d:f4db])\n (user=joonwonkang job=prod-delivery.src-stubby-dispatcher) by\n 2002:a17:902:e748:b0:2b2:50bd:83b3 with SMTP id\n d9443c01a7336-2b281706f12mr64261875ad.10.1775306670477;\n Sat, 04 Apr 2026 05:44:30 -0700 (PDT)","Date":"Sat,  4 Apr 2026 12:44:27 +0000","In-Reply-To":"\n <CABb+yY0uDQh-3cadPQONV=NJKjMtc4mJekgjmHYVaHnfHXvGZQ@mail.gmail.com>","Precedence":"bulk","X-Mailing-List":"linux-tegra@vger.kernel.org","List-Id":"<linux-tegra.vger.kernel.org>","List-Subscribe":"<mailto:linux-tegra+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-tegra+unsubscribe@vger.kernel.org>","Mime-Version":"1.0","References":"\n <CABb+yY0uDQh-3cadPQONV=NJKjMtc4mJekgjmHYVaHnfHXvGZQ@mail.gmail.com>","X-Mailer":"git-send-email 2.53.0.1213.gd9a14994de-goog","Message-ID":"<20260404124428.3077670-1-joonwonkang@google.com>","Subject":"Re: [PATCH v3 1/2] mailbox: Use per-thread completion to fix wrong\n completion order","From":"Joonwon Kang <joonwonkang@google.com>","To":"jassisinghbrar@gmail.com","Cc":"angelogioacchino.delregno@collabora.com, jonathanh@nvidia.com,\n\tjoonwonkang@google.com, linux-arm-kernel@lists.infradead.org,\n\tlinux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,\n\tlinux-tegra@vger.kernel.org, matthias.bgg@gmail.com, stable@vger.kernel.org,\n\tthierry.reding@gmail.com","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable"}},{"id":3673519,"web_url":"http://patchwork.ozlabs.org/comment/3673519/","msgid":"<8710cb76-78e7-4e7f-8be8-0f059b9cb0ac@gmail.com>","list_archive_url":null,"date":"2026-04-05T00:58:41","subject":"Re: [PATCH v3 1/2] mailbox: Use per-thread completion to fix wrong\n completion order","submitter":{"id":93058,"url":"http://patchwork.ozlabs.org/api/people/93058/","name":"zhang","email":"zhangweize9@gmail.com"},"content":"Hi! Joonwon Kang.\n\nI just looked at the content of your email, and I think we can design a resource priority scheduling system with 70% and 30% priority allocation. The specific idea is as follows:\n\nDuring task execution, each task can be tagged. Important tasks can be allocated to the 30% of resources, while the remaining 70% can be used to run low-load and repetitive pipeline tasks.\n\nThe specific algorithm can be written as follows: reserve 30% of the runtime space for the system's critical processes. For the remaining 70% of non-critical processes, a judgment can be made: if resource usage exceeds 70%, the excess processes are marked with a priority deferred tag and run only when resources are freed up.","headers":{"Return-Path":"\n <linux-tegra+bounces-13567-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-tegra@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=Kha86hpp;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c15:e001:75::12fc:5321; helo=sin.lore.kernel.org;\n envelope-from=linux-tegra+bounces-13567-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=\"Kha86hpp\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.216.67","smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=gmail.com"],"Received":["from sin.lore.kernel.org (sin.lore.kernel.org\n [IPv6:2600:3c15:e001:75::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fpDcP4rzrz1yD3\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 05 Apr 2026 10:59:01 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id 1DA533003722\n\tfor <incoming@patchwork.ozlabs.org>; Sun,  5 Apr 2026 00:58:57 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 0D1552F1FE3;\n\tSun,  5 Apr 2026 00:58:56 +0000 (UTC)","from mail-pj1-f67.google.com (mail-pj1-f67.google.com\n [209.85.216.67])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id C7EFF2EDD6C\n\tfor <linux-tegra@vger.kernel.org>; Sun,  5 Apr 2026 00:58:54 +0000 (UTC)","by mail-pj1-f67.google.com with SMTP id\n 98e67ed59e1d1-35da9c0c007so2696467a91.2\n        for <linux-tegra@vger.kernel.org>;\n Sat, 04 Apr 2026 17:58:54 -0700 (PDT)","from [127.0.0.1] ([142.91.102.47])\n        by smtp.gmail.com with ESMTPSA id\n 98e67ed59e1d1-35de6860cfbsm2876078a91.6.2026.04.04.17.58.48\n        (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n        Sat, 04 Apr 2026 17:58:53 -0700 (PDT)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775350735; cv=none;\n b=Wo/t13sWHwI5vJOo2DZv20DcjSiwRwNstJe2fyD0LDgCwel0dpdZrv0gYm7yCKKkFv8eL/v39fiizOWj0lhukp9wQyygGRyZiU9i4IHWMgFid9vojTSyUIl9IJojfxRY/rYbtuI2ahRmnq3kBJcR2gfLs8COh1221O7vKGz9ink=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775350735; c=relaxed/simple;\n\tbh=OUV8iYFcdaBNckohwit0b6YgnpM3gK0Lsy8t0bCd8sU=;\n\th=Date:From:To:Cc:Message-ID:In-Reply-To:Subject:MIME-Version:\n\t Content-Type;\n b=IsvGsGj20lTROhIo7puGxtidjeGqOVX0TMLqbBRj3+pyhEODI23MfWTZ3VJGaKyfYo5/bqPydsvPpFDd5Or2MXS8kApn+of44NpVchGoOJyKsvIZ/uXD/Ie14UUOflZybMxq73Y06Tel+R/fcUftjhBGp3jXdxW6QU4ohfV+TCk=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com;\n spf=pass smtp.mailfrom=gmail.com;\n dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=Kha86hpp; arc=none smtp.client-ip=209.85.216.67","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1775350734; x=1775955534;\n darn=vger.kernel.org;\n        h=content-transfer-encoding:mime-version:subject:in-reply-to\n         :message-id:cc:to:from:date:from:to:cc:subject:date:message-id\n         :reply-to;\n        bh=igv1X0Jh9R3lolDJfbtFzOBAbeGQ8wEXL4Lx+psSqc0=;\n        b=Kha86hpp4XmoND8lLG/6SymqFmmEjyq1IS+Zc7FZX2gK4YNUa/bQGri94wkuaxUB82\n         CLFcwi1Rx8luN5PbbIa5najuO+Y9qKk1Mol7h6/FH6Jbtn+Okzqp93Q00+X5RR7tr8EZ\n         LhlL5vJaQi3iLKhzdPyQSAyXpS6wc5mxNrYsEG7p24C/Z0Z4jow6rSrfz+SFlNQ1/ekP\n         X2YISGuCRDKsg+q09e5IQJVsboItmundrQUODDZ0IaMPxO5vs4hlBpYyWj2IvbkY2ImC\n         TV+6uPqfgsVVWXFhVvKQTR+0oYIGBCOaT5g/Rs0wObt3cptkZNB2iBdr7Da0x7aYwULO\n         pjbw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1775350734; x=1775955534;\n        h=content-transfer-encoding:mime-version:subject:in-reply-to\n         :message-id:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc\n         :subject:date:message-id:reply-to;\n        bh=igv1X0Jh9R3lolDJfbtFzOBAbeGQ8wEXL4Lx+psSqc0=;\n        b=fsTv3Q2zIC9b6cBhixao4izBqG6KSCbkIdqIT4vfV495gxjQrKZfuIsc3aiIoL09H7\n         XI9Vf6Nycblt1FID/HHODv1x0+enCw1qsEDk1eERhP92PZ/Au0/Xp+ucVUiPeNtMziCW\n         OIVSVxEM3DTujObIxR9buITgdo7VwfA51D2zz6KfbS0zv5HSD7O5ooXqLlulGON5KqjY\n         AhrYJamvBdHuvxf6/1uYy7Iu8mbElx1uYBAXaPgCJLNCC6+4lbwnQJhwKoL5JtV17wzN\n         YrJ9i1kWTsl61O5PCUB4NnyCjyt78xeMyC/k7f3Mxs3nPHR3jpTLy4R6a6hVODm9DjiN\n         56dQ==","X-Forwarded-Encrypted":"i=1;\n AJvYcCW4yFQHtw9FsgDicgdRpbYCUUqcEGjxIfDdXagJFDukxCDYygggxL8l32WGZEPqYuNLCz9XMOpvP/Lucg==@vger.kernel.org","X-Gm-Message-State":"AOJu0Yy30XqfzbourfPXWAXR6z1fkpp8E/mw7yPhsnfWtvyvgx2RnldY\n\tXCSfDNMwiS2UWQ2qhYHtzAs4tUcolb29lWPrXH7B0c4KvbFKSHkjOBx1","X-Gm-Gg":"AeBDieu1r9jTLSqVi3rGrGbZV6SOjClHAlpwe4qUDErkBlJZo5vH/F7PBmjZUt6ejEA\n\tNMIcuMhBfUD+sI+koar22IJj8X+caZ6oJYKKiTBUZepr6p6YSUR/SrWmKAH+kXtqdlCPJYwf4Vn\n\t+x/bXsEfB/Zg+U3Pzn7diCGgWKmHSqvSpK9mvylpegykmjtVc8HrpHhl4ELoUqtze8c2/eQ4Agx\n\tsBThZVVWLWFtVvraIeeDFAzV8eINo01O6afbpN4sSoG8Xbs7O/urlODLaXYN1yyz8gdjZEvajDd\n\tNM2LdUnDdkEbCloIqbCH/TOOkGJviWmFBwXhptqNZ0/aITHM6izaatS1gS+9rUZOJREtEKCmD2+\n\tKJWPqRLQv1XCDd/cp09mI6blW0C6JU2ohpHvDZIgUSp4S27ZZHBt+nc2k2JDx7dBlnaFpgQWDgb\n\tCbMeNsebH6WP5OL1zlcCurEH8=","X-Received":"by 2002:a17:90b:3d4d:b0:35b:aca5:db39 with SMTP id\n 98e67ed59e1d1-35de67ee6bemr7012077a91.9.1775350734065;\n        Sat, 04 Apr 2026 17:58:54 -0700 (PDT)","Date":"Sun, 5 Apr 2026 08:58:41 +0800","From":"zhang <zhangweize9@gmail.com>","To":"joonwonkang@google.com","Cc":"angelogioacchino.delregno@collabora.com, jassisinghbrar@gmail.com,\n\tjonathanh@nvidia.com, linux-arm-kernel@lists.infradead.org,\n\tlinux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,\n\tlinux-tegra@vger.kernel.org, matthias.bgg@gmail.com,\n\tstable@vger.kernel.org, thierry.reding@gmail.com","Message-ID":"<8710cb76-78e7-4e7f-8be8-0f059b9cb0ac@gmail.com>","In-Reply-To":"<20260404124428.3077670-1-joonwonkang@google.com>","Subject":"Re: [PATCH v3 1/2] mailbox: Use per-thread completion to fix wrong\n completion order","Precedence":"bulk","X-Mailing-List":"linux-tegra@vger.kernel.org","List-Id":"<linux-tegra.vger.kernel.org>","List-Subscribe":"<mailto:linux-tegra+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-tegra+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"7bit","X-Correlation-ID":"<8710cb76-78e7-4e7f-8be8-0f059b9cb0ac@gmail.com>"}},{"id":3678572,"web_url":"http://patchwork.ozlabs.org/comment/3678572/","msgid":"<20260417084135.2091007-1-joonwonkang@google.com>","list_archive_url":null,"date":"2026-04-17T08:41:34","subject":"Re: [PATCH v3 1/2] mailbox: Use per-thread completion to fix wrong\n completion order","submitter":{"id":91088,"url":"http://patchwork.ozlabs.org/api/people/91088/","name":"Joonwon Kang","email":"joonwonkang@google.com"},"content":"> On Fri, Apr 3, 2026 at 9:51 AM Joonwon Kang <joonwonkang@google.com> wrote:\n> >\n> > > On Thu, Apr 2, 2026 at 12:07 PM Joonwon Kang <joonwonkang@google.com> wrote:\n> > > >\n> > > > Previously, a sender thread in mbox_send_message() could be woken up at\n> > > > a wrong time in blocking mode. It is because there was only a single\n> > > > completion for a channel whereas messages from multiple threads could be\n> > > > sent in any order; since the shared completion could be signalled in any\n> > > > order, it could wake up a wrong sender thread.\n> > > >\n> > > > This commit resolves the false wake-up issue with the following changes:\n> > > > - Completions are created just as many as the number of concurrent sender\n> > > >   threads\n> > > > - A completion is created on a sender thread's stack\n> > > > - Each slot of the message queue, i.e. `msg_data`, contains a pointer to\n> > > >   its target completion\n> > > > - tx_tick() signals the completion of the currently active slot of the\n> > > >   message queue\n> > > >\n> > > I think I reviewed it already or is this happening on\n> > > one-channel-one-client usage? Because mailbox api does not support\n> > > channels shared among multiple clients.\n> >\n> > Yes, this patch is handling the one-channel-one-client usage but when that\n> > single channel is shared between multiple threads.\n> \n> hmm.... how is this not single-channel-multiple-clients ?\n> A channel is returned as an opaque token to the clients, if that\n> client shares that with other threads - they will race.\n> It is the job of the original client to serialize its threads' access\n> to the channel.\n> \n> > From my understanding, the\n> > discussion back then ended with how to circumvent the issue rather than whether\n> > we will eventually solve this in the mailbox framework or not, and if yes, how\n> > we will, and if not, why.\n> \n> It will be interesting to see how many current clients actually need\n> to share channels. If there are enough, it makes sense to implement\n> some helper api\n> on top of existing code, instead of changing its nature totally.\n> \n> Thanks\n> Jassi\n\nHi Jassi, can we continue discussing this matter? We can start from the recent\ncomments from me.\n\nThanks,\nJoonwon Kang","headers":{"Return-Path":"\n <linux-tegra+bounces-13785-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-tegra@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256\n header.s=20251104 header.b=VPtiNvtx;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-tegra+bounces-13785-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=google.com header.i=@google.com\n header.b=\"VPtiNvtx\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.210.202","smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=google.com","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=flex--joonwonkang.bounces.google.com"],"Received":["from tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fxpKP0LWMz1yGt\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 17 Apr 2026 18:42:17 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 8930C3040C72\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 17 Apr 2026 08:41:40 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 9729E373BF1;\n\tFri, 17 Apr 2026 08:41:39 +0000 (UTC)","from mail-pf1-f202.google.com (mail-pf1-f202.google.com\n [209.85.210.202])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 35B2130EF64\n\tfor <linux-tegra@vger.kernel.org>; Fri, 17 Apr 2026 08:41:38 +0000 (UTC)","by mail-pf1-f202.google.com with SMTP id\n d2e1a72fcca58-82f45dadbe6so771878b3a.1\n        for <linux-tegra@vger.kernel.org>;\n Fri, 17 Apr 2026 01:41:38 -0700 (PDT)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776415299; cv=none;\n b=oBtHuxfrRWeO+NEayX95Oi6J7ke4ZcPxyGjUrKIAxuQx+CFVVVKppNiKWm+cwbeF5NacM23jAZf3krzoQepCDkYKG3iGDEN9yADZxoOkFlTYh4w3uj0CRICDooty9//Gy3JQnQ9xeHZLCERQOTzvAsBsB7rS9nuJy/2xe17r+xI=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776415299; c=relaxed/simple;\n\tbh=E4ApuJ8oAQ/4OyUGknCmHnGsjWagqHfRqgj6PgH/Fjw=;\n\th=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From:\n\t To:Cc:Content-Type;\n b=VJ6k/AlyLPUb+tVmqG0MSy9eIi0rnzYoyoIPs+14nu2+YSJ0X9vpymweUu73tG2eWFyRnq4FyicXcuU+D5rpOzUGAsLgKNLA+YNK3/8oCEolwOsqAW0w85o1bfzG18r0XqYpKKsQk+B2KG7UPCy54wKVv25vnySlR4fBVA5ReG4=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=google.com;\n spf=pass smtp.mailfrom=flex--joonwonkang.bounces.google.com;\n dkim=pass (2048-bit key) header.d=google.com header.i=@google.com\n header.b=VPtiNvtx; arc=none smtp.client-ip=209.85.210.202","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=google.com; s=20251104; t=1776415298; x=1777020098;\n darn=vger.kernel.org;\n        h=content-transfer-encoding:cc:to:from:subject:message-id:references\n         :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id\n         :reply-to;\n        bh=6+m189FrlHvlQluxfIKHyqtB0jWSsQDaVuzIa8Tqb+g=;\n        b=VPtiNvtxlhTld4KTRwyn3zfZ48SN7eQnx8xsI5BEKgwZHkh+sCfCmX4sQTgSD7FeFn\n         eUt41UiEl6b1sNxDTsOPCTxyg+miTJEpAJ++9wGhDDC2/A/FHz96Izq/a+a8V2M7Ylhp\n         Cw2bHkX7+c7WRnOnA3zSrQ6QWHAHSRQCMRMYBvdHKlXxCcQZV2+Iz1J4C1Hxoz9zeFZb\n         UineVWRm8i9yq6KbIZLmbrDuty69bvM56kiV0UFlOowJQqZf1Q/LbbHDWyjG90s0cylR\n         0C70B7O0RzQu9mWKS0RWk6AXk0Pmx15lYQ/SsDlCL5shf+Zvdw/ZPkdYIWJqcK5Xf3da\n         EaUw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1776415298; x=1777020098;\n        h=content-transfer-encoding:cc:to:from:subject:message-id:references\n         :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject\n         :date:message-id:reply-to;\n        bh=6+m189FrlHvlQluxfIKHyqtB0jWSsQDaVuzIa8Tqb+g=;\n        b=dSPPosll8eg06bDWDdORjoTs/4hNRmdwHR/3uxhw/uiFTmsjQ2Efd9G0bXMxWdZH7a\n         4L8ElCksAHfK2XcqV3iy+9RtRyMuP7Yf+gfCaVBFaXsaXVUNgkiuSTbL0Ta4jMIEYyNm\n         5RogTQW8rvzu/MwOG8POMdZi3Y8ZVV7KkyJf42HPLe+bEmROtf+VLO0788HTuMOftDAg\n         Ku223ExK6BXtFxJCGiAPuHQyHZOnG35/uJoGqvlymSpb1nzTmYjhmWwVw3ipnTtr2ppl\n         7SX4kzxRJLoep3a2aJfSVSQlxuSDqv5tqTpGWF5uTcN9aA6fILPwkVhcs/2orOYkDBVr\n         0aPA==","X-Forwarded-Encrypted":"i=1;\n AFNElJ8u1yMP13wXGj1gaW2nAsncPILiHgn1HOoyp/42eQWNa3VHAn483rD+zMr8/37FxlJ0shXgdzRAz3ipsw==@vger.kernel.org","X-Gm-Message-State":"AOJu0YzdWppMqsFr2iDO3DMY3MIG49vAiViIuMbpT2DHXs86zOlf+BGb\n\tqLVKy0U/KrhfBfnsW/Fi9ft7PEyvsU6FA0he0GbgUaHexxnNuBqnl9TXw9fBjXsxJnRcLgz440H\n\tpRGZxIBjnFtgmLUsYYwCgAgFa2w==","X-Received":"from pfblu1.prod.google.com\n ([2002:a05:6a00:7481:b0:82f:24a1:2b5a])\n (user=joonwonkang job=prod-delivery.src-stubby-dispatcher) by\n 2002:a05:6a00:3cc6:b0:82f:111:61d3 with SMTP id\n d2e1a72fcca58-82f8c970802mr2065492b3a.44.1776415297277;\n Fri, 17 Apr 2026 01:41:37 -0700 (PDT)","Date":"Fri, 17 Apr 2026 08:41:34 +0000","In-Reply-To":"\n <CABb+yY0uDQh-3cadPQONV=NJKjMtc4mJekgjmHYVaHnfHXvGZQ@mail.gmail.com>","Precedence":"bulk","X-Mailing-List":"linux-tegra@vger.kernel.org","List-Id":"<linux-tegra.vger.kernel.org>","List-Subscribe":"<mailto:linux-tegra+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-tegra+unsubscribe@vger.kernel.org>","Mime-Version":"1.0","References":"\n <CABb+yY0uDQh-3cadPQONV=NJKjMtc4mJekgjmHYVaHnfHXvGZQ@mail.gmail.com>","X-Mailer":"git-send-email 2.54.0.rc1.555.g9c883467ad-goog","Message-ID":"<20260417084135.2091007-1-joonwonkang@google.com>","Subject":"Re: [PATCH v3 1/2] mailbox: Use per-thread completion to fix wrong\n completion order","From":"Joonwon Kang <joonwonkang@google.com>","To":"jassisinghbrar@gmail.com","Cc":"angelogioacchino.delregno@collabora.com, jonathanh@nvidia.com,\n\tjoonwonkang@google.com, linux-arm-kernel@lists.infradead.org,\n\tlinux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,\n\tlinux-tegra@vger.kernel.org, matthias.bgg@gmail.com, stable@vger.kernel.org,\n\tthierry.reding@gmail.com","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable"}}]