xfs
[Top] [All Lists]

Re: Defrag in shrinkers (was Re: [PATCH 0/5] Per-superblock shrinkers)

To: Christoph Lameter <cl@xxxxxxxxx>
Subject: Re: Defrag in shrinkers (was Re: [PATCH 0/5] Per-superblock shrinkers)
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Sat, 15 May 2010 11:15:23 +1000
Cc: linux-kernel@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx, Pekka Enberg <penberg@xxxxxxxxxxxxxx>, npiggin@xxxxxxx
In-reply-to: <alpine.DEB.2.00.1005141244380.9466@xxxxxxxxxxx>
References: <1273821863-29524-1-git-send-email-david@xxxxxxxxxxxxx> <alpine.DEB.2.00.1005141244380.9466@xxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
On Fri, May 14, 2010 at 12:46:52PM -0500, Christoph Lameter wrote:
> Would it also be possible to add some defragmentation logic when you
> revise the shrinkers? Here is a prototype patch that would allow you to
> determine the other objects sitting in the same page as a given object.
> 
> With that I hope that you have enough information to determine if its
> worth to evict the other objects as well to reclaim the slab page.

I'll have a think about how this might fit in - the real problem is
when the list returns objects that belong to a different superblock.
We can only safely check whether the object belongs to the current
superblock - to check if it belongs to a different sb we a lot of
locks and reference counting to juggle. That would require
re-introducing all the muck (and then some) that this patchset
removes from the shrinkers.

Perhaps just freeing the objects that belong to the current sb would
be sufficient to realise significant improvements (will be fine for
systems that only have one active or dominant filesystem), but i
think some experimentation would be needed.

The that brings us to test cases - we need a good one. I think we
need to re-evaluate where we stand with regard to slab fragmentation
(which probably hasn't changed much), and we need to be able to
quantify the amount of improvement the increase in complexity will
provide.  I don't have anything close to hand to generate such
fragmentation, so it might take a little time to write a test that
does the IO patterns I know will generate problems...

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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