diff options
author | SeongJae Park <sj@kernel.org> | 2024-04-14 08:17:02 -0700 |
---|---|---|
committer | SeongJae Park <sj@kernel.org> | 2024-04-14 08:17:02 -0700 |
commit | 33906b1906a4dbf1d7401bfa38522f9344245103 (patch) | |
tree | af9970d95accb04e23ebeb7885d552e341429b63 | |
parent | 6b2d08b05df4e2df36df93d38af59b60fdfe7050 (diff) | |
download | damo-33906b1906a4dbf1d7401bfa38522f9344245103.tar.gz |
damo_tune: Remove own arguments double check
The arguments check is now being done by _damon_args.kdamonds_for().
'damo tune' is also using the function, so no need to do the check in
'damo tune'. Remove the duplicated check.
Signed-off-by: SeongJae Park <sj@kernel.org>
-rw-r--r-- | damo_tune.py | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/damo_tune.py b/damo_tune.py index 44c89961..5dd29e86 100644 --- a/damo_tune.py +++ b/damo_tune.py @@ -7,32 +7,6 @@ Update DAMON input parameters. import _damon import _damon_args -def evaluate_args_for_tune(args): - ''' - Verify if 'damons_action' is present when any 'damos_*' is specified - ''' - if not args.damos_action: - for key, value in args.__dict__.items(): - if key.startswith('damos_') and len(value): - if key == 'damos_action': continue - return False, '\'damos_action\' not specified while using --damos_* option(s)' - - ''' - Verify if 'reset_interval_ms' is specified in args when setting quota goals - ''' - if args.damos_quota_goal: - damos_quotas = args.damos_quotas - - if not len(damos_quotas): - return False, '\'reset_interval_ms\' not specified when setting quota goals' - - #reset_interval_ms is specified in --damos_quotas as 3rd arg - for quota in damos_quotas: - if len(quota) < 3: - return False, '\'reset_interval_ms\' not specified when setting quota goals' - - return True, None - def main(args): _damon.ensure_root_and_initialized(args) @@ -40,12 +14,6 @@ def main(args): print('DAMON is not turned on') exit(1) - correct_args, err = evaluate_args_for_tune(args) - - if (correct_args is not True and err is not None): - print('Tune error: incorrect arguments: %s' % err) - exit(1) - kdamonds, err = _damon_args.commit_kdamonds(args, args.quota_goals_only) if err: print('tuning failed (%s)' % err) |