Re: 回复:[PATCH] riscv: optimize ELF relocation function in riscv

Conor.Dooley at microchip.com Conor.Dooley at microchip.com
Tue Jul 25 02:32:17 PDT 2023


On 25/07/2023 10:18, 李筱云(李筱云) wrote:
> Hi Conor,
>>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 at 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 at binary-semi.com
>  >
>  >It's also still got the checkpatch issues (and possibly others) that
>>were pointed out previously.
> 
> I'm sorry for the duplicate emails. Because we released this patch many times, the first
> patch was based on 5.10. Later we verified this issue on kernel 6.4, then we released a new
> patch based on the 6.4 kernel. Since we never got any reply, we don't know how to proceed
> with this patch.
> 
> BR,
> Amma
> 
>     ------------------------------------------------------------------
>     发件人:Conor Dooley <conor.dooley at microchip.com>
>     发送时间:2023年7月3日(星期一) 18:48
>     收件人:Andrew Jones <ajones at ventanamicro.com>
>     抄 送:李筱云(李筱云) <lixiaoyun at binary-semi.com>; paul.walmsley <paul.walmsley at sifive.com>; palmer <palmer at dabbelt.com>; aou <aou at eecs.berkeley.edu>; 谢振新(谢振新) <xiezx at binary-semi.com>; linux-riscv <linux-riscv at lists.infradead.org>; linux-kernel <linux-kernel at vger.kernel.org>
>     主 题:Re: [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 at 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 at 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
> 
> 

Firstly, please no html mails. The mailing list will reject them :/

There was no changelog to indicate what is different from the prior
submissions, nor were the issues pointed out by checkpatch resolved.

It's considered impolite to post another version of a patch, without
addressing comments that were pointed out on the previous submission.
Please fix up the things pointed out by checkpatch (and please run it
with the --strict argument) and resubmit a v4, that contains a changelog
under the --- line, explaining what is different between this patch &
v4.

Thanks,
Conor.


More information about the linux-riscv mailing list