aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/glops.c
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2015-06-12 14:15:54 -0400
committerBob Peterson <rpeterso@redhat.com>2015-06-18 13:17:59 -0400
commite7ccaf5fe1590667b3fa2f8df5c5ec9ba0dc5b85 (patch)
tree168c1f810fac94f8696fa491bee923e42d1677b7 /fs/gfs2/glops.c
parent86066914edff2316cbed63aac8a87d5001441a16 (diff)
GFS2: Don't add all glocks to the lru
The glocks used for resource groups often come and go hundreds of thousands of times per second. Adding them to the lru list just adds unnecessary contention for the lru_lock spin_lock, especially considering we're almost certainly going to re-use the glock and take it back off the lru microseconds later. We never want the glock shrinker to cull them anyway. This patch adds a new bit in the glops that determines which glock types get put onto the lru list and which ones don't. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Acked-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/glops.c')
-rw-r--r--fs/gfs2/glops.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c
index fe91951c3361..1249b2bb2830 100644
--- a/fs/gfs2/glops.c
+++ b/fs/gfs2/glops.c
@@ -561,7 +561,7 @@ const struct gfs2_glock_operations gfs2_inode_glops = {
561 .go_lock = inode_go_lock, 561 .go_lock = inode_go_lock,
562 .go_dump = inode_go_dump, 562 .go_dump = inode_go_dump,
563 .go_type = LM_TYPE_INODE, 563 .go_type = LM_TYPE_INODE,
564 .go_flags = GLOF_ASPACE, 564 .go_flags = GLOF_ASPACE | GLOF_LRU,
565}; 565};
566 566
567const struct gfs2_glock_operations gfs2_rgrp_glops = { 567const struct gfs2_glock_operations gfs2_rgrp_glops = {
@@ -584,10 +584,12 @@ const struct gfs2_glock_operations gfs2_freeze_glops = {
584const struct gfs2_glock_operations gfs2_iopen_glops = { 584const struct gfs2_glock_operations gfs2_iopen_glops = {
585 .go_type = LM_TYPE_IOPEN, 585 .go_type = LM_TYPE_IOPEN,
586 .go_callback = iopen_go_callback, 586 .go_callback = iopen_go_callback,
587 .go_flags = GLOF_LRU,
587}; 588};
588 589
589const struct gfs2_glock_operations gfs2_flock_glops = { 590const struct gfs2_glock_operations gfs2_flock_glops = {
590 .go_type = LM_TYPE_FLOCK, 591 .go_type = LM_TYPE_FLOCK,
592 .go_flags = GLOF_LRU,
591}; 593};
592 594
593const struct gfs2_glock_operations gfs2_nondisk_glops = { 595const struct gfs2_glock_operations gfs2_nondisk_glops = {
@@ -596,7 +598,7 @@ const struct gfs2_glock_operations gfs2_nondisk_glops = {
596 598
597const struct gfs2_glock_operations gfs2_quota_glops = { 599const struct gfs2_glock_operations gfs2_quota_glops = {
598 .go_type = LM_TYPE_QUOTA, 600 .go_type = LM_TYPE_QUOTA,
599 .go_flags = GLOF_LVB, 601 .go_flags = GLOF_LVB | GLOF_LRU,
600}; 602};
601 603
602const struct gfs2_glock_operations gfs2_journal_glops = { 604const struct gfs2_glock_operations gfs2_journal_glops = {