From: afzal mohammed <afzal.mohd.ma@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Russell King - ARM Linux admin <linux@armlinux.org.uk>,
Linus Walleij <linus.walleij@linaro.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Linux-MM <linux-mm@kvack.org>,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
Nicolas Pitre <nico@fluxnic.net>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Matthew Wilcox <willy@infradead.org>,
Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: [RFC 1/3] lib: copy_{from,to}_user using gup & kmap_atomic()
Date: Sun, 14 Jun 2020 18:51:43 +0530 [thread overview]
Message-ID: <20200614132143.GA599@afzalpc> (raw)
In-Reply-To: <CAK8P3a2g6a=V4BmPAOM0vNYUfJqm_aZziQhCxfF8MT_fbHMMLg@mail.gmail.com>
Hi,
On Sat, Jun 13, 2020 at 10:45:33PM +0200, Arnd Bergmann wrote:
> 4% boot time increase sounds like a lot, especially if that is only for
> copy_from_user/copy_to_user. In the end it really depends on how well
> get_user()/put_user() and small copies can be optimized in the end.
i mentioned the worst case(happened only once), normally it was in
the range 2-3%
> From the numbers you
> measured, it seems the beaglebone currently needs an extra ~6µs or
> 3µs per copy_to/from_user() call with your patch, depending on what
> your benchmark was (MB/s for just reading or writing vs MB/s for
> copying from one file to another through a user space buffer).
It is MB/s for copying one file to another via user space buffer, i.e.
the value coreutils 'dd' shows w/ status=progress (here it was busybox
'dd', so instead it was enabling a compile time option)
> but if you want to test what the overhead is, you could try changing
> /dev/zero (or a different chardev like it) to use a series of
> put_user(0, u32uptr++) in place of whatever it has, and then replace the
> 'str' instruction with dummy writes to ttbr0 using the value it already
> has, like:
>
> mcr p15, 0, %0, c2, c0, 0 /* set_ttbr0() */
> isb /* prevent speculative access to kernel table */
> str %1, [%2],0 /* write 32 bit to user space */
> mcr p15, 0, %0, c2, c0, 0 /* set_ttbr0() */
> isb /* prevent speculative access to user table */
> It would be interesting to compare it to the overhead of a
> get_user_page_fast() based implementation.
i have to relocate & be on quarantine couple of weeks, so i will
temporarily stop here, otherwise might end up in roadside.
Reading feedbacks from everyone, some of it i could grasp only bits &
pieces, familiarizing more w/ mm & vfs would help me add value better
to the goal/discussion. Linus Walleij, if you wish to explore things,
feel free, right now don't know how my connectivity would be for next
3 weeks.
Regards
afzal
next prev parent reply other threads:[~2020-06-14 13:21 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-12 10:17 [RFC 0/3] ARM: copy_{from,to}_user() for vmsplit 4g/4g afzal mohammed
2020-06-12 10:17 ` [RFC 1/3] lib: copy_{from,to}_user using gup & kmap_atomic() afzal mohammed
2020-06-12 12:02 ` Arnd Bergmann
2020-06-12 13:55 ` afzal mohammed
2020-06-12 20:07 ` Arnd Bergmann
2020-06-13 12:04 ` afzal mohammed
2020-06-13 12:51 ` Al Viro
2020-06-13 12:56 ` Al Viro
2020-06-13 13:42 ` afzal mohammed
2020-06-13 15:31 ` Al Viro
2020-06-13 15:41 ` Al Viro
2020-06-13 16:00 ` Al Viro
2020-06-13 18:55 ` Arnd Bergmann
2020-06-13 13:15 ` Russell King - ARM Linux admin
2020-06-14 13:06 ` afzal mohammed
2020-06-13 20:45 ` Arnd Bergmann
2020-06-13 22:16 ` Matthew Wilcox
2020-06-14 13:21 ` afzal mohammed [this message]
2020-06-14 14:55 ` afzal mohammed
2020-06-13 11:08 ` Andy Shevchenko
2020-06-13 13:29 ` afzal mohammed
2020-06-12 10:18 ` [RFC 2/3] ARM: uaccess: let UACCESS_GUP_KMAP_MEMCPY enabling afzal mohammed
2020-06-12 10:18 ` [RFC 3/3] ARM: provide CONFIG_VMSPLIT_4G_DEV for development afzal mohammed
2020-06-12 15:19 ` [RFC 0/3] ARM: copy_{from,to}_user() for vmsplit 4g/4g Nicolas Pitre
2020-06-12 16:01 ` afzal mohammed
2020-06-12 16:03 ` afzal mohammed
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=20200614132143.GA599@afzalpc \
--to=afzal.mohd.ma@gmail.com \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux@armlinux.org.uk \
--cc=nico@fluxnic.net \
--cc=viro@zeniv.linux.org.uk \
--cc=will@kernel.org \
--cc=willy@infradead.org \
/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