lkml.org 
[lkml]   [2023]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] riscv: optimize ELF relocation function in riscv
On Mon, Jul 03, 2023 at 12:35:15PM +0200, Andrew Jones wrote:
> On Mon, Jul 03, 2023 at 11:32:12AM +0800, Amma Lee wrote:
> > The patch can optimize the running times of insmod command by modify ELF
> > relocation function.
> > In the 5.10 and latest kernel, when install the riscv ELF drivers 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 architecture handle R_RISCV_HI20 and R_RISCV_LO20
> > type items relocation function in the arch\riscv\kernel\module.c and
> > find that there are two-loops in the function. If we modify the begin
> > number in the second for-loops iteration, we could save significant time
> > for installation. We install the same 3+MB driver could just need 2s.
> >
> > Signed-off-by: Amma Lee <lixiaoyun@binary-semi.com>
> > ---
> > arch/riscv/kernel/module.c | 67 +++++++++++++++++++++++++++++++++++++++++++---
> > 1 file changed, 64 insertions(+), 3 deletions(-)
> >
>
> I guess this is a v3 of [1]? But there's no change log here to know
> what's different.
>
> [1] 1683881513-18730-1-git-send-email-lixiaoyun@binary-semi.com

It's also still got the checkpatch issues (and possibly others) that
were pointed out previously.

Cheers,
Conor.

Also, when applying the patch:
warning: arch/riscv/kernel/module.c has type 100644, expected 100755
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-07-03 12:49    [W:1.089 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site