Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753483AbbBMV4g (ORCPT ); Fri, 13 Feb 2015 16:56:36 -0500 Received: from smtp2.provo.novell.com ([137.65.250.81]:59256 "EHLO smtp2.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752515AbbBMV4f (ORCPT ); Fri, 13 Feb 2015 16:56:35 -0500 Message-ID: <1423864582.2046.82.camel@stgolabs.net> Subject: Re: [PATCH] sched/completion: completion_done() should serialize with complete() From: Davidlohr Bueso To: Oleg Nesterov Cc: "Paul E. McKenney" , Peter Zijlstra , linux-kernel@vger.kernel.org, waiman.long@hp.com, raghavendra.kt@linux.vnet.ibm.com Date: Fri, 13 Feb 2015 13:56:22 -0800 In-Reply-To: <20150212195913.GA30430@redhat.com> References: <20150212003430.GA28656@linux.vnet.ibm.com> <20150212195913.GA30430@redhat.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.9 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 932 Lines: 25 On Thu, 2015-02-12 at 20:59 +0100, Oleg Nesterov wrote: > Commit de30ec47302c "Remove unnecessary ->wait.lock serialization when > reading completion state" was not correct, without lock/unlock the code > like stop_machine_from_inactive_cpu() > > while (!completion_done()) > cpu_relax(); > > can return before complete() finishes its spin_unlock() which writes to > this memory. And spin_unlock_wait(). How about reverting the patch altogether? This was never a problem nor have I ever seen a performance issues in completions that would merit these lockless checks. The commit changelog has *zero* information, so I don't know if this was ever a real issue. Thanks, Davidlohr -- 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/