From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752351AbcGAIkq (ORCPT ); Fri, 1 Jul 2016 04:40:46 -0400 Received: from merlin.infradead.org ([205.233.59.134]:57342 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751100AbcGAIko (ORCPT ); Fri, 1 Jul 2016 04:40:44 -0400 Date: Fri, 1 Jul 2016 08:55:42 +0200 From: Peter Zijlstra To: "T.Zhou" Cc: mingo@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] sched: Assign !p->on_cpu to the second parameter of smp_cond_load_acquire() Message-ID: <20160701065542.GJ30921@twins.programming.kicks-ass.net> References: <20160701030801.GA15593@root> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160701030801.GA15593@root> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 01, 2016 at 11:08:01AM +0800, T.Zhou wrote: > - smp_cond_load_acquire(&p->on_cpu, !VAL); > + smp_cond_load_acquire(&p->on_cpu, !p->on_cpu); Huh, what?! No, the second parameter should very much include VAL, which gets assigned the value of *(&p->on_cpu). Go read the macro, it even has a comment on.