mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Fabian Frederick <fabf@skynet.be>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [RFC 1/1 linux-next] DRIVERS: replace current->state by set_current_state()
Date: Fri, 20 Feb 2015 09:56:21 +0100	[thread overview]
Message-ID: <20150220085621.GL21418@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1424377311-13144-1-git-send-email-fabf@skynet.be>

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.

  reply	other threads:[~2015-02-20  8:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-19 20:21 Fabian Frederick
2015-02-20  8:56 ` Peter Zijlstra [this message]
2015-02-20 18:17   ` Fabian Frederick

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=20150220085621.GL21418@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=fabf@skynet.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.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

all inboxes | Powered by JetHome®