netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [patch 16/18] FS: Socket inode defragmentation
       [not found] ` <20080404230229.401345769@sgi.com>
@ 2008-04-08  6:13   ` Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2008-04-08  6:13 UTC (permalink / raw)
  To: Christoph Lameter
  Cc: linux-mm, Mel Gorman, andi, Nick Piggin, Rik van Riel,
	Pekka Enberg, netdev

On Fri, 04 Apr 2008 16:02:14 -0700 Christoph Lameter <clameter@sgi.com> wrote:

> From: Christoph Lameter <clameter@sgi.com>
> To: akpm@linux-foundation.org
> Cc: linux-mm@kvack.org
> Cc: Mel Gorman <mel@skynet.ie>
> Cc: andi@firstfloor.org
> Cc: Nick Piggin <npiggin@suse.de>
> Cc: Rik van Riel <riel@redhat.com>
> Cc: Pekka Enberg <penberg@cs.helsinki.fi>

The net people should get to hear about this, I guess..

> Support inode defragmentation for sockets
> 
> Reviewed-by: Rik van Riel <riel@redhat.com>
> Signed-off-by: Christoph Lameter <clameter@sgi.com>
> ---
>  net/socket.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/net/socket.c b/net/socket.c
> index 9d3fbfb..205f450 100644
> --- a/net/socket.c
> +++ b/net/socket.c
> @@ -269,6 +269,12 @@ static void init_once(struct kmem_cache *cachep, void *foo)
>  	inode_init_once(&ei->vfs_inode);
>  }
>  
> +static void *sock_get_inodes(struct kmem_cache *s, int nr, void **v)
> +{
> +	return fs_get_inodes(s, nr, v,
> +		offsetof(struct socket_alloc, vfs_inode));
> +}
> +
>  static int init_inodecache(void)
>  {
>  	sock_inode_cachep = kmem_cache_create("sock_inode_cache",
> @@ -280,6 +286,8 @@ static int init_inodecache(void)
>  					      init_once);
>  	if (sock_inode_cachep == NULL)
>  		return -ENOMEM;
> +	kmem_cache_setup_defrag(sock_inode_cachep,
> +			sock_get_inodes, kick_inodes);
>  	return 0;
>  }
>  

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-04-08  6:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20080404230158.365359425@sgi.com>
     [not found] ` <20080404230229.401345769@sgi.com>
2008-04-08  6:13   ` [patch 16/18] FS: Socket inode defragmentation Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).