[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220320140157.GB26349@1wt.eu>
Date: Sun, 20 Mar 2022 15:01:57 +0100
From: Willy Tarreau <w@....eu>
To: David Laight <David.Laight@...LAB.COM>
Cc: "'Ammar Faizi'" <ammarfaizi2@...weeb.org>,
"Paul E. McKenney" <paulmck@...nel.org>,
Alviro Iskandar Setiawan <alviro.iskandar@...weeb.org>,
Nugraha <richiisei@...il.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
GNU/Weeb Mailing List <gwml@...r.gnuweeb.org>,
"x86@...nel.org" <x86@...nel.org>,
"llvm@...ts.linux.dev" <llvm@...ts.linux.dev>
Subject: Re: [RFC PATCH v1 3/6] tools/nolibc: i386: Implement syscall with 6
arguments
Hi David,
On Sun, Mar 20, 2022 at 01:10:33PM +0000, David Laight wrote:
> And using xchg is slow - it is always locked.
Note that we don't really care here, as it remains minimal compared to
an mmap() call.
> One possibility might be to do:
> push arg6
> push %ebp
> mov %ebp, 4(%sp)
> int 0x80
> pop %ebp
> add %esp,4
>
> Although I'm not sure you really want to allocate 4k pages
> for every malloc() call.
Well, it depends. I would argue that we don't even need malloc() but
on the other hand this is essentially used to write small regtests so
we don't really care about the waste here if someone really needs it.
I'd rather get Ammar's motivations for malloc() in the first place.
Willy
Powered by blists - more mailing lists