diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 5705c51..5e1f806 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -580,11 +580,11 @@ restart: ret = err; } up_read(&sb->s_umount); - } + } else count_vm_event(NR_SB_LOCKED); spin_lock(&sb_lock); if (__put_super_and_need_restart(sb)) goto restart; - } + } else count_vm_event(NR_SB_EMPTY); if (wbc->nr_to_write <= 0) break; } diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 75370ec..f9d19f0 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h @@ -37,6 +37,8 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, FOR_ALL_ZONES(PGSCAN_DIRECT), PGINODESTEAL, SLABS_SCANNED, KSWAPD_STEAL, KSWAPD_INODESTEAL, PAGEOUTRUN, ALLOCSTALL, PGROTATED, + NR_SB_LOCKED, + NR_SB_EMPTY, NR_VM_EVENT_ITEMS }; diff --git a/mm/vmstat.c b/mm/vmstat.c index 8e185f1..611f9d6 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -735,6 +735,9 @@ static const char * const vmstat_text[] = { "allocstall", "pgrotated", + + "sb_locked", + "sb_empty", #endif };