Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Apr 2007 18:01:45 -0400 (EDT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        current@FreeBSD.org
Cc:        performance@FreeBSD.org, Andrzej Tobola <ato@iem.pw.edu.pl>
Subject:   Re: filedesc_sx patch (20070401a)
Message-ID:  <20070403175953.A25236@fledge.watson.org>
In-Reply-To: <20070401155910.O75869@fledge.watson.org>
References:  <20070401155910.O75869@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On Sun, 1 Apr 2007, Robert Watson wrote:

> The attached patch moves file descriptor locks from being a custom 
> mutex/sleep lock implemented using msleep() to an sx lock.  With the new sx 
> lock optimizations in place, this is now sensible, avoiding both a custom 
> lock type and significantly improving performance.  Kris has reported 2x-4x 
> improvement in transactions/sec with MySQL using this patch, as it greatly 
> reduces the cost of lock contention during file descriptor lookup for 
> threaded applications, and also moves to shared locking to avoid exclusive 
> acquisition for read-only operations (the vast majority in most workloads). 
> Patch is below, but you can also download from:
>
>  http://www.watson.org/~robert/freebsd/netperf/20070401a-filedesc-sx.diff
>
> I'm currently waiting for the sx lock changes to settle for a few days 
> before committing, so will plan to commit this around Wednesday/Thursday of 
> this week (unless serious problems arise).

Andrzej has pointed out that shortly after I posted the patch, it came into 
conflict with changes in VFS.  I've updated the patch and posted it at:

   http://www.watson.org/~robert/freebsd/netperf/20070403-filedesc-sx.diff

Thanks,

Robert N M Watson
Computer Laboratory
University of Cambridge



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070403175953.A25236>