aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6
diff options
context:
space:
mode:
authorDavid Chinner <dgc@sgi.com>2007-02-10 02:34:56 -0500
committerTim Shimmin <tes@sgi.com>2007-02-10 02:34:56 -0500
commit7989cb8ef5dbc1411d3be48218c7b25ef6e71699 (patch)
tree607efa745911951a30712de44a837c1df952bd3a /fs/xfs/linux-2.6
parent5e6a07dfe404cd4d8494d842b54706cb007fa04b (diff)
[XFS] Keep stack usage down for 4k stacks by using noinline.
gcc-4.1 and more recent aggressively inline static functions which increases XFS stack usage by ~15% in critical paths. Prevent this from occurring by adding noinline to the STATIC definition. Also uninline some functions that are too large to be inlined and were causing problems with CONFIG_FORCED_INLINING=y. Finally, clean up all the different users of inline, __inline and __inline__ and put them under one STATIC_INLINE macro. For debug kernels the STATIC_INLINE macro uninlines those functions. SGI-PV: 957159 SGI-Modid: xfs-linux-melb:xfs-kern:27585a Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: David Chatterton <chatz@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6')
-rw-r--r--fs/xfs/linux-2.6/xfs_aops.c2
-rw-r--r--fs/xfs/linux-2.6/xfs_buf.c24
-rw-r--r--fs/xfs/linux-2.6/xfs_export.c2
-rw-r--r--fs/xfs/linux-2.6/xfs_file.c4
-rw-r--r--fs/xfs/linux-2.6/xfs_iops.c4
-rw-r--r--fs/xfs/linux-2.6/xfs_super.c16
-rw-r--r--fs/xfs/linux-2.6/xfs_sysctl.c6
-rw-r--r--fs/xfs/linux-2.6/xfs_vnode.c2
-rw-r--r--fs/xfs/linux-2.6/xfs_vnode.h4
9 files changed, 32 insertions, 32 deletions
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c
index 7b54461695e2..9761a5befef0 100644
--- a/fs/xfs/linux-2.6/xfs_aops.c
+++ b/fs/xfs/linux-2.6/xfs_aops.c
@@ -249,7 +249,7 @@ xfs_map_blocks(
249 return -error; 249 return -error;
250} 250}
251 251
252STATIC inline int 252STATIC_INLINE int
253xfs_iomap_valid( 253xfs_iomap_valid(
254 xfs_iomap_t *iomapp, 254 xfs_iomap_t *iomapp,
255 loff_t offset) 255 loff_t offset)
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c
index 168eecd8127e..e2bea6a661f0 100644
--- a/fs/xfs/linux-2.6/xfs_buf.c
+++ b/fs/xfs/linux-2.6/xfs_buf.c
@@ -34,13 +34,13 @@
34#include <linux/backing-dev.h> 34#include <linux/backing-dev.h>
35#include <linux/freezer.h> 35#include <linux/freezer.h>
36 36
37STATIC kmem_zone_t *xfs_buf_zone; 37static kmem_zone_t *xfs_buf_zone;
38STATIC kmem_shaker_t xfs_buf_shake; 38static kmem_shaker_t xfs_buf_shake;
39STATIC int xfsbufd(void *); 39STATIC int xfsbufd(void *);
40STATIC int xfsbufd_wakeup(int, gfp_t); 40STATIC int xfsbufd_wakeup(int, gfp_t);
41STATIC void xfs_buf_delwri_queue(xfs_buf_t *, int); 41STATIC void xfs_buf_delwri_queue(xfs_buf_t *, int);
42 42
43STATIC struct workqueue_struct *xfslogd_workqueue; 43static struct workqueue_struct *xfslogd_workqueue;
44struct workqueue_struct *xfsdatad_workqueue; 44struct workqueue_struct *xfsdatad_workqueue;
45 45
46#ifdef XFS_BUF_TRACE 46#ifdef XFS_BUF_TRACE
@@ -139,7 +139,7 @@ page_region_mask(
139 return mask; 139 return mask;
140} 140}
141 141
142STATIC inline void 142STATIC_INLINE void
143set_page_region( 143set_page_region(
144 struct page *page, 144 struct page *page,
145 size_t offset, 145 size_t offset,
@@ -151,7 +151,7 @@ set_page_region(
151 SetPageUptodate(page); 151 SetPageUptodate(page);
152} 152}
153 153
154STATIC inline int 154STATIC_INLINE int
155test_page_region( 155test_page_region(
156 struct page *page, 156 struct page *page,
157 size_t offset, 157 size_t offset,
@@ -171,9 +171,9 @@ typedef struct a_list {
171 struct a_list *next; 171 struct a_list *next;
172} a_list_t; 172} a_list_t;
173 173
174STATIC a_list_t *as_free_head; 174static a_list_t *as_free_head;
175STATIC int as_list_len; 175static int as_list_len;
176STATIC DEFINE_SPINLOCK(as_lock); 176static DEFINE_SPINLOCK(as_lock);
177 177
178/* 178/*
179 * Try to batch vunmaps because they are costly. 179 * Try to batch vunmaps because they are costly.
@@ -1085,7 +1085,7 @@ xfs_buf_iostart(
1085 return status; 1085 return status;
1086} 1086}
1087 1087
1088STATIC __inline__ int 1088STATIC_INLINE int
1089_xfs_buf_iolocked( 1089_xfs_buf_iolocked(
1090 xfs_buf_t *bp) 1090 xfs_buf_t *bp)
1091{ 1091{
@@ -1095,7 +1095,7 @@ _xfs_buf_iolocked(
1095 return 0; 1095 return 0;
1096} 1096}
1097 1097
1098STATIC __inline__ void 1098STATIC_INLINE void
1099_xfs_buf_ioend( 1099_xfs_buf_ioend(
1100 xfs_buf_t *bp, 1100 xfs_buf_t *bp,
1101 int schedule) 1101 int schedule)
@@ -1426,8 +1426,8 @@ xfs_free_bufhash(
1426/* 1426/*
1427 * buftarg list for delwrite queue processing 1427 * buftarg list for delwrite queue processing
1428 */ 1428 */
1429STATIC LIST_HEAD(xfs_buftarg_list); 1429LIST_HEAD(xfs_buftarg_list);
1430STATIC DEFINE_SPINLOCK(xfs_buftarg_lock); 1430static DEFINE_SPINLOCK(xfs_buftarg_lock);
1431 1431
1432STATIC void 1432STATIC void
1433xfs_register_buftarg( 1433xfs_register_buftarg(
diff --git a/fs/xfs/linux-2.6/xfs_export.c b/fs/xfs/linux-2.6/xfs_export.c
index 5fb75d9151f2..e3a5fedac1ba 100644
--- a/fs/xfs/linux-2.6/xfs_export.c
+++ b/fs/xfs/linux-2.6/xfs_export.c
@@ -24,7 +24,7 @@
24#include "xfs_mount.h" 24#include "xfs_mount.h"
25#include "xfs_export.h" 25#include "xfs_export.h"
26 26
27STATIC struct dentry dotdot = { .d_name.name = "..", .d_name.len = 2, }; 27static struct dentry dotdot = { .d_name.name = "..", .d_name.len = 2, };
28 28
29/* 29/*
30 * XFS encodes and decodes the fileid portion of NFS filehandles 30 * XFS encodes and decodes the fileid portion of NFS filehandles
diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c
index d26f5cd2ba70..cb51dc961355 100644
--- a/fs/xfs/linux-2.6/xfs_file.c
+++ b/fs/xfs/linux-2.6/xfs_file.c
@@ -46,7 +46,7 @@ static struct vm_operations_struct xfs_file_vm_ops;
46static struct vm_operations_struct xfs_dmapi_file_vm_ops; 46static struct vm_operations_struct xfs_dmapi_file_vm_ops;
47#endif 47#endif
48 48
49STATIC inline ssize_t 49STATIC_INLINE ssize_t
50__xfs_file_read( 50__xfs_file_read(
51 struct kiocb *iocb, 51 struct kiocb *iocb,
52 const struct iovec *iov, 52 const struct iovec *iov,
@@ -84,7 +84,7 @@ xfs_file_aio_read_invis(
84 return __xfs_file_read(iocb, iov, nr_segs, IO_ISAIO|IO_INVIS, pos); 84 return __xfs_file_read(iocb, iov, nr_segs, IO_ISAIO|IO_INVIS, pos);
85} 85}
86 86
87STATIC inline ssize_t 87STATIC_INLINE ssize_t
88__xfs_file_write( 88__xfs_file_write(
89 struct kiocb *iocb, 89 struct kiocb *iocb,
90 const struct iovec *iov, 90 const struct iovec *iov,
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c
index 3ba814ae3bba..4dd6cb56c2d5 100644
--- a/fs/xfs/linux-2.6/xfs_iops.c
+++ b/fs/xfs/linux-2.6/xfs_iops.c
@@ -250,13 +250,13 @@ xfs_init_security(
250 * 250 *
251 * XXX(hch): nfsd is broken, better fix it instead. 251 * XXX(hch): nfsd is broken, better fix it instead.
252 */ 252 */
253STATIC inline int 253STATIC_INLINE int
254xfs_has_fs_struct(struct task_struct *task) 254xfs_has_fs_struct(struct task_struct *task)
255{ 255{
256 return (task->fs != init_task.fs); 256 return (task->fs != init_task.fs);
257} 257}
258 258
259STATIC inline void 259STATIC void
260xfs_cleanup_inode( 260xfs_cleanup_inode(
261 bhv_vnode_t *dvp, 261 bhv_vnode_t *dvp,
262 bhv_vnode_t *vp, 262 bhv_vnode_t *vp,
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c
index b93265b7c79c..dab5d3802374 100644
--- a/fs/xfs/linux-2.6/xfs_super.c
+++ b/fs/xfs/linux-2.6/xfs_super.c
@@ -58,10 +58,10 @@
58#include <linux/kthread.h> 58#include <linux/kthread.h>
59#include <linux/freezer.h> 59#include <linux/freezer.h>
60 60
61STATIC struct quotactl_ops xfs_quotactl_operations; 61static struct quotactl_ops xfs_quotactl_operations;
62STATIC struct super_operations xfs_super_operations; 62static struct super_operations xfs_super_operations;
63STATIC kmem_zone_t *xfs_vnode_zone; 63static kmem_zone_t *xfs_vnode_zone;
64STATIC kmem_zone_t *xfs_ioend_zone; 64static kmem_zone_t *xfs_ioend_zone;
65mempool_t *xfs_ioend_pool; 65mempool_t *xfs_ioend_pool;
66 66
67STATIC struct xfs_mount_args * 67STATIC struct xfs_mount_args *
@@ -121,7 +121,7 @@ xfs_max_file_offset(
121 return (((__uint64_t)pagefactor) << bitshift) - 1; 121 return (((__uint64_t)pagefactor) << bitshift) - 1;
122} 122}
123 123
124STATIC __inline__ void 124STATIC_INLINE void
125xfs_set_inodeops( 125xfs_set_inodeops(
126 struct inode *inode) 126 struct inode *inode)
127{ 127{
@@ -147,7 +147,7 @@ xfs_set_inodeops(
147 } 147 }
148} 148}
149 149
150STATIC __inline__ void 150STATIC_INLINE void
151xfs_revalidate_inode( 151xfs_revalidate_inode(
152 xfs_mount_t *mp, 152 xfs_mount_t *mp,
153 bhv_vnode_t *vp, 153 bhv_vnode_t *vp,
@@ -873,7 +873,7 @@ xfs_fs_get_sb(
873 mnt); 873 mnt);
874} 874}
875 875
876STATIC struct super_operations xfs_super_operations = { 876static struct super_operations xfs_super_operations = {
877 .alloc_inode = xfs_fs_alloc_inode, 877 .alloc_inode = xfs_fs_alloc_inode,
878 .destroy_inode = xfs_fs_destroy_inode, 878 .destroy_inode = xfs_fs_destroy_inode,
879 .write_inode = xfs_fs_write_inode, 879 .write_inode = xfs_fs_write_inode,
@@ -887,7 +887,7 @@ STATIC struct super_operations xfs_super_operations = {
887 .show_options = xfs_fs_show_options, 887 .show_options = xfs_fs_show_options,
888}; 888};
889 889
890STATIC struct quotactl_ops xfs_quotactl_operations = { 890static struct quotactl_ops xfs_quotactl_operations = {
891 .quota_sync = xfs_fs_quotasync, 891 .quota_sync = xfs_fs_quotasync,
892 .get_xstate = xfs_fs_getxstate, 892 .get_xstate = xfs_fs_getxstate,
893 .set_xstate = xfs_fs_setxstate, 893 .set_xstate = xfs_fs_setxstate,
diff --git a/fs/xfs/linux-2.6/xfs_sysctl.c b/fs/xfs/linux-2.6/xfs_sysctl.c
index af246532fbfb..b1036dd5012d 100644
--- a/fs/xfs/linux-2.6/xfs_sysctl.c
+++ b/fs/xfs/linux-2.6/xfs_sysctl.c
@@ -54,7 +54,7 @@ xfs_stats_clear_proc_handler(
54} 54}
55#endif /* CONFIG_PROC_FS */ 55#endif /* CONFIG_PROC_FS */
56 56
57STATIC ctl_table xfs_table[] = { 57static ctl_table xfs_table[] = {
58 {XFS_RESTRICT_CHOWN, "restrict_chown", &xfs_params.restrict_chown.val, 58 {XFS_RESTRICT_CHOWN, "restrict_chown", &xfs_params.restrict_chown.val,
59 sizeof(int), 0644, NULL, &proc_dointvec_minmax, 59 sizeof(int), 0644, NULL, &proc_dointvec_minmax,
60 &sysctl_intvec, NULL, 60 &sysctl_intvec, NULL,
@@ -136,12 +136,12 @@ STATIC ctl_table xfs_table[] = {
136 {0} 136 {0}
137}; 137};
138 138
139STATIC ctl_table xfs_dir_table[] = { 139static ctl_table xfs_dir_table[] = {
140 {FS_XFS, "xfs", NULL, 0, 0555, xfs_table}, 140 {FS_XFS, "xfs", NULL, 0, 0555, xfs_table},
141 {0} 141 {0}
142}; 142};
143 143
144STATIC ctl_table xfs_root_table[] = { 144static ctl_table xfs_root_table[] = {
145 {CTL_FS, "fs", NULL, 0, 0555, xfs_dir_table}, 145 {CTL_FS, "fs", NULL, 0, 0555, xfs_dir_table},
146 {0} 146 {0}
147}; 147};
diff --git a/fs/xfs/linux-2.6/xfs_vnode.c b/fs/xfs/linux-2.6/xfs_vnode.c
index 553fa731ade5..ada24baf88de 100644
--- a/fs/xfs/linux-2.6/xfs_vnode.c
+++ b/fs/xfs/linux-2.6/xfs_vnode.c
@@ -26,7 +26,7 @@ DEFINE_SPINLOCK(vnumber_lock);
26 */ 26 */
27#define NVSYNC 37 27#define NVSYNC 37
28#define vptosync(v) (&vsync[((unsigned long)v) % NVSYNC]) 28#define vptosync(v) (&vsync[((unsigned long)v) % NVSYNC])
29STATIC wait_queue_head_t vsync[NVSYNC]; 29static wait_queue_head_t vsync[NVSYNC];
30 30
31void 31void
32vn_init(void) 32vn_init(void)
diff --git a/fs/xfs/linux-2.6/xfs_vnode.h b/fs/xfs/linux-2.6/xfs_vnode.h
index 515f5fdea57a..b76118cf4897 100644
--- a/fs/xfs/linux-2.6/xfs_vnode.h
+++ b/fs/xfs/linux-2.6/xfs_vnode.h
@@ -489,14 +489,14 @@ static inline struct bhv_vnode *vn_grab(struct bhv_vnode *vp)
489#define VN_LOCK(vp) mutex_spinlock(&(vp)->v_lock) 489#define VN_LOCK(vp) mutex_spinlock(&(vp)->v_lock)
490#define VN_UNLOCK(vp, s) mutex_spinunlock(&(vp)->v_lock, s) 490#define VN_UNLOCK(vp, s) mutex_spinunlock(&(vp)->v_lock, s)
491 491
492static __inline__ void vn_flagset(struct bhv_vnode *vp, uint flag) 492STATIC_INLINE void vn_flagset(struct bhv_vnode *vp, uint flag)
493{ 493{
494 spin_lock(&vp->v_lock); 494 spin_lock(&vp->v_lock);
495 vp->v_flag |= flag; 495 vp->v_flag |= flag;
496 spin_unlock(&vp->v_lock); 496 spin_unlock(&vp->v_lock);
497} 497}
498 498
499static __inline__ uint vn_flagclr(struct bhv_vnode *vp, uint flag) 499STATIC_INLINE uint vn_flagclr(struct bhv_vnode *vp, uint flag)
500{ 500{
501 uint cleared; 501 uint cleared;
502 502