xfs
[Top] [All Lists]

Re: Review: Reduce in-core superblock lock contention near ENOSPC

To: Lachlan McIlroy <lachlan@xxxxxxx>
Subject: Re: Review: Reduce in-core superblock lock contention near ENOSPC
From: David Chinner <dgc@xxxxxxx>
Date: Fri, 8 Dec 2006 16:16:29 +1100
Cc: David Chinner <dgc@xxxxxxx>, Klaus Strebel <klaus.strebel@xxxxxxx>, xfs-dev@xxxxxxx, xfs@xxxxxxxxxxx
In-reply-to: <457682C3.6000802@xxxxxxx>
References: <20061123044122.GU11034@xxxxxxxxxxxxxxxxx> <456F1CFC.2060705@xxxxxxx> <20061130223810.GO37654165@xxxxxxxxxxxxxxxxx> <457080EA.1010807@xxxxxxx> <20061203234928.GA37654165@xxxxxxxxxxxxxxxxx> <45755C26.2080505@xxxxxxx> <20061205215503.GW44411608@xxxxxxxxxxxxxxxxx> <457682C3.6000802@xxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
On Wed, Dec 06, 2006 at 08:43:47AM +0000, Lachlan McIlroy wrote:
> David Chinner wrote:
> >On Tue, Dec 05, 2006 at 12:46:46PM +0100, Klaus Strebel wrote:
> >
> >>Hi guys,
> >>
> >>just updated my CVS copy from oss.sgi.com ( the linux-2.6-xfs ) and 
> >>tried to compile ... but your patch failes to compile if HAVE_PERCPU_SB 
> >>is #ifndef'd :-(, the m_icsb_mutex is not in the struct see xfs_mount.h. 
> >>Make oldconfig didn't show HAVE_PERCPU_SB as option for .config, looks 
> >>like nobody tested on a single processor config ??
> >
> >
> >Sorry - my bad. The code did not change for UP, so I didn't think to
> >test it.  The patch below abstracts the icsb_mutex so that it
> >doesn't get directly referenced by code outside the per-cpu counter
> >code. Builds with and without HAVE_PERCPU_SB defined.
> >
> >I'll run a test cycle on it and get it fixed up.
> >
> >Cheers,
> >
> >Dave.
> 
> @@ -1803,6 +1803,7 @@ xfs_icsb_destroy_counters(
>               unregister_hotcpu_notifier(&mp->m_icsb_notifier);
>               free_percpu(mp->m_sb_cnts);
>       }
> +     mutex_destroy(&mp->m_icsb_mutex);
>  }
> 
> Do you need to abstract the call to mutex_destroy too?

No. I didn't abstract the mutex_init and mutex_destroy calls because
they are in the init/destroy functions for the icsb subsystem and
those functions are #define'd out when HAVE_PERCPU_SB is not
defined.

> The rest of the change looks good.

Thanks, Lachlan.

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group


<Prev in Thread] Current Thread [Next in Thread>