kmap() transformation: Question about copy_user_highpage
Hello,
I am attempting to work on replacing the kmap[_atomic]() calls by kmap_local_page() function call. A detail on this change can be found here [0].
I would like to know if this function:
arch/loongarch/mm/init.c::copy_user_highpage()
is currently in use or is it a dead code?
If this code is not in use, can this be removed instead? However, if it is in use, can you comment why kmap_atomic() was preferred over kmap() function call?
[0] https://lore.kernel.org/all/[email protected]/
Thank you,
Deepak.
Huacai Chen
maintainerHi, Deepak,
Quoted 5 lines · Deepak R Varma
Hello,
I am attempting to work on replacing the kmap[_atomic]() calls bykmap_local_page()function call. A detail on this change can be found here [0].
Quoted 7 lines
I would like to know if this function:
arch/loongarch/mm/init.c::copy_user_highpage()
is currently in use or is it a dead code?If this code is not in use, can this be removed instead? However, if it is in use, can you comment why
kmap_atomic()was preferred overkmap()function call?
I think this function will be used for the 32bit kernel, and we will add loongarch32 support in the near future.
But on the other hand, you can replace kmap_atomic() with kmap_local_page(), there is no special reason to use kmap_atomic().
Huacai
Quoted 8 lines
[0] https://lore.kernel.org/all/[email protected]/
Thank you,
Deepak.
Quoted 1 line · Huacai Chen
Hi, Deepak,
Hello Huacai,
Quoted 11 lines · Deepak R Varma
Quoted 9 lines
Hello,
I am attempting to work on replacing the kmap[_atomic]() calls bykmap_local_page()function call. A detail on this change can be found here [0].I would like to know if this function:
arch/loongarch/mm/init.c::copy_user_highpage()
is currently in use or is it a dead code?
Quoted 5 lines
Quoted 3 lines
If this code is not in use, can this be removed instead? However, if it is in use, can you comment why
kmap_atomic()was preferred overkmap()function call?I think this function will be used for the 32bit kernel, and we will add loongarch32 support in the near future.
Okay. Sounds good.
Quoted 3 lines
But on the other hand, you can replace
kmap_atomic()withkmap_local_page(), there is no special reason to usekmap_atomic().
Looks like you sent in a patch. Thank you. I was working on trying to cross compile my patch for the arch. I still would like to attempt that. Will request your help if I get stuck.
regards,
deepak.
Quoted 11 lines
Huacai
Quoted 8 lines
[0] https://lore.kernel.org/all/[email protected]/
Thank you,
Deepak.