From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id CD2DA13888F for ; Sun, 11 Oct 2015 14:14:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 999FEE0818; Sun, 11 Oct 2015 14:14:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 23DBAE0818 for ; Sun, 11 Oct 2015 14:14:48 +0000 (UTC) Received: from greysprite.dite (cpe-74-77-145-97.buffalo.res.rr.com [74.77.145.97]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: blueness) by smtp.gentoo.org (Postfix) with ESMTPSA id DC2F2340676 for ; Sun, 11 Oct 2015 14:14:45 +0000 (UTC) Subject: Re: [gentoo-catalyst] [PATCH 1/2] stagebase: simplify lock calls a bit To: gentoo-catalyst@lists.gentoo.org References: <1444528479-3858-1-git-send-email-vapier@gentoo.org> From: "Anthony G. Basile" Message-ID: <561A6ED1.7050208@gentoo.org> Date: Sun, 11 Oct 2015 10:14:41 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org MIME-Version: 1.0 In-Reply-To: <1444528479-3858-1-git-send-email-vapier@gentoo.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Archives-Salt: d63bf78d-a452-42de-a662-e4672c8d8c6a X-Archives-Hash: 4eba65d43d0a4cfdc26c8c9fc90041d8 On 10/10/15 9:54 PM, Mike Frysinger wrote: > We create self.snapcache_lock to hold the lock, then assign it to > self.snapshot_lock_object, and then operate on self.snapshot_lock_object. > There's no need for this indirection, so operate on self.snapcache_lock > directly instead. > --- > catalyst/base/stagebase.py | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) > This and the next patch look fine and simplify matters a lot. This doesn't fix bug #519656 but it clears the way. When running multiple instances of catalyst, if the second instance tries to acquire the lock on the snapcache while the first one has it, it throws and exception instead of waiting on the lock. It would be nice for it to wait and timeout if it doesn't get the lock within some acceptable time limit. On systems with lots-o-cores I run mutliple instances of catalyst to economize on throughput. -- Anthony G. Basile, Ph.D. Gentoo Linux Developer [Hardened] E-Mail : blueness@gentoo.org GnuPG FP : 1FED FAD9 D82C 52A5 3BAB DC79 9384 FA6E F52D 4BBA GnuPG ID : F52D4BBA