stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
  • * RE: [PATCH 1/3] PM / devfreq: Fix available_governor sysfs
           [not found] <CGME20170118065653epcas5p2b1b4a964772e300b56356a26ec5cb9e5@epcas5p2.samsung.com>
           [not found] ` <1484722611-10555-1-git-send-email-cw00.choi@samsung.com>
    @ 2017-01-24  2:24 ` MyungJoo Ham
      2017-01-24  3:51 ` MyungJoo Ham
      2 siblings, 0 replies; 6+ messages in thread
    From: MyungJoo Ham @ 2017-01-24  2:24 UTC (permalink / raw)
      To: Chanwoo Choi, Kyungmin Park, rjw@rjwysocki.net
      Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
    	stable@vger.kernel.org
    
    [-- Attachment #1: Type: text/plain, Size: 1526 bytes --]
    
    > The devfreq using passive governor is not able to change the governor.
    > So, the user can not change the governor through 'available_governor' sysfs
    > entry. Also, the devfreq which don't use the passive governor is not able to
    > change to 'passive' governor on the fly.
    > 
    > Fixes: 996133119f57 ("PM / devfreq: Add new passive governor")
    > Cc: stable@vger.kernel.org
    > Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
    > ---
    >  drivers/devfreq/devfreq.c | 34 +++++++++++++++++++++++++++++++++-
    >  1 file changed, 33 insertions(+), 1 deletion(-)
    > 
    > diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
    > index 4bd7a8f71b07..a2c575a5a9ab 100644
    > --- a/drivers/devfreq/devfreq.c
    > +++ b/drivers/devfreq/devfreq.c
    > @@ -43,6 +43,11 @@
    >  static LIST_HEAD(devfreq_list);
    >  static DEFINE_MUTEX(devfreq_list_lock);
    >  
    > +static int is_passive_gov(const char *governor_name)
    > +{
    > +	return (!strncmp(governor_name, "passive", 7)) ? 1 : 0;
    > +}
    > +
    
    Having a special function for a governor in devfreq.c isn't looking good.
    Could you create it more general?
    (e.g., denying being replaced from passive governor)
    
    I'd suggest to "define" data value of event_handler to include the reason
    of STOP event for DEVFREQ_GOV_STOP. Then, a governor may "reject" it
    depending on the reason. (the reason is to be defined in devfreq.h as well)
    
    Then, the modification can be minimal and general for all others.
    
    The modification in this commit looks too hacky.
    
    
    
    Cheers,
    MyungJoo
    
    ^ permalink raw reply	[flat|nested] 6+ messages in thread
  • * RE: [PATCH 1/3] PM / devfreq: Fix available_governor sysfs
           [not found] <CGME20170118065653epcas5p2b1b4a964772e300b56356a26ec5cb9e5@epcas5p2.samsung.com>
           [not found] ` <1484722611-10555-1-git-send-email-cw00.choi@samsung.com>
      2017-01-24  2:24 ` [PATCH 1/3] PM / devfreq: Fix available_governor sysfs MyungJoo Ham
    @ 2017-01-24  3:51 ` MyungJoo Ham
      2017-01-24  6:23   ` Chanwoo Choi
      2 siblings, 1 reply; 6+ messages in thread
    From: MyungJoo Ham @ 2017-01-24  3:51 UTC (permalink / raw)
      To: Chanwoo Choi, Kyungmin Park, rjw@rjwysocki.net
      Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
    	stable@vger.kernel.org
    
    [-- Attachment #1: Type: text/plain, Size: 1080 bytes --]
    
    > The devfreq using passive governor is not able to change the governor.
    > So, the user can not change the governor through 'available_governor' sysfs
    > entry. Also, the devfreq which don't use the passive governor is not able to
    > change to 'passive' governor on the fly.
    
    Another thoughts on the characteristics of 'passive' governor:
    
    1. Should we prohibit moving from "others" to "passive"?
    2. Should we show "passive" in the available list if it's not passive now?
    3. Why don't we show anyway and reject it when actually tries to change?
    4. Or should we add a value in devfreq struct that is confired at devfreq
    device add, which prohibits changing governors? (and passive will
    return error if that flag is not set or it will set the value automatically)
    
    Cheers,
    MyungJoo
    
    > 
    > Fixes: 996133119f57 ("PM / devfreq: Add new passive governor")
    > Cc: stable@vger.kernel.org
    > Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
    > ---
    >  drivers/devfreq/devfreq.c | 34 +++++++++++++++++++++++++++++++++-
    >  1 file changed, 33 insertions(+), 1 deletion(-)
    
    ^ permalink raw reply	[flat|nested] 6+ messages in thread

  • end of thread, other threads:[~2017-01-24  6:33 UTC | newest]
    
    Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
    -- links below jump to the message on this page --
         [not found] <CGME20170118065653epcas5p2b1b4a964772e300b56356a26ec5cb9e5@epcas5p2.samsung.com>
         [not found] ` <1484722611-10555-1-git-send-email-cw00.choi@samsung.com>
    2017-01-18  6:56   ` [PATCH 1/3] PM / devfreq: Fix available_governor sysfs Chanwoo Choi
    2017-01-18  6:56   ` [PATCH 2/3] PM / devfreq: Fix wrong trans_stat of passive devfreq device Chanwoo Choi
         [not found]   ` <CGME20170118065653epcas5p2da6963fbad338a3c402c7d99f5e8473f@epcas5p2.samsung.com>
    2017-01-24  3:40     ` MyungJoo Ham
    2017-01-24  2:24 ` [PATCH 1/3] PM / devfreq: Fix available_governor sysfs MyungJoo Ham
    2017-01-24  3:51 ` MyungJoo Ham
    2017-01-24  6:23   ` Chanwoo Choi
    

    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).