ELC is skipping DOM bit to prevent data flush when it
is not really needed. Meanwhile if lock bits are combined
that caused unlink slowdown because ELC is disabled for
whole lock if DOM bit exists.
This patch is simple approach which determines if inode has
dirty pages and allows ELC for DOM unlink if there are none.
Test result of mdtest_easy_delete on DoM that unlink for
zero-byte files demostrated 28% perforamnce improvements.
1 x AI400(4 x MDS/MDT) on 10 node challenges:
Without patch:
mdtest_easy_delete 96.564 kiops : time 649.36 seconds
With patch:
mdtest_easy_delete 123.630 kiops : time 454.82 seconds
Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: Ic5b2aed8c8c0884ee518a587a0c45ad54915f4fa
Reviewed-on: https://review.whamcloud.com/36442
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
CLI_HASH64 = 1 << 2,
CLI_API32 = 1 << 3,
CLI_MIGRATE = 1 << 4,
CLI_HASH64 = 1 << 2,
CLI_API32 = 1 << 3,
CLI_MIGRATE = 1 << 4,
+ CLI_DIRTY_DATA = 1 << 5,
RETURN(PTR_ERR(op_data));
op_data->op_fid3 = *ll_inode2fid(dchild->d_inode);
RETURN(PTR_ERR(op_data));
op_data->op_fid3 = *ll_inode2fid(dchild->d_inode);
+ /* notify lower layer if inode has dirty pages */
+ if (S_ISREG(dchild->d_inode->i_mode) &&
+ ll_i2info(dchild->d_inode)->lli_clob &&
+ dirty_cnt(dchild->d_inode))
+ op_data->op_cli_flags |= CLI_DIRTY_DATA;
op_data->op_fid2 = op_data->op_fid3;
rc = md_unlink(ll_i2sbi(dir)->ll_md_exp, op_data, &request);
ll_finish_md_op_data(op_data);
op_data->op_fid2 = op_data->op_fid3;
rc = md_unlink(ll_i2sbi(dir)->ll_md_exp, op_data, &request);
ll_finish_md_op_data(op_data);
MDS_INODELOCK_UPDATE);
if ((op_data->op_flags & MF_MDC_CANCEL_FID3) &&
(fid_is_sane(&op_data->op_fid3)))
MDS_INODELOCK_UPDATE);
if ((op_data->op_flags & MF_MDC_CANCEL_FID3) &&
(fid_is_sane(&op_data->op_fid3)))
- /* don't cancel DoM lock which may cause data flush */
+ /* cancel DOM lock only if it has no data to flush */
count += mdc_resource_get_unused(exp, &op_data->op_fid3,
&cancels, LCK_EX,
count += mdc_resource_get_unused(exp, &op_data->op_fid3,
&cancels, LCK_EX,
+ op_data->op_cli_flags &
+ CLI_DIRTY_DATA ?
+ MDS_INODELOCK_ELC :
+ MDS_INODELOCK_FULL);
req = ptlrpc_request_alloc(class_exp2cliimp(exp),
&RQF_MDS_REINT_UNLINK);
if (req == NULL) {
req = ptlrpc_request_alloc(class_exp2cliimp(exp),
&RQF_MDS_REINT_UNLINK);
if (req == NULL) {