[PATCH] riscv: optimize ELF relocation function in riscv
Conor Dooley
conor at kernel.org
Thu May 11 15:45:22 PDT 2023
Hey Amma,
The patchwork automation seems to have skipped this patch for some
reason, so here I am doing it manually instead!
On Wed, May 10, 2023 at 07:10:18PM +0800, Amma.Lee wrote:
> The patch can optimize the running times of "insmod" command by modify ELF
> relocation function.
> In the riscv kernel, when install the ELF driver which contains multiple
> symbol table items to be relocated, kernel takes a lot of time to
> execute the relocation. For example, we install a 3+MB driver need 180+s.
>
> We focus on the riscv kernel handle R_RISCV_HI20 and R_RISCV_LO12 type
> items relocation function and find that there are two for-loops in this
> function. If we modify the begin number in the second for-loops iteration,
> we could save significant time for installation. We install the 3+MB
> driver could just need 2s.
>
> Signed-off-by: Amma.Lee<lixiaoyun at binary-semi.com>
Firstly, please remove the . between your names, and add a space before
the <.
`git commit -s` will automagically add a SoB FYI.
When I applied this patch I got:
Applying: riscv: optimize ELF relocation function in riscv
warning: arch/riscv/kernel/module.c has type 100644, expected 100755
There are also quite a lot of checkpatch coding-style issues:
| 65: CHECK: Lines should not end with a '('
| 71: CHECK: Please don't use multiple blank lines
| 78: CHECK: Please don't use multiple blank lines
| 81: CHECK: Logical continuations should be on the previous line
| 82: CHECK: Logical continuations should be on the previous line
| 91: CHECK: Please don't use multiple blank lines
| 95: WARNING: Too many leading tabs - consider code refactoring
| 96: CHECK: Logical continuations should be on the previous line
| 97: CHECK: Lines should not end with a '('
| 101: CHECK: Blank lines aren't necessary before a close brace '}'
| 111: CHECK: Lines should not end with a '('
| 117: CHECK: Please don't use multiple blank lines
| total: 0 errors, 1 warnings, 11 checks, 93 lines checked
Hopefully you get some comments on the code itself, and when you resend,
the automation does actually pick it up.
Thanks,
Conor.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20230511/2b61df9e/attachment.sig>
More information about the linux-riscv
mailing list