[{"id":1760145,"web_url":"http://patchwork.ozlabs.org/comment/1760145/","msgid":"<87h8wp19es.fsf@concordia.ellerman.id.au>","date":"2017-08-30T13:18:19","subject":"Re: [PATCH v2 2/3] cxl: Fix driver use count","submitter":{"id":46580,"url":"http://patchwork.ozlabs.org/api/people/46580/","name":"Michael Ellerman","email":"mpe@ellerman.id.au"},"content":"Frederic Barrat <fbarrat@linux.vnet.ibm.com> writes:\n\n> cxl keeps a driver use count, which is used with the hash memory model\n> on p8 to know when to upgrade local TLBIs to global and to trigger\n> callbacks to manage the MMU for PSL8.\n>\n> If a process opens a context and closes without attaching or fails the\n> attachment, the driver use count is never decremented. As a\n> consequence, TLB invalidations remain global, even if there are no\n> active cxl contexts.\n>\n> We should increment the driver use count when the process is attaching\n> to the cxl adapter, and not on open. It's not needed before the\n> adapter starts using the context and the use count is decremented on\n> the detach path, so it makes more sense.\n>\n> It affects only the user api. The kernel api is already doing The\n> Right Thing.\n>\n> Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>\n> Cc: stable@vger.kernel.org # v4.2+\n> Fixes: 7bb5d91a4dda (\"cxl: Rework context lifetimes\")\n> Acked-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>\n\nI'll pick this up straight away, because it's a fix.\n\nSo you can drop this from the series.\n\ncheers","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xj5jw74V0z9sN7\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 30 Aug 2017 23:21:08 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xj5jw61JczDqXp\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 30 Aug 2017 23:21:08 +1000 (AEST)","from ozlabs.org (bilbo.ozlabs.org [103.22.144.67])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xj5fg6QQGzDqXl\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tWed, 30 Aug 2017 23:18:19 +1000 (AEST)","from authenticated.ozlabs.org (localhost [127.0.0.1])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPSA id 3xj5fg4ch8z9s8w;\n\tWed, 30 Aug 2017 23:18:19 +1000 (AEST)"],"From":"Michael Ellerman <mpe@ellerman.id.au>","To":"Frederic Barrat <fbarrat@linux.vnet.ibm.com>,\n\tlinuxppc-dev@lists.ozlabs.org, \n\tbenh@kernel.crashing.org, andrew.donnellan@au1.ibm.com,\n\tclombard@linux.vnet.ibm.com, vaibhav@linux.vnet.ibm.com","Subject":"Re: [PATCH v2 2/3] cxl: Fix driver use count","In-Reply-To":"<20170830101550.16821-2-fbarrat@linux.vnet.ibm.com>","References":"<20170830101550.16821-1-fbarrat@linux.vnet.ibm.com>\n\t<20170830101550.16821-2-fbarrat@linux.vnet.ibm.com>","User-Agent":"Notmuch/0.21 (https://notmuchmail.org)","Date":"Wed, 30 Aug 2017 23:18:19 +1000","Message-ID":"<87h8wp19es.fsf@concordia.ellerman.id.au>","MIME-Version":"1.0","Content-Type":"text/plain","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"alistair@popple.id.au","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}},{"id":1760918,"web_url":"http://patchwork.ozlabs.org/comment/1760918/","msgid":"<3xjgLm4Sn9z9t45@ozlabs.org>","date":"2017-08-31T11:36:32","subject":"Re: [v2,2/3] cxl: Fix driver use count","submitter":{"id":69509,"url":"http://patchwork.ozlabs.org/api/people/69509/","name":"Michael Ellerman","email":"patch-notifications@ellerman.id.au"},"content":"On Wed, 2017-08-30 at 10:15:49 UTC, Frederic Barrat wrote:\n> cxl keeps a driver use count, which is used with the hash memory model\n> on p8 to know when to upgrade local TLBIs to global and to trigger\n> callbacks to manage the MMU for PSL8.\n> \n> If a process opens a context and closes without attaching or fails the\n> attachment, the driver use count is never decremented. As a\n> consequence, TLB invalidations remain global, even if there are no\n> active cxl contexts.\n> \n> We should increment the driver use count when the process is attaching\n> to the cxl adapter, and not on open. It's not needed before the\n> adapter starts using the context and the use count is decremented on\n> the detach path, so it makes more sense.\n> \n> It affects only the user api. The kernel api is already doing The\n> Right Thing.\n> \n> Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>\n> Cc: stable@vger.kernel.org # v4.2+\n> Fixes: 7bb5d91a4dda (\"cxl: Rework context lifetimes\")\n> Acked-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>\n\nApplied to powerpc next, thanks.\n\nhttps://git.kernel.org/powerpc/c/197267d0356004a31c4d6b6336598f\n\ncheers","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjhYk0XDRz9sMN\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 31 Aug 2017 22:31:06 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xjhYj6mqrzDqps\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 31 Aug 2017 22:31:05 +1000 (AEST)","from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xjgLn1F1WzDqSL\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tThu, 31 Aug 2017 21:36:33 +1000 (AEST)","by ozlabs.org (Postfix, from userid 1034)\n\tid 3xjgLm4Sn9z9t45; Thu, 31 Aug 2017 21:36:32 +1000 (AEST)"],"X-powerpc-patch-notification":"thanks","X-powerpc-patch-commit":"197267d0356004a31c4d6b6336598f5dff3301e1","In-Reply-To":"<20170830101550.16821-2-fbarrat@linux.vnet.ibm.com>","To":"Frederic Barrat <fbarrat@linux.vnet.ibm.com>,\n\tlinuxppc-dev@lists.ozlabs.org, \n\tbenh@kernel.crashing.org, andrew.donnellan@au1.ibm.com,\n\tclombard@linux.vnet.ibm.com, vaibhav@linux.vnet.ibm.com","From":"Michael Ellerman <patch-notifications@ellerman.id.au>","Subject":"Re: [v2,2/3] cxl: Fix driver use count","Message-Id":"<3xjgLm4Sn9z9t45@ozlabs.org>","Date":"Thu, 31 Aug 2017 21:36:32 +1000 (AEST)","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"alistair@popple.id.au","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}}]