lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 14 Apr 2015 14:01:41 +0530
From:	Preeti U Murthy <preeti@...ux.vnet.ibm.com>
To:	Shreyas B Prabhu <shreyas@...ux.vnet.ibm.com>,
	linux-kernel@...r.kernel.org, Michael Ellerman <mpe@...erman.id.au>
CC:	linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH v4 3/3] powerpc/powernv: Introduce sysfs control for fastsleep
 workaround behavior

On 04/14/2015 01:40 PM, Shreyas B Prabhu wrote:
> 
>>>
>>> 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.

It cuts down two of your data structures:
fastsleep_workaround_avail_states[] and the enum and the parsing of the
input string in store_fastsleep_workaround_state() too.

Regards
Preeti U Murthy
> 
> Thanks,
> Shreyas
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@...ts.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ