aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/jbd2.h
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2008-11-05 00:09:22 -0500
committerTheodore Ts'o <tytso@mit.edu>2008-11-05 00:09:22 -0500
commit1a0d3786dd57dbd74f340322054c3d618b999dcf (patch)
treeb10b3ed6cb60ee34a4e8140e60da2ecc34b52f32 /include/linux/jbd2.h
parent498e5f24158da7bf8fa48074a70e370e22844492 (diff)
jbd2: Remove a large array of bh's from the stack of the checkpoint routine
jbd2_log_do_checkpoint()n is one of the kernel's largest stack users. Move the array of buffer head's from the stack of jbd2_log_do_checkpoint() to the in-core journal structure. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'include/linux/jbd2.h')
-rw-r--r--include/linux/jbd2.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
index a3cd647ea1bc..004c9a8d63ed 100644
--- a/include/linux/jbd2.h
+++ b/include/linux/jbd2.h
@@ -687,6 +687,8 @@ jbd2_time_diff(unsigned long start, unsigned long end)
687 return end + (MAX_JIFFY_OFFSET - start); 687 return end + (MAX_JIFFY_OFFSET - start);
688} 688}
689 689
690#define JBD2_NR_BATCH 64
691
690/** 692/**
691 * struct journal_s - The journal_s type is the concrete type associated with 693 * struct journal_s - The journal_s type is the concrete type associated with
692 * journal_t. 694 * journal_t.
@@ -831,6 +833,14 @@ struct journal_s
831 struct mutex j_checkpoint_mutex; 833 struct mutex j_checkpoint_mutex;
832 834
833 /* 835 /*
836 * List of buffer heads used by the checkpoint routine. This
837 * was moved from jbd2_log_do_checkpoint() to reduce stack
838 * usage. Access to this array is controlled by the
839 * j_checkpoint_mutex. [j_checkpoint_mutex]
840 */
841 struct buffer_head *j_chkpt_bhs[JBD2_NR_BATCH];
842
843 /*
834 * Journal head: identifies the first unused block in the journal. 844 * Journal head: identifies the first unused block in the journal.
835 * [j_state_lock] 845 * [j_state_lock]
836 */ 846 */