From: Shreyas B Prabhu <shreyas@linux.vnet.ibm.com>
To: Preeti U Murthy <preeti@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org,
Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v4 3/3] powerpc/powernv: Introduce sysfs control for fastsleep workaround behavior
Date: Tue, 14 Apr 2015 13:40:31 +0530 [thread overview]
Message-ID: <552CCB77.1000307@linux.vnet.ibm.com> (raw)
In-Reply-To: <552CACD2.5060600@linux.vnet.ibm.com>
>>
>> By default, fastsleep_workaround_state = dynamic. In this case, workaround
>> is applied/undone everytime the core enters/exits fastsleep.
>>
>> fastsleep_workaround_state = applyonce. In this case the workaround is
>> applied once on all the cores and never undone. This can be triggered by
>> echo applyonce > /sys/devices/system/cpu/fastsleep_workaround_state
>
> I was wondering if we really need such an elaborate design for this
> sysfs file. Why not a sysfs file called fastsleep_workaround_apply_once,
> which is set to '0' by default and the only value that it can take is
> '1' ? The name easily implies that the workaround is applied only once
> if it is set. I can see that this can cut down a good chunk of code from
> this patch. I just didn't find too much value in having so much code for
> a simple 'on' knob.
I was considering something similar too. But then moved to this format
as I thought this was unambiguous. Also moving to a binary attribute
will reduces code only in show_fastsleep_workaround_state which I don't
feel is much.
That said, if you feel strongly about it, I can change it to the format
you suggested.
Thanks,
Shreyas
next prev parent reply other threads:[~2015-04-14 8:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-14 1:56 [PATCH v4 0/3] powerpc: powernv: Fastsleep workaround behavior Shreyas B. Prabhu
2015-04-14 1:56 ` [PATCH v4 1/3] powerpc: Fix cpu_online_cores_map to return only online threads mask Shreyas B. Prabhu
2015-04-14 1:56 ` [PATCH v4 2/3] powerpc/powernv: Move cpuidle related code from setup.c to new file Shreyas B. Prabhu
2015-04-14 5:07 ` Preeti U Murthy
2015-04-14 1:56 ` [PATCH v4 3/3] powerpc/powernv: Introduce sysfs control for fastsleep workaround behavior Shreyas B. Prabhu
2015-04-14 5:59 ` Preeti U Murthy
2015-04-14 8:10 ` Shreyas B Prabhu [this message]
2015-04-14 8:31 ` Preeti U Murthy
2015-04-14 8:27 ` Preeti U Murthy
2015-04-15 6:05 ` Shreyas B Prabhu
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=552CCB77.1000307@linux.vnet.ibm.com \
--to=shreyas@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=preeti@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).