Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752560Ab0BAKKT (ORCPT ); Mon, 1 Feb 2010 05:10:19 -0500 Received: from one.firstfloor.org ([213.235.205.2]:58879 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751011Ab0BAKKR (ORCPT ); Mon, 1 Feb 2010 05:10:17 -0500 Date: Mon, 1 Feb 2010 11:10:13 +0100 From: Andi Kleen To: Nick Piggin Cc: Al Viro , Christoph Lameter , Andi Kleen , Dave Chinner , Alexander Viro , Christoph Hellwig , Christoph Lameter , Rik van Riel , Pekka Enberg , akpm@linux-foundation.org, Miklos Szeredi , Nick Piggin , Hugh Dickins , linux-kernel@vger.kernel.org Subject: Re: dentries: dentry defragmentation Message-ID: <20100201101013.GG29555@one.firstfloor.org> References: <20100129204931.789743493@quilx.com> <20100129205007.832823807@quilx.com> <20100129220044.GA31305@ZenIV.linux.org.uk> <20100201070835.GE9085@laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100201070835.GE9085@laptop> User-Agent: Mutt/1.4.2.2i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1326 Lines: 34 On Mon, Feb 01, 2010 at 06:08:35PM +1100, Nick Piggin wrote: > I always preferred to do defrag in the opposite way. Ie. query the > slab allocator from existing shrinkers rather than opposite way > around. This lets you reuse more of the locking and refcounting etc. I looked at this for hwpoison soft offline. But it works really badly because the LRU list ordering has nothing to do with the actual ordering inside the slab pages. Christoph's basic approach is more efficient. > So you have a pin on the object somehow via the normal shrinker path, > and therefore you get a pin on the underlying slab. I would just like > to see even performance of a real simple approach that just asks > whether we are in this slab defrag mode, and if so, whether the slab > is very sparse. If yes, then reclaim aggressively. The typical result is that you need to get through most of the LRU list (and prune them all) just to free the page. > > If that doesn't perform well enough and you have to go further and It doesn't. -Andi -- ak@linux.intel.com -- Speaking for myself only. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/