linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Christoph Lameter <clameter@sgi.com>
Cc: linux-mm@kvack.org
Subject: Re: [patch 14/14] bufferhead: Revert constructor removal
Date: Mon, 22 Oct 2007 14:31:47 -0700	[thread overview]
Message-ID: <20071022143147.03de69ca.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070925233008.731010041@sgi.com>

On Tue, 25 Sep 2007 16:25:57 -0700
Christoph Lameter <clameter@sgi.com> wrote:

> The constructor for buffer_head slabs was removed recently. We need
> the constructor back in slab defrag in order to insure that slab objects
> always have a definite state even before we allocated them.
> 

I don't understand.  Slab defrag isn't merged.

> 
> ---
>  fs/buffer.c |   19 +++++++++++++++----
>  1 files changed, 15 insertions(+), 4 deletions(-)
> 
> Index: linux-2.6.23-rc8-mm1/fs/buffer.c
> ===================================================================
> --- linux-2.6.23-rc8-mm1.orig/fs/buffer.c	2007-09-25 15:14:40.000000000 -0700
> +++ linux-2.6.23-rc8-mm1/fs/buffer.c	2007-09-25 15:36:50.000000000 -0700
> @@ -3093,7 +3093,7 @@ static void recalc_bh_state(void)
>  	
>  struct buffer_head *alloc_buffer_head(gfp_t gfp_flags)
>  {
> -	struct buffer_head *ret = kmem_cache_zalloc(bh_cachep,
> +	struct buffer_head *ret = kmem_cache_alloc(bh_cachep,
>  				set_migrateflags(gfp_flags, __GFP_RECLAIMABLE));
>  	if (ret) {
>  		INIT_LIST_HEAD(&ret->b_assoc_buffers);
> @@ -3137,12 +3137,24 @@ static int buffer_cpu_notify(struct noti
>  	return NOTIFY_OK;
>  }
>  
> +static void
> +init_buffer_head(struct kmem_cache *cachep, void *data)
> +{
> +	struct buffer_head * bh = (struct buffer_head *)data;
> +
> +	memset(bh, 0, sizeof(*bh));
> +	INIT_LIST_HEAD(&bh->b_assoc_buffers);
> +}
> +
>  void __init buffer_init(void)
>  {
>  	int nrpages;
>  
> -	bh_cachep = KMEM_CACHE(buffer_head,
> -			SLAB_RECLAIM_ACCOUNT|SLAB_PANIC|SLAB_MEM_SPREAD);
> +	bh_cachep = kmem_cache_create("buffer_head",
> +			sizeof(struct buffer_head), 0,
> +				(SLAB_RECLAIM_ACCOUNT|SLAB_PANIC|
> +				SLAB_MEM_SPREAD),
> +				init_buffer_head);
>  

So I see no need for this patch?  Shouldn't it be part of a slab-defrag
patch series?

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2007-10-22 21:31 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-25 23:25 [patch 00/14] Misc cleanups / fixes Christoph Lameter
2007-09-25 23:25 ` [patch 01/14] Pagecache zeroing: zero_user_segment, zero_user_segments and zero_user Christoph Lameter
2007-09-25 23:25 ` [patch 02/14] Reiser4 portion of zero_user cleanup patch Christoph Lameter
2007-09-25 23:25 ` [patch 03/14] Move vmalloc_to_page() to mm/vmalloc Christoph Lameter
2007-09-25 23:25 ` [patch 04/14] vmalloc: add const to void ..tmp_kallsyms1.o.cmd ..tmp_kallsyms2.o.cmd ..tmp_vmlinux1.cmd ..tmp_vmlinux2.cmd .cf .cf1 .cf2 .cf3 .cfnet .config .config.old .gitignore .mailmap .missing-syscalls.d .pc .tmp_System.map .tmp_kallsyms1.S .tmp_kallsyms1.o .tmp_kallsyms2.S .tmp_kallsyms2.o .tmp_versions .tmp_vmlinux1 .tmp_vmlinux2 .version .vmlinux.cmd .vmlinux.o.cmd COPYING CREDITS Documentation Kbuild MAINTAINERS Makefile Module.symvers README REPORTING-BUGS System.map arch b block crypto drivers fs include init ipc kernel lib linux-2.6.23-rc8-mm1.tar.gz mips mm net patches scripts security sound tar-install test test_out usr vmlinux vmlinux.gz vmlinux.o vmlinux.sym xx parameters Christoph Lameter
2007-09-25 23:25 ` [patch 05/14] i386: Resolve dependency of asm-i386/pgtable.h on highmem.h Christoph Lameter
2007-09-25 23:25 ` [patch 06/14] is_vmalloc_addr(): Check if an address is within the vmalloc boundaries Christoph Lameter
2007-09-25 23:25 ` [patch 07/14] vmalloc: Clean up page array indexing Christoph Lameter
2007-09-25 23:25 ` [patch 08/14] vunmap: return page array passed on vmap() Christoph Lameter
2007-09-25 23:25 ` [patch 09/14] SLUB: Move count_partial() Christoph Lameter
2007-09-25 23:25 ` [patch 10/14] SLUB: Rename NUMA defrag_ratio to remote_node_defrag_ratio Christoph Lameter
2007-09-25 23:25 ` [patch 11/14] SLUB: Consolidate add_partial() and add_partial_tail() to one function Christoph Lameter
2007-09-25 23:25 ` [patch 12/14] VM: Allow get_page_unless_zero on compound pages Christoph Lameter
2007-09-25 23:25 ` [patch 13/14] dentries: Extract common code to remove dentry from lru Christoph Lameter
2007-10-22 21:29   ` Andrew Morton
2007-10-25  2:23     ` Christoph Lameter
2007-10-25  2:34       ` Andrew Morton
2007-10-25  2:50         ` Christoph Lameter
2007-10-25  3:03           ` Andrew Morton
2007-09-25 23:25 ` [patch 14/14] bufferhead: Revert constructor removal Christoph Lameter
2007-10-22 21:31   ` Andrew Morton [this message]
2007-10-25  2:25     ` Christoph Lameter
2007-09-27 20:25 ` [patch 00/14] Misc cleanups / fixes Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071022143147.03de69ca.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=clameter@sgi.com \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).