Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756983AbbBFQCn (ORCPT ); Fri, 6 Feb 2015 11:02:43 -0500 Received: from mail-ie0-f182.google.com ([209.85.223.182]:45111 "EHLO mail-ie0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752792AbbBFQCm (ORCPT ); Fri, 6 Feb 2015 11:02:42 -0500 MIME-Version: 1.0 In-Reply-To: <20150206115051.GL23123@twins.programming.kicks-ass.net> References: <1421878320.4903.17.camel@stgolabs.net> <54C02E08.4080405@hurleysoftware.com> <1861286.x5DC37NGWz@vostro.rjw.lan> <20150205221436.01bc24f2@neptune.home> <20150206115051.GL23123@twins.programming.kicks-ass.net> Date: Fri, 6 Feb 2015 08:02:41 -0800 X-Google-Sender-Auth: V46icg4NEZy86-TeXDtlWRZ4t6g Message-ID: Subject: Re: Linux 3.19-rc5 From: Linus Torvalds To: Peter Zijlstra Cc: =?UTF-8?Q?Bruno_Pr=C3=A9mont?= , "Rafael J. Wysocki" , Ingo Molnar , Peter Hurley , Davidlohr Bueso , Linux Kernel Mailing List , Thomas Gleixner , Ilya Dryomov , Mike Galbraith , Oleg Nesterov Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1011 Lines: 27 On Fri, Feb 6, 2015 at 3:50 AM, Peter Zijlstra wrote: > > Also, set_current_state(TASK_RUNNING) is almost always pointless, nobody > cares about that barrier, so make it go away. I'd rather not mix this with the patch, and wonder if we should just do that globally with some preprocessor magic. We do have a fair number of "set_current_state(TASK_RUNNING)" and at least for the *documented* reason for the memory barrier, all of them could/should be barrier-less. So something like if (__is_constant_p(state) && state == TASK_RUNNING) tsk->state = state; else set_mb(tsk->state, state); might be more general solution than randomly doing one at a time when changing code around it.. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/