From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Subject: Re: [PATCH 1/3] kvm tools: Lock job_mutex before signalling Date: Sun, 01 May 2011 10:43:53 +0300 Message-ID: <1304235833.18980.1.camel@lappy> References: <1304170225-4859-1-git-send-email-levinsasha928@gmail.com> <1304233825.12132.52.camel@jaguar> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: mingo@elte.hu, asias.hejun@gmail.com, gorcunov@gmail.com, prasadjoshi124@gmail.com, kvm@vger.kernel.org To: Pekka Enberg Return-path: Received: from mail-bw0-f46.google.com ([209.85.214.46]:41698 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751676Ab1EAHn6 (ORCPT ); Sun, 1 May 2011 03:43:58 -0400 Received: by bwz15 with SMTP id 15so3967545bwz.19 for ; Sun, 01 May 2011 00:43:57 -0700 (PDT) In-Reply-To: <1304233825.12132.52.camel@jaguar> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, 2011-05-01 at 10:10 +0300, Pekka Enberg wrote: > On Sat, 2011-04-30 at 16:30 +0300, Sasha Levin wrote: > > Locking mutex before signalling to prevent unexpected > > scheduling. > > > > Signed-off-by: Sasha Levin > > Yeah, I think we need to do this but the changelog is not really > adequate for this kind of change. Care to elaborate more why it's > needed? > By holding the mutex while signaling, we can expect predictable scheduling between the worker threads. This will make debugging various thread pool related issues much easier (and maybe solve some obscure bugs too). -- Sasha.