Merge PR 16232 into master

* refs/remotes/upstream/pull/16232/head:
	MDS: update the mlogger of mds in function check_memory_usage

Reviewed-by: Zheng Yan <zyan@redhat.com>
This commit is contained in:
Patrick Donnelly 2017-07-21 13:22:53 -07:00
commit 11d809e9fe
No known key found for this signature in database
GPG Key ID: 3A2A7E25BEA8AADB
3 changed files with 8 additions and 4 deletions

View File

@ -7456,6 +7456,7 @@ void MDCache::check_memory_usage()
<< ", " << Capability::count() << " caps, " << caps_per_inode << " caps per inode"
<< dendl;
mds->update_mlogger();
mds->mlogger->set(l_mdm_rss, last.get_rss());
mds->mlogger->set(l_mdm_heap, last.get_heap());

View File

@ -657,12 +657,17 @@ bool MDSRank::_dispatch(Message *m, bool new_msg)
}
*/
update_mlogger();
return true;
}
void MDSRank::update_mlogger()
{
if (mlogger) {
mlogger->set(l_mdm_ino, CInode::count());
mlogger->set(l_mdm_dir, CDir::count());
mlogger->set(l_mdm_dn, CDentry::count());
mlogger->set(l_mdm_cap, Capability::count());
mlogger->set(l_mdm_inoa, CInode::increments());
mlogger->set(l_mdm_inos, CInode::decrements());
mlogger->set(l_mdm_dira, CDir::increments());
@ -671,11 +676,8 @@ bool MDSRank::_dispatch(Message *m, bool new_msg)
mlogger->set(l_mdm_dns, CDentry::decrements());
mlogger->set(l_mdm_capa, Capability::increments());
mlogger->set(l_mdm_caps, Capability::decrements());
mlogger->set(l_mdm_buf, buffer::get_total_alloc());
}
return true;
}
/*

View File

@ -210,6 +210,7 @@ class MDSRank {
purge_queue.handle_conf_change(conf, changed, *mdsmap);
}
void update_mlogger();
protected:
// Flag to indicate we entered shutdown: anyone seeing this to be true
// after taking mds_lock must drop out.