From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752736Ab3KASZN (ORCPT ); Fri, 1 Nov 2013 14:25:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62673 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751529Ab3KASZM (ORCPT ); Fri, 1 Nov 2013 14:25:12 -0400 Message-ID: <5273F1ED.70408@redhat.com> Date: Fri, 01 Nov 2013 14:24:45 -0400 From: Prarit Bhargava User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110419 Red Hat/3.1.10-1.el6_0 Thunderbird/3.1.10 MIME-Version: 1.0 To: Mel Gorman CC: Rik van Riel , Peter Zijlstra , mingo@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -v2 -tip] fix race between stop_two_cpus and stop_cpus References: <20131031163144.0fd27457@annuminas.surriel.com> <20131101110825.GX2400@suse.de> <52739244.3060209@redhat.com> <20131101134424.GA32685@suse.de> <20131101142404.GG19466@laptop.lan> <5273BA58.6010404@redhat.com> <20131101104146.03d1e043@annuminas.surriel.com> <20131101144728.GY2400@suse.de> In-Reply-To: <20131101144728.GY2400@suse.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/01/2013 10:47 AM, Mel Gorman wrote: > On Fri, Nov 01, 2013 at 10:41:46AM -0400, Rik van Riel wrote: >> Subject: fix race between stop_two_cpus and stop_cpus >> >> There is a race between stop_two_cpus, and the global stop_cpus. >> >> It is possible for two CPUs to get their stopper functions queued >> "backwards" from one another, resulting in the stopper threads >> getting stuck, and the system hanging. This can happen because >> queuing up stoppers is not synchronized. >> >> This patch adds synchronization between stop_cpus (a rare operation), >> and stop_two_cpus. >> >> Signed-off-by: Rik van Riel >> --- >> v2: use lglock, as suggested by Peter & Mel, thanks to both of you >> for insisting on nicer code :) >> > > This is a tad more comprehensible :). Thanks! > > Acked-by: Mel Gorman > This ran all morning without issues. Tested-by: Prarit Bhargava P.