summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/lib/CodeGen/InterferenceCache.h
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2016-11-12 23:32:00 +0000
committermav <mav@FreeBSD.org>2016-11-12 23:32:00 +0000
commit1e3fc7d3f7f42ba4a54f766315c1dc6a19b38138 (patch)
treec94a3811091b7a7876e0c5d2e01b1b4bc2edf86e /contrib/llvm/lib/CodeGen/InterferenceCache.h
parentbec35e3d85815b6b7863193892e2dca8fb728374 (diff)
downloadFreeBSD-src-1e3fc7d3f7f42ba4a54f766315c1dc6a19b38138.zip
FreeBSD-src-1e3fc7d3f7f42ba4a54f766315c1dc6a19b38138.tar.gz
MFC r307318: MFV r307314:
6988 spa_sync() spends half its time in dmu_objset_do_userquota_updates Using a benchmark which creates 2 million files in one TXG, I observe that the thread running spa_sync() is on CPU almost the entire time we are syncing, and therefore can be a performance bottleneck. About 50% of the time in spa_sync() is in dmu_objset_do_userquota_updates(). The problem is that dmu_objset_do_userquota_updates() calls zap_increment_int(DMU_USERUSED_OBJECT) once for every file that was modified (or created). In this benchmark, all the files are owned by the same user/group, so all 2 million calls to zap_increment_int() are modifying the same entry in the zap. The same issue exists for the DMU_GROUPUSED_OBJECT. We should keep an in-memory map from user to space delta while we are syncing, and when we finish, iterate over the in-memory map and modify the ZAP once per entry. This reduces the number of calls to zap_increment_int() from "number of objects modified" to "number of owners/groups of modified files". This reduced the time spent in spa_sync() in the file create benchmark by ~33%, from 11 seconds to 7 seconds. Closes #107 Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Steve Gonczi <steve.gonczi@delphix.com> Reviewed by: Ned Bass <bass6@llnl.gov> Reviewed by: Jinshan Xiong <jinshan.xiong@intel.com> Author: Matthew Ahrens <mahrens@delphix.com> openzfs/openzfs@5fc46359c569369d87728ca09f8705cdff6cc8e2
Diffstat (limited to 'contrib/llvm/lib/CodeGen/InterferenceCache.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud