xfs
[Top] [All Lists]

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

To: David Chinner <dgc@xxxxxxx>
Subject: Re: Review: Reduce in-core superblock lock contention near ENOSPC
From: Lachlan McIlroy <lachlan@xxxxxxx>
Date: Wed, 06 Dec 2006 08:43:47 +0000
Cc: Klaus Strebel <klaus.strebel@xxxxxxx>, xfs-dev@xxxxxxx, xfs@xxxxxxxxxxx
In-reply-to: <20061205215503.GW44411608@xxxxxxxxxxxxxxxxx>
Organization: SGI
References: <20061123044122.GU11034@xxxxxxxxxxxxxxxxx> <456F1CFC.2060705@xxxxxxx> <20061130223810.GO37654165@xxxxxxxxxxxxxxxxx> <457080EA.1010807@xxxxxxx> <20061203234928.GA37654165@xxxxxxxxxxxxxxxxx> <45755C26.2080505@xxxxxxx> <20061205215503.GW44411608@xxxxxxxxxxxxxxxxx>
Reply-to: lachlan@xxxxxxx
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.7.12) Gecko/20050920
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?

The rest of the change looks good.

Lachlan


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