From: Anton Ivanov <anton.ivanov@cambridgegreys.com>
To: Richard Weinberger <richard@nod.at>
Cc: linux-um <linux-um@lists.infradead.org>
Subject: Re: [PATCH] um: allow using glibc string functions instead of generics
Date: Tue, 10 Nov 2020 20:56:24 +0000 [thread overview]
Message-ID: <ee2da9e0-2858-ef9c-b8b9-bdf569ec9bb4@cambridgegreys.com> (raw)
In-Reply-To: <1098264641.290574.1605039225057.JavaMail.zimbra@nod.at>
On 10/11/2020 20:13, Richard Weinberger wrote:
> ----- Ursprüngliche Mail -----
>> Von: "anton ivanov" <anton.ivanov@cambridgegreys.com>
>> An: "linux-um" <linux-um@lists.infradead.org>
>> CC: "richard" <richard@nod.at>, "anton ivanov" <anton.ivanov@cambridgegreys.com>
>> Gesendet: Dienstag, 10. November 2020 17:30:34
>> Betreff: [PATCH] um: allow using glibc string functions instead of generics
>
>> From: Anton Ivanov <anton.ivanov@cambridgegreys.com>
>>
>> UML kernel runs as a normal userspace process and can use the
>> optimized glibc strings functions like strcpy, memcpy, etc.
>>
>> The support is optional and is turned on/of using a config
>> option.
>>
>> Using glibc functions results in a slightly smaller executable
>> when linked dynamically as well as anything between 1% and 5%
>> performance improvements.
>
> On what workload did you see such a huge performance improvement?
File IO ~ 1% or thereabouts, iperf - 2-4%.
> The in-kernel variants of memcpy and such are already well optimized.
UML has no string.h in asm which means it falls back to
asm-generic/string.h which in turn pulls in the ones from lib/string.c
These are not optimized.
Example - memcpy:
void *memcpy(void *dest, const void *src, size_t count)
{
char *tmp = dest;
const char *s = src;
while (count--)
*tmp++ = *s++;
return dest;
}
> So I'm a little surprised.
I am actually surprised the gain is so low. I was expecting up to 15%.
>
> Thanks,
> //richard
>
--
Anton R. Ivanov
Cambridgegreys Limited. Registered in England. Company Number 10273661
https://www.cambridgegreys.com/
_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um
next prev parent reply other threads:[~2020-11-10 20:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-10 16:30 [PATCH] um: allow using glibc string functions instead of generics anton.ivanov
2020-11-10 16:40 ` Johannes Berg
2020-11-10 16:54 ` Anton Ivanov
2020-11-10 20:13 ` Richard Weinberger
2020-11-10 20:56 ` Anton Ivanov [this message]
2020-11-10 21:29 ` Richard Weinberger
2020-11-10 21:33 ` Anton Ivanov
2020-11-10 21:39 ` Richard Weinberger
2020-11-11 7:13 ` Anton Ivanov
2020-11-11 8:26 ` Anton Ivanov
2020-11-11 15:14 ` Anton Ivanov
2020-11-11 15:59 ` Anton Ivanov
2020-11-11 18:09 ` Anton Ivanov
2020-11-11 9:49 ` Anton Ivanov
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=ee2da9e0-2858-ef9c-b8b9-bdf569ec9bb4@cambridgegreys.com \
--to=anton.ivanov@cambridgegreys.com \
--cc=linux-um@lists.infradead.org \
--cc=richard@nod.at \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.