linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhou Yanjie <zhouyu@wanyeetech.com>
To: "Jiaxun Yang" <jiaxun.yang@flygoat.com>,
	"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
	陈飞扬 <chris.chenfeiyang@gmail.com>,
	"Paul Cercueil" <paul@crapouillou.net>,
	"H. Nikolaus Schaller" <hns@goldelico.com>
Cc: tglx@linutronix.de, peterz@infradead.org, luto@kernel.org,
	arnd@arndb.de, Feiyang Chen <chenfeiyang@loongson.cn>,
	linux-mips@vger.kernel.org, linux-arch@vger.kernel.org,
	chenhuacai@kernel.org, Yanteng Si <siyanteng@loongson.cn>
Subject: Re: [PATCH 1/2] mips: convert syscall to generic entry
Date: Thu, 9 Sep 2021 20:45:25 +0800	[thread overview]
Message-ID: <7e2c0db1-bf5a-8f16-bc43-81830a30045e@wanyeetech.com> (raw)
In-Reply-To: <13d237ab-0ef3-772d-6f21-ff023781efcf@flygoat.com>

Hi,

On 2021/9/8 下午8:41, Jiaxun Yang wrote:
>
> 在 2021/9/8 16:51, Thomas Bogendoerfer 写道:
>> On Wed, Sep 08, 2021 at 10:08:47AM +0800, 陈飞扬 wrote:
>>> On Tue, 7 Sept 2021 at 21:49, Jiaxun Yang <jiaxun.yang@flygoat.com> 
>>> wrote:
>>>>
>>>> 在 2021/9/7 14:16, FreeFlyingSheep 写道:
>>>>> From: Feiyang Chen <chenfeiyang@loongson.cn>
>>>>>
>>>>> Convert mips syscall to use the generic entry infrastructure from
>>>>> kernel/entry/*.
>>>>>
>>>>> There are a few special things on mips:
>>>>>
>>>>> - There is one type of syscall on mips32 (scall32-o32) and three 
>>>>> types
>>>>> of syscalls on mips64 (scall64-o32, scall64-n32 and scall64-n64). Now
>>>>> convert to C code to handle different types of syscalls.
>>>>>
>>>>> - For some special syscalls (e.g. fork, clone, clone3 and sysmips),
>>>>> save_static_function() wrapper is used to save static registers. Now
>>>>> SAVE_STATIC is used in handle_sys before calling do_syscall(), so the
>>>>> save_static_function() wrapper can be removed.
>>>>>
>>>>> - For sigreturn/rt_sigreturn and sysmips, inline assembly is used to
>>>>> jump to syscall_exit directly for skipping setting the error flag and
>>>>> restoring all registers. Now use regs->regs[27] to mark whether to
>>>>> handle the error flag and always restore all registers in handle_sys,
>>>>> so these functions can return normally as other architecture.
>>>> Hmm, that would give us overhead of register context on these 
>>>> syscalls.
>>>>
>>>> I guess it's worthy?
>>>>
>>> Hi, Jiaxun,
>>>
>>> Saving and restoring registers against different system calls can be
>>> difficult due to the use of generic entry.
>>> To avoid a lot of duplicate code, I think the overhead is worth it.
>> could you please provide numbers for that ? This code still runs
>> on low end MIPS CPUs for which overhead might mean a different
>> ballpark than some highend Loongson CPUs.
>
> It shows ~3% regression for UnixBench on MT7621A (1004Kec).
>
> + Yanjie could you help with a run on ingenic platform?


Sure, I can help with JZ4775, JZ4780, X1000, X1830, X2000 from Ingenic, 
and SF16A18, SF19A2890 from SiFlower.

+ Paul could you help with a run on JZ4760 and JZ4770?

+ Nikolaus could you help with a run on JZ4730?


Thanks and best regards!


>
> Thanks.
>
> - Jiaxun
>
>>
>> Thomas.
>>

  reply	other threads:[~2021-09-09 12:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-07  6:16 [PATCH 0/2] mips: convert to generic entry FreeFlyingSheep
2021-09-07  6:16 ` [PATCH 1/2] mips: convert syscall " FreeFlyingSheep
2021-09-07 13:48   ` Jiaxun Yang
2021-09-08  2:08     ` 陈飞扬
2021-09-08  7:15       ` Huacai Chen
2021-09-08  8:51       ` Thomas Bogendoerfer
2021-09-08 12:41         ` Jiaxun Yang
2021-09-09 12:45           ` Zhou Yanjie [this message]
2021-09-13  2:51             ` Zhou Yanjie
2021-09-13  3:06               ` Zhou Yanjie
2021-09-13  5:16             ` H. Nikolaus Schaller
2021-09-13  1:35         ` teng sterling
2021-09-14  1:30         ` Feiyang Chen
2021-09-07  6:16 ` [PATCH 2/2] mips: convert irq " FreeFlyingSheep
2021-09-08  7:17   ` Huacai Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7e2c0db1-bf5a-8f16-bc43-81830a30045e@wanyeetech.com \
    --to=zhouyu@wanyeetech.com \
    --cc=arnd@arndb.de \
    --cc=chenfeiyang@loongson.cn \
    --cc=chenhuacai@kernel.org \
    --cc=chris.chenfeiyang@gmail.com \
    --cc=hns@goldelico.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=paul@crapouillou.net \
    --cc=peterz@infradead.org \
    --cc=siyanteng@loongson.cn \
    --cc=tglx@linutronix.de \
    --cc=tsbogend@alpha.franken.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).