From owner-freebsd-geom@FreeBSD.ORG Sun Oct 24 18:07:36 2010 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC52E106566B for ; Sun, 24 Oct 2010 18:07:36 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 617A08FC12 for ; Sun, 24 Oct 2010 18:07:35 +0000 (UTC) Received: by fxm17 with SMTP id 17so2215016fxm.13 for ; Sun, 24 Oct 2010 11:07:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=73dyrWcqhQen6O5kcHpS0s/G/IF995M42FUohXY31aE=; b=OGTcDC7d8/+6o3b9xladqgDqzS6AwaZ5tXYmNjDBLOx4OqP+Iym2pG4q/HnE/kcser UijsXnKzz8GFgWZXZwvZGmQeedZVjYGvAnBZY5w7D0QUenS7/lv8X/zKKaaxmex4ALGT C9MIuj7ATN6IyOUaHp1W6noLB+OQhFLxQl/LU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=my4DuVLgtNqhE/7BNEd1dEhpIaPm+LR2E3cUT4I8sCnLWHLL/6WvDx9uWd5rEXOz0e UKW+8ZcV9h3Q3S9yAVmiYZvLX/jccHsg7wLeC6sdh70XMOB/prBPwNmlsVk9I4xKIcFN ulYjij0I8SYrfCXeCpdhMTe5z9vsgW/tiAPec= Received: by 10.103.193.13 with SMTP id v13mr1517227mup.43.1287941836155; Sun, 24 Oct 2010 10:37:16 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id z25sm2454083fam.2.2010.10.24.10.37.13 (version=SSLv3 cipher=RC4-MD5); Sun, 24 Oct 2010 10:37:14 -0700 (PDT) Sender: Alexander Motin Message-ID: <4CC46EC7.2090703@FreeBSD.org> Date: Sun, 24 Oct 2010 20:37:11 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Jaakko Heinonen References: <4C4ED619.7050305@FreeBSD.org> <27237.1280241532@critter.freebsd.dk> <4C4F171C.9010106@FreeBSD.org> <20101021174301.GA1381@a91-153-123-205.elisa-laajakaista.fi> In-Reply-To: <20101021174301.GA1381@a91-153-123-205.elisa-laajakaista.fi> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: =?UTF-8?B?TWFyaXVzIE7DvG5uZXJpY2g=?= , Poul-Henning Kamp , freebsd-geom@freebsd.org Subject: Re: Hyperactive g_event thread X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Oct 2010 18:07:37 -0000 Jaakko Heinonen wrote: > I drafted a patch to use g_eventlock instead to protect against losing > wakeups: > > http://people.freebsd.org/~jh/patches/geom-eventproc-sleep.diff > > Reviews and/or testing will be welcomed. I don't think that moving wakeup() inside the lock is needed. It is important to queue events under the lock to not loose them, but wakeup() IMHO could be left outside. At some places in GEOM I did directly opposite - move wakeup() out of the lock. Lock profiling reports slightly lower lock contention in that case and AFAIR it slightly improves performance under high load. But probably it is not so important for event thread. -- Alexander Motin