From: "H. Nikolaus Schaller" <hns@goldelico.com>
To: "Zhou Yanjie" <zhouyu@wanyeetech.com>,
"Jiaxun Yang" <jiaxun.yang@flygoat.com>,
"Feiyang Chen" <chenfeiyang@loongson.cn>,
"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
陈飞扬 <chris.chenfeiyang@gmail.com>
Cc: Paul Cercueil <paul@crapouillou.net>,
Thomas Gleixner <tglx@linutronix.de>,
peterz@infradead.org, luto@kernel.org,
Arnd Bergmann <arnd@arndb.de>,
linux-mips <linux-mips@vger.kernel.org>,
linux-arch@vger.kernel.org, Huacai Chen <chenhuacai@kernel.org>,
Yanteng Si <siyanteng@loongson.cn>
Subject: Re: [PATCH 1/2] mips: convert syscall to generic entry
Date: Mon, 13 Sep 2021 07:16:32 +0200 [thread overview]
Message-ID: <B2163252-3423-413C-8C35-B6E52C73E598@goldelico.com> (raw)
In-Reply-To: <7e2c0db1-bf5a-8f16-bc43-81830a30045e@wanyeetech.com>
Hi,
> Am 09.09.2021 um 14:45 schrieb Zhou Yanjie <zhouyu@wanyeetech.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?
Have not observed a negative effect on jz4730. Same for jz4780.
But I have not done performance tests.
BR,
Nikolaus
next prev parent reply other threads:[~2021-09-13 5:16 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
2021-09-13 2:51 ` Zhou Yanjie
2021-09-13 3:06 ` Zhou Yanjie
2021-09-13 5:16 ` H. Nikolaus Schaller [this message]
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=B2163252-3423-413C-8C35-B6E52C73E598@goldelico.com \
--to=hns@goldelico.com \
--cc=arnd@arndb.de \
--cc=chenfeiyang@loongson.cn \
--cc=chenhuacai@kernel.org \
--cc=chris.chenfeiyang@gmail.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 \
--cc=zhouyu@wanyeetech.com \
/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).