George Melikov 1149ba6478 OpenZFS 7606 - dmu_objset_find_dp() takes a long time while importing pool
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.

Authored by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Steve Gonczi <steve.gonczi@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prashanth Sreenivasa <prashksp@gmail.com>
Reviewed-by: David Quigley <david.quigley@intel.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Ported-by: George Melikov <mail@gmelikov.ru>

OpenZFS-issue: https://www.illumos.org/issues/7606
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/cac6bab
Closes #5662
2017-01-26 12:46:02 -08:00
..
2015-01-16 14:41:26 -08:00
2015-01-16 14:41:26 -08:00
2016-11-02 12:14:45 -07:00
2017-01-03 11:31:18 -06:00
2016-06-28 13:47:02 -07:00
2017-01-03 11:31:18 -06:00
2016-12-12 10:46:26 -08:00
2016-12-12 10:46:26 -08:00
2017-01-03 11:31:18 -06:00
2015-01-16 14:41:26 -08:00
2015-12-22 10:21:33 -08:00
2016-04-21 09:49:25 -07:00
2017-01-03 11:31:18 -06:00
2010-08-31 13:41:58 -07:00
2017-01-03 11:31:18 -06:00
2016-08-11 11:23:49 -07:00
2017-01-03 11:31:18 -06:00
2016-12-02 16:57:49 -07:00
2016-11-29 14:34:33 -08:00
2016-11-29 14:34:33 -08:00
2013-10-31 14:58:04 -07:00
2010-08-31 13:41:58 -07:00
2016-09-21 18:09:00 -07:00
2017-01-03 11:31:18 -06:00
2016-11-30 16:18:20 -07:00
2016-12-16 13:54:51 -08:00
2017-01-03 11:31:18 -06:00
2016-05-31 16:04:26 -07:00
2017-01-03 11:31:18 -06:00
2017-01-23 10:35:58 -08:00