Whamcloud - gitweb
LU-12151 osd-ldiskfs: pass owner down rather than transfer it
Currently, for object creation, initially uid/gid set as 0,
and then osd_quota_trasfer() is called to correct space accounting
for non-root users, function call is like:
|->osd_create
|->osd_create_type_f
|->osd_mkreg
|->ldiskfs_create_inode
|->ext4_new_inode() ->owner as NULL, create 0 as uid/gid
|->osd_attr_init
|->osd_quota_transfer ->which will change uid/gid again for above.
This is inefficient since osd_quota_transfer() is a more
heavy operations, we could just pass downer owner(uid,gid),
project quota will inherit from its' parents automatically
when creating inode.
Some distros ext4 still did not support passing @owner down,
that is (rhel6,sles11) we just added extra @owner arg in
ldiskfs_create_inode() to make build system happy, and we
could add similar support to older kernel if that is really needed.
Command:
$ salloc -N 32 --ntasks-per-node=24 mpirun -np 768 mdtest -n 2000
-F -u -d <mnt>
Without Patch:
Users Speed
root 175741.938 ops/sec
non-root 108631.673 ops/sec
Patched:
Users Speed
root 184775.286 ops/sec
non-root 185218.466 ops/sec
Patch improved ~80% for non-root users and we reached
same speed for both root and non-root users.
Change-Id: I57b0d2a6913268448c0ed90cfe76bd9f051b0b40
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/34581
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>