All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
	Christophe Leroy <christophe.leroy@csgroup.eu>,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/book3s64/radix: make tlb_single_page_flush_ceiling a debugfs entry
Date: Thu, 12 Aug 2021 22:14:04 +1000	[thread overview]
Message-ID: <87lf56n9mb.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <bb3855e1-f15d-1df6-5699-9addc69ce1db@linux.ibm.com>

"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com> writes:
> On 8/12/21 12:58 PM, Michael Ellerman wrote:
>> Christophe Leroy <christophe.leroy@csgroup.eu> writes:
>>> Le 10/08/2021 à 06:53, Aneesh Kumar K.V a écrit :
>>>> Similar to x86/s390 add a debugfs file to tune tlb_single_page_flush_ceiling.
>>>>
>>>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
>>>> ---
>>>>    arch/powerpc/mm/book3s64/radix_tlb.c | 48 ++++++++++++++++++++++++++++
>>>>    1 file changed, 48 insertions(+)
>>>>
>>>> diff --git a/arch/powerpc/mm/book3s64/radix_tlb.c b/arch/powerpc/mm/book3s64/radix_tlb.c
>>>> index aefc100d79a7..5cca0fe130e7 100644
>>>> --- a/arch/powerpc/mm/book3s64/radix_tlb.c
>>>> +++ b/arch/powerpc/mm/book3s64/radix_tlb.c
>>>> @@ -17,6 +17,7 @@
>> ...
>>>> +
>>>> +static int __init create_tlb_single_page_flush_ceiling(void)
>>>> +{
>>>> +	debugfs_create_file("tlb_single_page_flush_ceiling", S_IRUSR | S_IWUSR,
>>>> +			    powerpc_debugfs_root, NULL, &fops_tlbflush);
>>>
>>> Could you just use debugfs_create_u32() instead of re-implementing simple read and write ?
>> 
>> Yeah AFAICS that should work fine.
>> 
>> It could probably even be a u16?
>
> I was looking at switching all that to u64. Should i fallback to u16, 
> considering a tlb_signle_page_flush_ceiling value larger that 2**16 
> doesn't make sense?

Hmm, if we make it u16 and someone writes a value >= 2^16 it just
truncates the value to 0, which is a bit unfortunate.

So maybe just make it u32, that way if someone writes a stupidly large
value it stays large.

cheers

      reply	other threads:[~2021-08-12 12:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-10  4:53 [PATCH] powerpc/book3s64/radix: make tlb_single_page_flush_ceiling a debugfs entry Aneesh Kumar K.V
2021-08-10  5:17 ` Christophe Leroy
2021-08-12  7:28   ` Michael Ellerman
2021-08-12  8:13     ` Aneesh Kumar K.V
2021-08-12 12:14       ` Michael Ellerman [this message]

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=87lf56n9mb.fsf@mpe.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=christophe.leroy@csgroup.eu \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.