* [PATCH 0/6] Remove global slab cache declarations from slab.h
@ 2006-11-21 20:36 Christoph Lameter
2006-11-21 20:36 ` [PATCH 1/6] Move sighand_cachep to include/signal.h Christoph Lameter
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Christoph Lameter @ 2006-11-21 20:36 UTC (permalink / raw)
To: akpm; +Cc: linux-mm, Christoph Lameter
One of the strange issues in slab.h is that it contains a list of global
slab caches. The following patches remove all the global definitions from
slab.h into #include <linux/*> files where related information is defined.
--
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>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/6] Move sighand_cachep to include/signal.h
2006-11-21 20:36 [PATCH 0/6] Remove global slab cache declarations from slab.h Christoph Lameter
@ 2006-11-21 20:36 ` Christoph Lameter
2006-11-21 20:36 ` [PATCH 2/6] Move vm_area_cachep to include/mm.h Christoph Lameter
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Christoph Lameter @ 2006-11-21 20:36 UTC (permalink / raw)
To: akpm; +Cc: linux-mm, Christoph Lameter
Move sighand_cachep definitioni to linux/signal.h
The sighand cache is only used in fs/exec.c and kernel/fork.c.
It is defined in kernel/fork.c but only used in fs/exec.c.
The sighand_cachep is related to signal processing. So add the definition
to signal.h.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Index: linux-2.6.19-rc5-mm2/include/linux/slab.h
===================================================================
--- linux-2.6.19-rc5-mm2.orig/include/linux/slab.h 2006-11-21 14:11:50.000000000 -0600
+++ linux-2.6.19-rc5-mm2/include/linux/slab.h 2006-11-21 14:12:25.500080559 -0600
@@ -302,7 +302,6 @@ extern kmem_cache_t *names_cachep;
extern kmem_cache_t *files_cachep;
extern kmem_cache_t *filp_cachep;
extern kmem_cache_t *fs_cachep;
-extern kmem_cache_t *sighand_cachep;
#endif /* __KERNEL__ */
Index: linux-2.6.19-rc5-mm2/include/linux/signal.h
===================================================================
--- linux-2.6.19-rc5-mm2.orig/include/linux/signal.h 2006-11-21 14:11:29.000000000 -0600
+++ linux-2.6.19-rc5-mm2/include/linux/signal.h 2006-11-21 14:12:07.687985977 -0600
@@ -241,6 +241,8 @@ extern int sigprocmask(int, sigset_t *,
struct pt_regs;
extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie);
+extern struct kmem_cache *sighand_cachep;
+
#endif /* __KERNEL__ */
#endif /* _LINUX_SIGNAL_H */
--
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>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/6] Move vm_area_cachep to include/mm.h
2006-11-21 20:36 [PATCH 0/6] Remove global slab cache declarations from slab.h Christoph Lameter
2006-11-21 20:36 ` [PATCH 1/6] Move sighand_cachep to include/signal.h Christoph Lameter
@ 2006-11-21 20:36 ` Christoph Lameter
2006-11-21 20:37 ` [PATCH 3/6] Move files_cachep to include/file.h Christoph Lameter
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Christoph Lameter @ 2006-11-21 20:36 UTC (permalink / raw)
To: akpm; +Cc: linux-mm, Christoph Lameter
Move vm_area_cachep to linux/mm.h
vm_area_cachep is used to store vm_area_structs. So move to mm.h.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Index: linux-2.6.19-rc5-mm2/include/linux/mm.h
===================================================================
--- linux-2.6.19-rc5-mm2.orig/include/linux/mm.h 2006-11-21 14:11:28.212876072 -0600
+++ linux-2.6.19-rc5-mm2/include/linux/mm.h 2006-11-21 14:14:21.660563147 -0600
@@ -114,6 +114,8 @@ struct vm_area_struct {
#endif
};
+extern struct kmem_cache *vm_area_cachep;
+
/*
* This struct defines the per-mm list of VMAs for uClinux. If CONFIG_MMU is
* disabled, then there's a single shared list of VMAs maintained by the
Index: linux-2.6.19-rc5-mm2/include/linux/slab.h
===================================================================
--- linux-2.6.19-rc5-mm2.orig/include/linux/slab.h 2006-11-21 14:12:25.500080559 -0600
+++ linux-2.6.19-rc5-mm2/include/linux/slab.h 2006-11-21 14:13:54.237282393 -0600
@@ -297,7 +297,6 @@ static inline void kmem_set_shrinker(kme
#endif /* CONFIG_SLOB */
/* System wide caches */
-extern kmem_cache_t *vm_area_cachep;
extern kmem_cache_t *names_cachep;
extern kmem_cache_t *files_cachep;
extern kmem_cache_t *filp_cachep;
--
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>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/6] Move files_cachep to include/file.h
2006-11-21 20:36 [PATCH 0/6] Remove global slab cache declarations from slab.h Christoph Lameter
2006-11-21 20:36 ` [PATCH 1/6] Move sighand_cachep to include/signal.h Christoph Lameter
2006-11-21 20:36 ` [PATCH 2/6] Move vm_area_cachep to include/mm.h Christoph Lameter
@ 2006-11-21 20:37 ` Christoph Lameter
2006-11-21 20:37 ` [PATCH 4/6] Move filep_cachep " Christoph Lameter
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Christoph Lameter @ 2006-11-21 20:37 UTC (permalink / raw)
To: akpm; +Cc: linux-mm, Christoph Lameter
Move files_cachep to linux/file.h
Proper place is in file.h since files_cachep uses are rated to file I/O.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Index: linux-2.6.19-rc5-mm2/include/linux/file.h
===================================================================
--- linux-2.6.19-rc5-mm2.orig/include/linux/file.h 2006-11-17 23:19:18.242851325 -0600
+++ linux-2.6.19-rc5-mm2/include/linux/file.h 2006-11-21 14:15:08.151906351 -0600
@@ -101,4 +101,6 @@ struct files_struct *get_files_struct(st
void FASTCALL(put_files_struct(struct files_struct *fs));
void reset_files_struct(struct task_struct *, struct files_struct *);
+extern struct kmem_cache *files_cachep;
+
#endif /* __LINUX_FILE_H */
Index: linux-2.6.19-rc5-mm2/include/linux/slab.h
===================================================================
--- linux-2.6.19-rc5-mm2.orig/include/linux/slab.h 2006-11-21 14:13:54.237282393 -0600
+++ linux-2.6.19-rc5-mm2/include/linux/slab.h 2006-11-21 14:14:41.154444046 -0600
@@ -298,7 +298,6 @@ static inline void kmem_set_shrinker(kme
/* System wide caches */
extern kmem_cache_t *names_cachep;
-extern kmem_cache_t *files_cachep;
extern kmem_cache_t *filp_cachep;
extern kmem_cache_t *fs_cachep;
--
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>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 4/6] Move filep_cachep to include/file.h
2006-11-21 20:36 [PATCH 0/6] Remove global slab cache declarations from slab.h Christoph Lameter
` (2 preceding siblings ...)
2006-11-21 20:37 ` [PATCH 3/6] Move files_cachep to include/file.h Christoph Lameter
@ 2006-11-21 20:37 ` Christoph Lameter
2006-11-21 20:37 ` [PATCH 5/6] Move fs_cachep to linux/fs_struct.h Christoph Lameter
2006-11-21 20:37 ` [PATCH 6/6] Move names_cachep to linux/fs.h Christoph Lameter
5 siblings, 0 replies; 7+ messages in thread
From: Christoph Lameter @ 2006-11-21 20:37 UTC (permalink / raw)
To: akpm; +Cc: linux-mm, Christoph Lameter
Move filp_cachep to linux/file.h
filp_cachep is only used in fs/file_table.c and in fs/dcache.c where
it is defined.
Move it to related definitions in linux/file.h.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Index: linux-2.6.19-rc5-mm2/include/linux/slab.h
===================================================================
--- linux-2.6.19-rc5-mm2.orig/include/linux/slab.h 2006-11-21 14:15:15.653534517 -0600
+++ linux-2.6.19-rc5-mm2/include/linux/slab.h 2006-11-21 14:15:25.356525757 -0600
@@ -298,7 +298,6 @@ static inline void kmem_set_shrinker(kme
/* System wide caches */
extern kmem_cache_t *names_cachep;
-extern kmem_cache_t *filp_cachep;
extern kmem_cache_t *fs_cachep;
#endif /* __KERNEL__ */
Index: linux-2.6.19-rc5-mm2/include/linux/file.h
===================================================================
--- linux-2.6.19-rc5-mm2.orig/include/linux/file.h 2006-11-21 14:15:08.000000000 -0600
+++ linux-2.6.19-rc5-mm2/include/linux/file.h 2006-11-21 14:16:51.302466932 -0600
@@ -57,6 +57,8 @@ struct files_struct {
#define files_fdtable(files) (rcu_dereference((files)->fdt))
+extern struct kmem_cache *filp_cachep;
+
extern void FASTCALL(__fput(struct file *));
extern void FASTCALL(fput(struct file *));
--
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>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 5/6] Move fs_cachep to linux/fs_struct.h
2006-11-21 20:36 [PATCH 0/6] Remove global slab cache declarations from slab.h Christoph Lameter
` (3 preceding siblings ...)
2006-11-21 20:37 ` [PATCH 4/6] Move filep_cachep " Christoph Lameter
@ 2006-11-21 20:37 ` Christoph Lameter
2006-11-21 20:37 ` [PATCH 6/6] Move names_cachep to linux/fs.h Christoph Lameter
5 siblings, 0 replies; 7+ messages in thread
From: Christoph Lameter @ 2006-11-21 20:37 UTC (permalink / raw)
To: akpm; +Cc: linux-mm, Christoph Lameter
Move fs_cachep declaration to linux/fs_struct.h.
fs_cachep is only used in kernel/exit.c and in kernel/fork.c.
It is used to store fs_struct items so it should be placed in linux/fs_struct.h
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Index: linux-2.6.19-rc5-mm2/include/linux/slab.h
===================================================================
--- linux-2.6.19-rc5-mm2.orig/include/linux/slab.h 2006-11-21 14:15:25.356525757 -0600
+++ linux-2.6.19-rc5-mm2/include/linux/slab.h 2006-11-21 14:17:18.977722945 -0600
@@ -298,7 +298,6 @@ static inline void kmem_set_shrinker(kme
/* System wide caches */
extern kmem_cache_t *names_cachep;
-extern kmem_cache_t *fs_cachep;
#endif /* __KERNEL__ */
Index: linux-2.6.19-rc5-mm2/include/linux/fs_struct.h
===================================================================
--- linux-2.6.19-rc5-mm2.orig/include/linux/fs_struct.h 2006-11-07 20:24:20.000000000 -0600
+++ linux-2.6.19-rc5-mm2/include/linux/fs_struct.h 2006-11-21 14:19:25.171312070 -0600
@@ -18,6 +18,8 @@ struct fs_struct {
.umask = 0022, \
}
+extern struct kmem_cache *fs_cachep;
+
extern void exit_fs(struct task_struct *);
extern void set_fs_altroot(void);
extern void set_fs_root(struct fs_struct *, struct vfsmount *, struct dentry *);
--
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>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 6/6] Move names_cachep to linux/fs.h
2006-11-21 20:36 [PATCH 0/6] Remove global slab cache declarations from slab.h Christoph Lameter
` (4 preceding siblings ...)
2006-11-21 20:37 ` [PATCH 5/6] Move fs_cachep to linux/fs_struct.h Christoph Lameter
@ 2006-11-21 20:37 ` Christoph Lameter
5 siblings, 0 replies; 7+ messages in thread
From: Christoph Lameter @ 2006-11-21 20:37 UTC (permalink / raw)
To: akpm; +Cc: linux-mm, Christoph Lameter
Move names_cachep to linux/fs.h
The names_cachep is used for getname() and putname(). So lets
put it into fs.h near those two definitions.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Index: linux-2.6.19-rc5-mm2/include/linux/slab.h
===================================================================
--- linux-2.6.19-rc5-mm2.orig/include/linux/slab.h 2006-11-21 14:17:18.977722945 -0600
+++ linux-2.6.19-rc5-mm2/include/linux/slab.h 2006-11-21 14:23:10.722165644 -0600
@@ -296,9 +297,6 @@ static inline void kmem_set_shrinker(kme
#endif /* CONFIG_SLOB */
-/* System wide caches */
-extern kmem_cache_t *names_cachep;
-
#endif /* __KERNEL__ */
#endif /* _LINUX_SLAB_H */
Index: linux-2.6.19-rc5-mm2/include/linux/fs.h
===================================================================
--- linux-2.6.19-rc5-mm2.orig/include/linux/fs.h 2006-11-17 23:19:17.403912377 -0600
+++ linux-2.6.19-rc5-mm2/include/linux/fs.h 2006-11-21 14:21:02.104542714 -0600
@@ -1558,6 +1558,8 @@ extern char * getname(const char __user
extern void __init vfs_caches_init_early(void);
extern void __init vfs_caches_init(unsigned long);
+extern struct kmem_cache *names_cachep;
+
#define __getname() kmem_cache_alloc(names_cachep, SLAB_KERNEL)
#define __putname(name) kmem_cache_free(names_cachep, (void *)(name))
#ifndef CONFIG_AUDITSYSCALL
--
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>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-11-21 20:37 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-21 20:36 [PATCH 0/6] Remove global slab cache declarations from slab.h Christoph Lameter
2006-11-21 20:36 ` [PATCH 1/6] Move sighand_cachep to include/signal.h Christoph Lameter
2006-11-21 20:36 ` [PATCH 2/6] Move vm_area_cachep to include/mm.h Christoph Lameter
2006-11-21 20:37 ` [PATCH 3/6] Move files_cachep to include/file.h Christoph Lameter
2006-11-21 20:37 ` [PATCH 4/6] Move filep_cachep " Christoph Lameter
2006-11-21 20:37 ` [PATCH 5/6] Move fs_cachep to linux/fs_struct.h Christoph Lameter
2006-11-21 20:37 ` [PATCH 6/6] Move names_cachep to linux/fs.h Christoph Lameter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox