lkml.org 
[lkml]   [2015]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC 1/1 linux-next] DRIVERS: replace current->state by set_current_state()
On Thu, Feb 19, 2015 at 09:21:51PM +0100, Fabian Frederick wrote:
> replace remaining direct access to current->state by slower
> helper function in drivers branch.
> Some of them could be optimized later using __set_current_state().

This changelog needs help. Going by this you just make the drivers worse
(slower).

The reason for using set_current_state() is not that its slower, its
because its actually correct; as opposed to direct assignments which are
prone to races and therefore buggy.

Also, since all were direct assignments you can immediately use
__set_current_state() for TASK_RUNNING; code will not be broken more by
that and relying on the barrier for TASK_RUNNING is obscure and rare
anyhow.

So sure, the idea is good, but please, write a coherent changelog to go
with it.


\
 
 \ /
  Last update: 2015-02-20 10:01    [W:0.042 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site