aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_buf.c
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/xfs_buf.c
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/xfs_buf.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_buf.c24
1 files changed, 12 insertions, 12 deletions
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(