]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit - contrib/groff/src/roff/troff/input.h
MFV 316895
authorJosh Paetzel <jpaetzel@FreeBSD.org>
Thu, 27 Apr 2017 15:10:45 +0000 (15:10 +0000)
committerJosh Paetzel <jpaetzel@FreeBSD.org>
Thu, 27 Apr 2017 15:10:45 +0000 (15:10 +0000)
commitfa88c7891454ff938aef617af1325a16ed4ca92b
treeb34ea47707dbcdc90597aa5642245fdcdafbab2b
parent4aa92fe2f385fa66a86878dd38e29cde6c28ece7
parentcdeb4e5f0896ac66ab0f2e5c8d5f674aa79a5f94
MFV 316895

7606 dmu_objset_find_dp() takes a long time while importing pool

illumos/illumos-gate@7588687e6ba67c47bf7c9805086dec4a97fcac7b
https://github.com/illumos/illumos-gate/commit/7588687e6ba67c47bf7c9805086dec4a97fcac7b

https://www.illumos.org/issues/7606
  When importing a pool with a large number of filesystems within the same
  parent filesystem, we see that dmu_objset_find_dp() takes a long time.
  It is called from 3 places: spa_check_logs(), spa_ld_claim_log_blocks(),
  and spa_load_verify().
  There are several ways to improve performance here:
  1. We don't really need to do spa_check_logs() or
         spa_ld_claim_log_blocks() if the pool was closed cleanly.
  2. spa_load_verify() uses dmu_objset_find_dp() to check that no
         datasets have too long of names.
  3. dmu_objset_find_dp() is slow because it's doing
         zap_value_search() (which is O(N sibling datasets)) to determine
         the name of each dsl_dir when it's opened. In this case we
         actually know the name when we are opening it, so we can provide
         it and avoid the lookup.
  This change implements fix #3 from the above list; i.e. make
  dmu_objset_find_dp() provide the name of the dataset so that we don't
  have to search for it.

Reviewed by: Steve Gonczi <steve.gonczi@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prashanth Sreenivasa <prashksp@gmail.com>
Approved by: Gordon Ross <gordon.w.ross@gmail.com>
Author: Matthew Ahrens <mahrens@delphix.com>
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c