From: Florian Weimer <fw@deneb.enyo.de>
To: Xi Ruoyao <xry111@xry111.site>
Cc: Xi Ruoyao via Libc-alpha <libc-alpha@sourceware.org>,
caiyinyu <caiyinyu@loongson.cn>, Wang Xuerui <i@xen0n.name>,
Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>,
Andreas Schwab <schwab@suse.de>
Subject: Re: [PATCH] linux: Allow avoiding va_list for generic syscall and use it for LoongArch
Date: Fri, 24 Mar 2023 11:45:51 +0100 [thread overview]
Message-ID: <87mt422zs0.fsf@mid.deneb.enyo.de> (raw)
In-Reply-To: <30790befdca73a5224b5a9a4491821e33cccc771.camel@xry111.site> (Xi Ruoyao's message of "Fri, 24 Mar 2023 18:36:32 +0800")
* Xi Ruoyao:
> On Fri, 2023-03-24 at 10:47 +0100, Florian Weimer wrote:
>> * Xi Ruoyao via Libc-alpha:
>>
>> > Currently GCC generates highly sub-optimal code on architectures
>> > where
>> > the calling convention prefers registers for arugment passing. This
>> > is
>>
>> Typo: ar[gu]ment
>>
>> > LoongArch is benefited from this (saving about 430 CPU cycles per
>> > syscall, though I won't call it a significant improvement because
>> > syscall is "slow" in nature). And in the future we may switch more
>> > ports to use the generic syscall without a performance regression,
>> > reducing the number of target-specific syscall.{c,S} files we need
>> > to
>> > maintain.
>>
>> Does this impact the open* and fcntl* wrappers as well?
>
> Yes, on LoongArch all GARs are saved :(. I'll see if it's possible to
> avoid using va_list for them too.
If we had overread the argument list in open*, that certainly would
have avoided all the grief we had with O_TMPFILE (where the original
glibc implementation did not pass the mode argument to the kernel). I
think fcntl* already overreads the argument list, so it should be
safe.
prev parent reply other threads:[~2023-03-24 10:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-24 7:27 Xi Ruoyao
2023-03-24 9:47 ` Florian Weimer
2023-03-24 10:36 ` Xi Ruoyao
2023-03-24 10:45 ` Florian Weimer [this message]
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=87mt422zs0.fsf@mid.deneb.enyo.de \
--to=fw@deneb.enyo.de \
--cc=adhemerval.zanella@linaro.org \
--cc=caiyinyu@loongson.cn \
--cc=i@xen0n.name \
--cc=libc-alpha@sourceware.org \
--cc=schwab@suse.de \
--cc=xry111@xry111.site \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).