diff options
author | David Chinner <dgc@sgi.com> | 2007-02-10 02:34:56 -0500 |
---|---|---|
committer | Tim Shimmin <tes@sgi.com> | 2007-02-10 02:34:56 -0500 |
commit | 7989cb8ef5dbc1411d3be48218c7b25ef6e71699 (patch) | |
tree | 607efa745911951a30712de44a837c1df952bd3a /fs/xfs/linux-2.6/xfs_buf.c | |
parent | 5e6a07dfe404cd4d8494d842b54706cb007fa04b (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.c | 24 |
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 | ||
37 | STATIC kmem_zone_t *xfs_buf_zone; | 37 | static kmem_zone_t *xfs_buf_zone; |
38 | STATIC kmem_shaker_t xfs_buf_shake; | 38 | static kmem_shaker_t xfs_buf_shake; |
39 | STATIC int xfsbufd(void *); | 39 | STATIC int xfsbufd(void *); |
40 | STATIC int xfsbufd_wakeup(int, gfp_t); | 40 | STATIC int xfsbufd_wakeup(int, gfp_t); |
41 | STATIC void xfs_buf_delwri_queue(xfs_buf_t *, int); | 41 | STATIC void xfs_buf_delwri_queue(xfs_buf_t *, int); |
42 | 42 | ||
43 | STATIC struct workqueue_struct *xfslogd_workqueue; | 43 | static struct workqueue_struct *xfslogd_workqueue; |
44 | struct workqueue_struct *xfsdatad_workqueue; | 44 | struct 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 | ||
142 | STATIC inline void | 142 | STATIC_INLINE void |
143 | set_page_region( | 143 | set_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 | ||
154 | STATIC inline int | 154 | STATIC_INLINE int |
155 | test_page_region( | 155 | test_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 | ||
174 | STATIC a_list_t *as_free_head; | 174 | static a_list_t *as_free_head; |
175 | STATIC int as_list_len; | 175 | static int as_list_len; |
176 | STATIC DEFINE_SPINLOCK(as_lock); | 176 | static 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 | ||
1088 | STATIC __inline__ int | 1088 | STATIC_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 | ||
1098 | STATIC __inline__ void | 1098 | STATIC_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 | */ |
1429 | STATIC LIST_HEAD(xfs_buftarg_list); | 1429 | LIST_HEAD(xfs_buftarg_list); |
1430 | STATIC DEFINE_SPINLOCK(xfs_buftarg_lock); | 1430 | static DEFINE_SPINLOCK(xfs_buftarg_lock); |
1431 | 1431 | ||
1432 | STATIC void | 1432 | STATIC void |
1433 | xfs_register_buftarg( | 1433 | xfs_register_buftarg( |