2001-12-04 02:56:29

by Frank Cornelis

[permalink] [raw]
Subject: misc_cache_init

Hi,

I looked at some past kernel mailings and it seems like some archs need
specific caches and others don't. In order to provide these
functionalities I suggest to add somewhere to init/main.c
misc_cache_init();
and provide an initial
#define misc_cache_init() do {} while (0)
for every architecture.
Anyone agrees on this?

Frank.


2001-12-04 11:05:47

by Russell King

[permalink] [raw]
Subject: Re: misc_cache_init

On Mon, Dec 03, 2001 at 01:36:04PM +0100, Frank Cornelis wrote:
> I looked at some past kernel mailings and it seems like some archs need
> specific caches and others don't. In order to provide these
> functionalities I suggest to add somewhere to init/main.c
> misc_cache_init();
> and provide an initial
> #define misc_cache_init() do {} while (0)
> for every architecture.
> Anyone agrees on this?

We already have this under a slightly different name (Alan didn't merge it
into Linus' kernel though from what I remember): pgtable_cache_init.

This was used in -ac to initialise the ARM PTE slab, as well as the x86
PAE slabs immediately after the call to kmem_cache_sizes_init.

--
Russell King ([email protected]) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html

2001-12-04 12:12:19

by Alan

[permalink] [raw]
Subject: Re: misc_cache_init

> We already have this under a slightly different name (Alan didn't merge it
> into Linus' kernel though from what I remember): pgtable_cache_init.

I started merging it then Linus said no more low priority bits

> This was used in -ac to initialise the ARM PTE slab, as well as the x86
> PAE slabs immediately after the call to kmem_cache_sizes_init.

its in Marcelo's tree I believe.

2001-12-06 14:53:52

by Frank Cornelis

[permalink] [raw]
Subject: Re: misc_cache_init

Hi,

> > We already have this under a slightly different name (Alan didn't merge it
> > into Linus' kernel though from what I remember): pgtable_cache_init.
>
> I started merging it then Linus said no more low priority bits
>
> > This was used in -ac to initialise the ARM PTE slab, as well as the x86
> > PAE slabs immediately after the call to kmem_cache_sizes_init.
>
> its in Marcelo's tree I believe.

mmm... pgtable_cache_init is there for initing the pgtable cache, not
other misc caches; it would be confusing start putting other cache inits
inthere. Anyway I already solved my problem using
__initcall(my_cache_init_func);
which is a nice way to init stuff.

Frank.