GFS2: Don't add rgrp glocks to the lru
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 GFS2: Don't add rgrp glocks to the lru
Hi,
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 bypasses adding them to the lru.
Regards,
Bob Peterson
Red Hat File Systems
---
fs/gfs2/glock.c +2 -1
@@ -1076,7 +1076,8 @@ void gfs2_glock_dq(struct gfs2_holder *gh) !test_bit(GLF_DEMOTE, &gl->gl_flags)) fast_path =1 ; } -if (!test_bit (GLF_LFLUSH , &gl->gl_flags) &&demote_ok (gl)) +if (!test_bit (GLF_LFLUSH , &gl->gl_flags) &&demote_ok (gl) && + gl->gl_name.ln_type !=LM_TYPE_RGRP )gfs2_glock_add_to_lru (gl);trace_gfs2_glock_queue (gh,0 );
PATCH 1/1 GFS2: Don't add rgrp glocks to the lru
Hi,
Quoted 10 lines · Bob Peterson
Hi,
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_lockspin_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 bypasses adding them to the lru.
Quoted 6 lines
Regards,
Bob Peterson
Red Hat File SystemsSigned-off-by Bob Peterson <[email protected]>
Steve.
Quoted 16 lines
---
fs/gfs2/glock.c +2
-1@@ -1076,7 +1076,8 @@ void gfs2_glock_dq(struct gfs2_holder *gh) !test_bit(GLF_DEMOTE, &gl->gl_flags)) fast_path =1 ; } -if (!test_bit (GLF_LFLUSH , &gl->gl_flags) &&demote_ok (gl)) +if (!test_bit (GLF_LFLUSH , &gl->gl_flags) &&demote_ok (gl) && + gl->gl_name.ln_type !=LM_TYPE_RGRP )gfs2_glock_add_to_lru (gl);trace_gfs2_glock_queue (gh,0 );