mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
cityhash: replace invocations with specialized versions when possible
So that we can get actual benefit from last commit. Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Shengqi Chen <harry-chen@outlook.com> Closes #16131 Closes #16483
This commit is contained in:
committed by
Brian Behlendorf
parent
0ae4460c61
commit
a877b39624
@@ -405,13 +405,13 @@ dmu_objset_byteswap(void *buf, size_t size)
|
||||
}
|
||||
|
||||
/*
|
||||
* Runs cityhash4 on the objset_t pointer and the object number.
|
||||
* Runs cityhash on the objset_t pointer and the object number.
|
||||
*/
|
||||
static uint64_t
|
||||
dnode_hash(const objset_t *os, uint64_t obj)
|
||||
{
|
||||
uintptr_t osv = (uintptr_t)os;
|
||||
return (cityhash4((uint64_t)osv, obj, 0, 0));
|
||||
return (cityhash2((uint64_t)osv, obj));
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
|
||||
+2
-2
@@ -4182,8 +4182,8 @@ zio_alloc_zil(spa_t *spa, objset_t *os, uint64_t txg, blkptr_t *new_bp,
|
||||
* some parallelism.
|
||||
*/
|
||||
int flags = METASLAB_ZIL;
|
||||
int allocator = (uint_t)cityhash4(0, 0, 0,
|
||||
os->os_dsl_dataset->ds_object) % spa->spa_alloc_count;
|
||||
int allocator = (uint_t)cityhash1(os->os_dsl_dataset->ds_object)
|
||||
% spa->spa_alloc_count;
|
||||
error = metaslab_alloc(spa, spa_log_class(spa), size, new_bp, 1,
|
||||
txg, NULL, flags, &io_alloc_list, NULL, allocator);
|
||||
*slog = (error == 0);
|
||||
|
||||
Reference in New Issue
Block a user