[Top] [All Lists]

Re: [PATCH] xfs: reduce lock traffic on incore sb lock

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH] xfs: reduce lock traffic on incore sb lock
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Wed, 29 Sep 2010 02:13:51 -0400
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20100929055748.GK5665@dastard>
References: <1285721500-5671-1-git-send-email-david@xxxxxxxxxxxxx> <20100929040425.GA29691@xxxxxxxxxxxxx> <20100929055748.GK5665@dastard>
User-agent: Mutt/1.5.20 (2009-08-17)
On Wed, Sep 29, 2010 at 03:57:48PM +1000, Dave Chinner wrote:
> FWIW, I've got a prototype that converts the per-cpu counters to the
> generic per-cpu counter infrastructure. It chops out almost all the
> xfs_icsb_* stuff (including xfs_icsb_modify_counters()) and has a
> diffstat of:

Sounds good - I always throught of the balanced per-cpu counters as
infrastructure that really shouldn't sit inside XFS.

> It needs a significant cleanup of xfs_mod_incore_sb() before/after
> the conversion which I haven't done yet because I haven't quite got
> my new percpu_counter_test_and_add_delta() function working
> correctly yet. I spotted this locking problem when testing the
> patch...
> That said, there's no reason why my percpu counter code needs to run
> through xfs_mod_incore_sb() at all. If we have a separate path for
> per-cpu counters then I can rework my code on top of that....

We'll always need a low-level function to to the actual superblock
updates and a high-level one modifying the per-cpu counters.  I don't
think the exact naming matters too much.

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