Closed honggyukim closed 2 weeks ago
Thank you for this PR. Looks good to me :+1:
Thanks for merging this, but I found that we also need to provide a way to handle "target_nid" unless migrate actions won't work.
Yes, indeed. Could you please let me know if you already made the change and gonna send PR for that. If you don't have the plan, I could implement that on my own.
Thanks. My collegue @yunjeongmun started working on it, but it'd be helpful if you could give her some tips where to modify.
I think we should support the following commands and options
damo start
with a json config filedamo start
(maybe or tune
) with --damos_target_nid
optiondamo status
It would be helpful if you tell us what needs to be done more. Thanks!
started working on it
I thought you may already have the implementation for your testing, and wanted to avoid duplication of efforts. But seems it was not the case. Please let me know if you need any help. I would be happy to implement it from the scratch, if you want.
some tips where to modify.
I may also missed some parts, but I think below changes would be needed.
Damos
class in _damon.py
should be extended to have a field named target_nid
. The constructor and {from,to}_kvpairs()
method should also properly be updated._damon_args.py
would need to be updated to receive target_nid
for migrate_{hot,cold}
--damos_action
. Adding one more option (--damos_target_nid
) sounds nice, but I'd prefer letting --damos_action
receives two arguments for the case. e.g., damo start --damos_action migrate_hot 2
. Specifically, schemes_option_to_damos()
and set_damos_argparser()
would need to be updated._damon_sysfs.py
would need to be updated to read/write target_nid
value from/to the sysfs file. Specifically, files_content_to_scheme()
and write_scheme_dir()
would need to be updated.Thanks for your tips. Please see #100.
Since the implementation for DAMOS_MIGRATE_HOT and DAMOS_MIGRATE_COLD actions are merged into mm-unstable[1], it will likely be available soon in the upstream linux.
So damo has to support those actions and this patch is about it.
[1] https://lore.kernel.org/20240614185328.BA2C1C2BD10@smtp.kernel.org Signed-off-by: Honggyu Kim honggyu.kim@sk.com