[{"id":1760143,"web_url":"http://patchwork.ozlabs.org/comment/1760143/","msgid":"<87inh519fl.fsf@concordia.ellerman.id.au>","date":"2017-08-30T13:17:50","subject":"Re: [PATCH v2 1/3] powerpc/mm: Export flush_all_mm()","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> With the optimizations introduced by commit a46cc7a90fd8\n> (\"powerpc/mm/radix: Improve TLB/PWC flushes\"), flush_tlb_mm() no\n> longer flushes the page walk cache with radix. This patch introduces\n> flush_all_mm(), which flushes everything, tlb and pwc, for a given mm.\n>\n> Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>\n> ---\n> Changelog:\n> v2: this patch is new\n>\n>  arch/powerpc/include/asm/book3s/64/tlbflush-hash.h  |  8 ++++++++\n>  arch/powerpc/include/asm/book3s/64/tlbflush-radix.h |  3 +++\n>  arch/powerpc/include/asm/book3s/64/tlbflush.h       | 15 +++++++++++++++\n>  arch/powerpc/mm/tlb-radix.c                         |  6 ++++--\n>  4 files changed, 30 insertions(+), 2 deletions(-)\n>\n> diff --git a/arch/powerpc/include/asm/book3s/64/tlbflush-hash.h b/arch/powerpc/include/asm/book3s/64/tlbflush-hash.h\n> index 2f6373144e2c..c5d89d271a96 100644\n> --- a/arch/powerpc/include/asm/book3s/64/tlbflush-hash.h\n> +++ b/arch/powerpc/include/asm/book3s/64/tlbflush-hash.h\n> @@ -65,6 +65,14 @@ static inline void hash__flush_tlb_mm(struct mm_struct *mm)\n>  {\n>  }\n>  \n> +static inline void hash__local_flush_all_mm(struct mm_struct *mm)\n> +{\n> +}\n> +\n> +static inline void hash__flush_all_mm(struct mm_struct *mm)\n> +{\n> +}\n\nIt's not clear why it makes sense for these to be empty. Either for the\ngeneral idea of the \"flush_all_mm()\" API, or for your intended use by\nCXL.\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 3xj5h01vHjz9sRW\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 30 Aug 2017 23:19:28 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xj5h00fVYzDqXn\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 30 Aug 2017 23:19:28 +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 3xj5fY24mSzDqMY\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tWed, 30 Aug 2017 23:18:13 +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 3xj5fX5KQpz9s8w;\n\tWed, 30 Aug 2017 23:18:12 +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 1/3] powerpc/mm: Export flush_all_mm()","In-Reply-To":"<20170830101550.16821-1-fbarrat@linux.vnet.ibm.com>","References":"<20170830101550.16821-1-fbarrat@linux.vnet.ibm.com>","User-Agent":"Notmuch/0.21 (https://notmuchmail.org)","Date":"Wed, 30 Aug 2017 23:17:50 +1000","Message-ID":"<87inh519fl.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":1760182,"web_url":"http://patchwork.ozlabs.org/comment/1760182/","msgid":"<77b082b9-0e6e-ed38-3a4e-af7797990ef3@linux.vnet.ibm.com>","date":"2017-08-30T13:59:53","subject":"Re: [PATCH v2 1/3] powerpc/mm: Export flush_all_mm()","submitter":{"id":67555,"url":"http://patchwork.ozlabs.org/api/people/67555/","name":"Frederic Barrat","email":"fbarrat@linux.vnet.ibm.com"},"content":"Le 30/08/2017 à 15:17, Michael Ellerman a écrit :\n> Frederic Barrat <fbarrat@linux.vnet.ibm.com> writes:\n> \n>> With the optimizations introduced by commit a46cc7a90fd8\n>> (\"powerpc/mm/radix: Improve TLB/PWC flushes\"), flush_tlb_mm() no\n>> longer flushes the page walk cache with radix. This patch introduces\n>> flush_all_mm(), which flushes everything, tlb and pwc, for a given mm.\n>>\n>> Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>\n>> ---\n>> Changelog:\n>> v2: this patch is new\n>>\n>>   arch/powerpc/include/asm/book3s/64/tlbflush-hash.h  |  8 ++++++++\n>>   arch/powerpc/include/asm/book3s/64/tlbflush-radix.h |  3 +++\n>>   arch/powerpc/include/asm/book3s/64/tlbflush.h       | 15 +++++++++++++++\n>>   arch/powerpc/mm/tlb-radix.c                         |  6 ++++--\n>>   4 files changed, 30 insertions(+), 2 deletions(-)\n>>\n>> diff --git a/arch/powerpc/include/asm/book3s/64/tlbflush-hash.h b/arch/powerpc/include/asm/book3s/64/tlbflush-hash.h\n>> index 2f6373144e2c..c5d89d271a96 100644\n>> --- a/arch/powerpc/include/asm/book3s/64/tlbflush-hash.h\n>> +++ b/arch/powerpc/include/asm/book3s/64/tlbflush-hash.h\n>> @@ -65,6 +65,14 @@ static inline void hash__flush_tlb_mm(struct mm_struct *mm)\n>>   {\n>>   }\n>>   \n>> +static inline void hash__local_flush_all_mm(struct mm_struct *mm)\n>> +{\n>> +}\n>> +\n>> +static inline void hash__flush_all_mm(struct mm_struct *mm)\n>> +{\n>> +}\n> \n> It's not clear why it makes sense for these to be empty. Either for the\n> general idea of the \"flush_all_mm()\" API, or for your intended use by\n> CXL.\n\nI was not too sure what to do for hash, but the idea is that the new \nflush_all_mm() is really the equivalent of the old flush_tlb_mm() from \nbefore Ben's optimizations for radix, and that was/still is an empty \noperation on hash, so I kept it that way.\n\nWe don't support hash for capi2 yet. Adding it will definitely require \nsome work in that area, as the current approach (use count on the driver \nand all TLBIs becoming global when the driver is in use) won't hold much \nlonger.\n\n   Fred","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 3xj6fR6DDGz9s8J\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 31 Aug 2017 00:03:11 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xj6fR5MvwzDql5\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 31 Aug 2017 00:03:11 +1000 (AEST)","from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com\n\t[148.163.158.5])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xj6dC4GjbzDqMY\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tThu, 31 Aug 2017 00:02:07 +1000 (AEST)","from pps.filterd (m0098416.ppops.net [127.0.0.1])\n\tby mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv7UE1cUp053741\n\tfor <linuxppc-dev@lists.ozlabs.org>; Wed, 30 Aug 2017 10:02:04 -0400","from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106])\n\tby mx0b-001b2d01.pphosted.com with ESMTP id 2cnu6n9wwu-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <linuxppc-dev@lists.ozlabs.org>; Wed, 30 Aug 2017 10:01:29 -0400","from localhost\n\tby e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <linuxppc-dev@lists.ozlabs.org> from <fbarrat@linux.vnet.ibm.com>;\n\tWed, 30 Aug 2017 14:59:58 +0100","from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197)\n\tby e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP\n\tGateway: Authorized Use Only! Violators will be prosecuted; \n\tWed, 30 Aug 2017 14:59:55 +0100","from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com\n\t[9.149.105.232])\n\tby b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with\n\tESMTP id v7UDxs2S20775082; Wed, 30 Aug 2017 13:59:54 GMT","from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 7EB3152041;\n\tWed, 30 Aug 2017 13:55:21 +0100 (BST)","from [9.164.182.241] (unknown [9.164.182.241])\n\tby d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id AFB355203F; \n\tWed, 30 Aug 2017 13:55:20 +0100 (BST)"],"Subject":"Re: [PATCH v2 1/3] powerpc/mm: Export flush_all_mm()","To":"Michael Ellerman <mpe@ellerman.id.au>, linuxppc-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","References":"<20170830101550.16821-1-fbarrat@linux.vnet.ibm.com>\n\t<87inh519fl.fsf@concordia.ellerman.id.au>","From":"Frederic Barrat <fbarrat@linux.vnet.ibm.com>","Date":"Wed, 30 Aug 2017 15:59:53 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<87inh519fl.fsf@concordia.ellerman.id.au>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Language":"en-US","Content-Transfer-Encoding":"8bit","X-TM-AS-GCONF":"00","x-cbid":"17083013-0040-0000-0000-000003D4665F","X-IBM-AV-DETECTION":"SAVI=unused REMOTE=unused XFE=unused","x-cbparentid":"17083013-0041-0000-0000-000025D4D71C","Message-Id":"<77b082b9-0e6e-ed38-3a4e-af7797990ef3@linux.vnet.ibm.com>","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-08-30_06:, , signatures=0","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=0\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000\n\tdefinitions=main-1708300211","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":1760488,"web_url":"http://patchwork.ozlabs.org/comment/1760488/","msgid":"<1504126817.4974.22.camel@kernel.crashing.org>","date":"2017-08-30T21:00:17","subject":"Re: [PATCH v2 1/3] powerpc/mm: Export flush_all_mm()","submitter":{"id":38,"url":"http://patchwork.ozlabs.org/api/people/38/","name":"Benjamin Herrenschmidt","email":"benh@kernel.crashing.org"},"content":"On Wed, 2017-08-30 at 23:17 +1000, Michael Ellerman wrote:\n> It's not clear why it makes sense for these to be empty. Either for the\n> general idea of the \"flush_all_mm()\" API, or for your intended use by\n> CXL.\n\nIndeed. On hash we don't have a way to flush a PID out of the TLB,\nbut you can flush the whole LPID.\n\nCheers,\nBen.","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 3xjHyF4LWlz9s81\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 31 Aug 2017 07:02:29 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xjHyF3YRxzDqZ9\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 31 Aug 2017 07:02:29 +1000 (AEST)","from gate.crashing.org (gate.crashing.org [63.228.1.57])\n\t(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xjHw11m3HzDqN4\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tThu, 31 Aug 2017 07:00:32 +1000 (AEST)","from localhost (localhost.localdomain [127.0.0.1])\n\tby gate.crashing.org (8.14.1/8.13.8) with ESMTP id v7UL0HwF030738;\n\tWed, 30 Aug 2017 16:00:18 -0500"],"Message-ID":"<1504126817.4974.22.camel@kernel.crashing.org>","Subject":"Re: [PATCH v2 1/3] powerpc/mm: Export flush_all_mm()","From":"Benjamin Herrenschmidt <benh@kernel.crashing.org>","To":"Michael Ellerman <mpe@ellerman.id.au>, Frederic Barrat\n\t<fbarrat@linux.vnet.ibm.com>,\n\tlinuxppc-dev@lists.ozlabs.org, andrew.donnellan@au1.ibm.com,\n\tclombard@linux.vnet.ibm.com, vaibhav@linux.vnet.ibm.com","Date":"Thu, 31 Aug 2017 07:00:17 +1000","In-Reply-To":"<87inh519fl.fsf@concordia.ellerman.id.au>","References":"<20170830101550.16821-1-fbarrat@linux.vnet.ibm.com>\n\t<87inh519fl.fsf@concordia.ellerman.id.au>","Content-Type":"text/plain; charset=\"UTF-8\"","X-Mailer":"Evolution 3.24.5 (3.24.5-1.fc26) ","Mime-Version":"1.0","Content-Transfer-Encoding":"7bit","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":1760490,"web_url":"http://patchwork.ozlabs.org/comment/1760490/","msgid":"<1504126871.4974.23.camel@kernel.crashing.org>","date":"2017-08-30T21:01:11","subject":"Re: [PATCH v2 1/3] powerpc/mm: Export flush_all_mm()","submitter":{"id":38,"url":"http://patchwork.ozlabs.org/api/people/38/","name":"Benjamin Herrenschmidt","email":"benh@kernel.crashing.org"},"content":"On Wed, 2017-08-30 at 15:59 +0200, Frederic Barrat wrote:\n> > It's not clear why it makes sense for these to be empty. Either for the\n> > general idea of the \"flush_all_mm()\" API, or for your intended use by\n> > CXL.\n> \n> I was not too sure what to do for hash, but the idea is that the new \n> flush_all_mm() is really the equivalent of the old flush_tlb_mm() from \n> before Ben's optimizations for radix, and that was/still is an empty \n> operation on hash, so I kept it that way.\n> \n> We don't support hash for capi2 yet. Adding it will definitely require \n> some work in that area, as the current approach (use count on the driver \n> and all TLBIs becoming global when the driver is in use) won't hold much \n> longer.\n\nWhy not ? It would work fine on hash, but you do need a way to flush\nthe TLB when decreasing the count indeed and that's missing for hash.\n\nCheers,\nBen.","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 3xjHzb6q7Bz9s81\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 31 Aug 2017 07:03:39 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xjHzb5gVgzDqYd\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 31 Aug 2017 07:03:39 +1000 (AEST)","from gate.crashing.org (gate.crashing.org [63.228.1.57])\n\t(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xjHx54LyfzDqXr\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tThu, 31 Aug 2017 07:01:29 +1000 (AEST)","from localhost (localhost.localdomain [127.0.0.1])\n\tby gate.crashing.org (8.14.1/8.13.8) with ESMTP id v7UL1BON030851;\n\tWed, 30 Aug 2017 16:01:12 -0500"],"Message-ID":"<1504126871.4974.23.camel@kernel.crashing.org>","Subject":"Re: [PATCH v2 1/3] powerpc/mm: Export flush_all_mm()","From":"Benjamin Herrenschmidt <benh@kernel.crashing.org>","To":"Frederic Barrat <fbarrat@linux.vnet.ibm.com>, Michael Ellerman\n\t<mpe@ellerman.id.au>, linuxppc-dev@lists.ozlabs.org,\n\tandrew.donnellan@au1.ibm.com, clombard@linux.vnet.ibm.com,\n\tvaibhav@linux.vnet.ibm.com","Date":"Thu, 31 Aug 2017 07:01:11 +1000","In-Reply-To":"<77b082b9-0e6e-ed38-3a4e-af7797990ef3@linux.vnet.ibm.com>","References":"<20170830101550.16821-1-fbarrat@linux.vnet.ibm.com>\n\t<87inh519fl.fsf@concordia.ellerman.id.au>\n\t<77b082b9-0e6e-ed38-3a4e-af7797990ef3@linux.vnet.ibm.com>","Content-Type":"text/plain; charset=\"UTF-8\"","X-Mailer":"Evolution 3.24.5 (3.24.5-1.fc26) ","Mime-Version":"1.0","Content-Transfer-Encoding":"7bit","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":1760765,"web_url":"http://patchwork.ozlabs.org/comment/1760765/","msgid":"<67e02113-1e61-9561-5208-939c3dde5888@linux.vnet.ibm.com>","date":"2017-08-31T09:13:33","subject":"Re: [PATCH v2 1/3] powerpc/mm: Export flush_all_mm()","submitter":{"id":67555,"url":"http://patchwork.ozlabs.org/api/people/67555/","name":"Frederic Barrat","email":"fbarrat@linux.vnet.ibm.com"},"content":"Le 30/08/2017 à 23:01, Benjamin Herrenschmidt a écrit :\n> On Wed, 2017-08-30 at 15:59 +0200, Frederic Barrat wrote:\n>>> It's not clear why it makes sense for these to be empty. Either for the\n>>> general idea of the \"flush_all_mm()\" API, or for your intended use by\n>>> CXL.\n>>\n>> I was not too sure what to do for hash, but the idea is that the new\n>> flush_all_mm() is really the equivalent of the old flush_tlb_mm() from\n>> before Ben's optimizations for radix, and that was/still is an empty\n>> operation on hash, so I kept it that way.\n>>\n>> We don't support hash for capi2 yet. Adding it will definitely require\n>> some work in that area, as the current approach (use count on the driver\n>> and all TLBIs becoming global when the driver is in use) won't hold much\n>> longer.\n> \n> Why not ? It would work fine on hash, but you do need a way to flush\n> the TLB when decreasing the count indeed and that's missing for hash.\n\nFor the future support of hash, the problem is actually not for capi2, \nbut for opencapi, where we can have more than one driver. So the driver \nuse count approach would need to be reworked (today the use count is in \nthe driver itself). What we do for radix is better, since we make the \nTLBI global only when required, per context. But it is not trivial to do \nthe same for hash, as we typically don't have the context handy when we \nsend the TLBI. So we'll have to do *something* when we add support for hash.\n\nFor my more pressing needs, I'll look into triggering a LPID flush for \nthe time being. It's too much but safe, and can be re-assess later when \nwe add hash support.\n\n   Fred","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 3xjcCN01ckz9sRW\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 31 Aug 2017 19:14:56 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xjcCM6HMTzDqh5\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 31 Aug 2017 19:14:55 +1000 (AEST)","from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com\n\t[148.163.156.1])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xjc9y6PhSzDqGZ\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tThu, 31 Aug 2017 19:13:42 +1000 (AEST)","from pps.filterd (m0098393.ppops.net [127.0.0.1])\n\tby mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv7V9AkAr013857\n\tfor <linuxppc-dev@lists.ozlabs.org>; Thu, 31 Aug 2017 05:13:40 -0400","from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109])\n\tby mx0a-001b2d01.pphosted.com with ESMTP id 2cpa7cud96-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <linuxppc-dev@lists.ozlabs.org>; Thu, 31 Aug 2017 05:13:40 -0400","from localhost\n\tby e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <linuxppc-dev@lists.ozlabs.org> from <fbarrat@linux.vnet.ibm.com>;\n\tThu, 31 Aug 2017 10:13:38 +0100","from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198)\n\tby e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP\n\tGateway: Authorized Use Only! Violators will be prosecuted; \n\tThu, 31 Aug 2017 10:13:35 +0100","from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com\n\t[9.149.105.62])\n\tby b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with\n\tESMTP id v7V9DZDt16646170; Thu, 31 Aug 2017 09:13:35 GMT","from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 26673AE051;\n\tThu, 31 Aug 2017 10:09:00 +0100 (BST)","from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 59FF9AE045;\n\tThu, 31 Aug 2017 10:08:59 +0100 (BST)","from [9.164.169.51] (unknown [9.164.169.51])\n\tby d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP;\n\tThu, 31 Aug 2017 10:08:59 +0100 (BST)"],"Subject":"Re: [PATCH v2 1/3] powerpc/mm: Export flush_all_mm()","To":"Benjamin Herrenschmidt <benh@kernel.crashing.org>,\n\tMichael Ellerman <mpe@ellerman.id.au>, linuxppc-dev@lists.ozlabs.org, \n\tandrew.donnellan@au1.ibm.com, clombard@linux.vnet.ibm.com,\n\tvaibhav@linux.vnet.ibm.com","References":"<20170830101550.16821-1-fbarrat@linux.vnet.ibm.com>\n\t<87inh519fl.fsf@concordia.ellerman.id.au>\n\t<77b082b9-0e6e-ed38-3a4e-af7797990ef3@linux.vnet.ibm.com>\n\t<1504126871.4974.23.camel@kernel.crashing.org>","From":"Frederic Barrat <fbarrat@linux.vnet.ibm.com>","Date":"Thu, 31 Aug 2017 11:13:33 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<1504126871.4974.23.camel@kernel.crashing.org>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Language":"en-US","Content-Transfer-Encoding":"8bit","X-TM-AS-GCONF":"00","x-cbid":"17083109-0012-0000-0000-00000573A668","X-IBM-AV-DETECTION":"SAVI=unused REMOTE=unused XFE=unused","x-cbparentid":"17083109-0013-0000-0000-000018EBCC01","Message-Id":"<67e02113-1e61-9561-5208-939c3dde5888@linux.vnet.ibm.com>","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-08-31_03:, , signatures=0","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=0\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000\n\tdefinitions=main-1708310139","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>"}}]