From: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>,
linuxppc-dev@lists.ozlabs.org, benh@kernel.crashing.org,
andrew.donnellan@au1.ibm.com, clombard@linux.vnet.ibm.com,
vaibhav@linux.vnet.ibm.com
Cc: alistair@popple.id.au
Subject: Re: [PATCH v2 1/3] powerpc/mm: Export flush_all_mm()
Date: Wed, 30 Aug 2017 15:59:53 +0200 [thread overview]
Message-ID: <77b082b9-0e6e-ed38-3a4e-af7797990ef3@linux.vnet.ibm.com> (raw)
In-Reply-To: <87inh519fl.fsf@concordia.ellerman.id.au>
Le 30/08/2017 à 15:17, Michael Ellerman a écrit :
> Frederic Barrat <fbarrat@linux.vnet.ibm.com> writes:
>
>> With the optimizations introduced by commit a46cc7a90fd8
>> ("powerpc/mm/radix: Improve TLB/PWC flushes"), flush_tlb_mm() no
>> longer flushes the page walk cache with radix. This patch introduces
>> flush_all_mm(), which flushes everything, tlb and pwc, for a given mm.
>>
>> Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
>> ---
>> Changelog:
>> v2: this patch is new
>>
>> arch/powerpc/include/asm/book3s/64/tlbflush-hash.h | 8 ++++++++
>> arch/powerpc/include/asm/book3s/64/tlbflush-radix.h | 3 +++
>> arch/powerpc/include/asm/book3s/64/tlbflush.h | 15 +++++++++++++++
>> arch/powerpc/mm/tlb-radix.c | 6 ++++--
>> 4 files changed, 30 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/powerpc/include/asm/book3s/64/tlbflush-hash.h b/arch/powerpc/include/asm/book3s/64/tlbflush-hash.h
>> index 2f6373144e2c..c5d89d271a96 100644
>> --- a/arch/powerpc/include/asm/book3s/64/tlbflush-hash.h
>> +++ b/arch/powerpc/include/asm/book3s/64/tlbflush-hash.h
>> @@ -65,6 +65,14 @@ static inline void hash__flush_tlb_mm(struct mm_struct *mm)
>> {
>> }
>>
>> +static inline void hash__local_flush_all_mm(struct mm_struct *mm)
>> +{
>> +}
>> +
>> +static inline void hash__flush_all_mm(struct mm_struct *mm)
>> +{
>> +}
>
> It's not clear why it makes sense for these to be empty. Either for the
> general idea of the "flush_all_mm()" API, or for your intended use by
> CXL.
I was not too sure what to do for hash, but the idea is that the new
flush_all_mm() is really the equivalent of the old flush_tlb_mm() from
before Ben's optimizations for radix, and that was/still is an empty
operation on hash, so I kept it that way.
We don't support hash for capi2 yet. Adding it will definitely require
some work in that area, as the current approach (use count on the driver
and all TLBIs becoming global when the driver is in use) won't hold much
longer.
Fred
next prev parent reply other threads:[~2017-08-30 14:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-30 10:15 [PATCH v2 1/3] powerpc/mm: Export flush_all_mm() Frederic Barrat
2017-08-30 10:15 ` [PATCH v2 2/3] cxl: Fix driver use count Frederic Barrat
2017-08-30 13:18 ` Michael Ellerman
2017-08-31 11:36 ` [v2,2/3] " Michael Ellerman
2017-08-30 10:15 ` [PATCH v2 3/3] cxl: Enable global TLBIs for cxl contexts Frederic Barrat
2017-08-30 13:17 ` [PATCH v2 1/3] powerpc/mm: Export flush_all_mm() Michael Ellerman
2017-08-30 13:59 ` Frederic Barrat [this message]
2017-08-30 21:01 ` Benjamin Herrenschmidt
2017-08-31 9:13 ` Frederic Barrat
2017-08-30 21:00 ` Benjamin Herrenschmidt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=77b082b9-0e6e-ed38-3a4e-af7797990ef3@linux.vnet.ibm.com \
--to=fbarrat@linux.vnet.ibm.com \
--cc=alistair@popple.id.au \
--cc=andrew.donnellan@au1.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=clombard@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=vaibhav@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).