From: Matthew Wilcox <willy@infradead.org>
To: linux-kernel@vger.kernel.org
Cc: minchan@kernel.org, Matthew Wilcox <mawilcox@microsoft.com>,
akpm@linuxfoundation.org, mpe@ellerman.id.au
Subject: [PATCH v4 0/8] Multibyte memset variations
Date: Thu, 20 Jul 2017 11:45:31 -0700 [thread overview]
Message-ID: <20170720184539.31609-1-willy@infradead.org> (raw)
From: Matthew Wilcox <mawilcox@microsoft.com>
A relatively common idiom we're missing is a function to fill an area
of memory with a pattern which is larger than a single byte. I first
noticed this with a zram patch which wanted to fill a page with an
'unsigned long' value. There turn out to be quite a few places in
the kernel which can benefit from using an optimised function rather
than a loop; sometimes text size, sometimes speed, and sometimes both.
The optimised PowerPC version (not included here) improves performance
by about 30% on POWER8 on just the raw memset_l().
Most of the extra lines of code come from the three testcases I added.
Matthew Wilcox (8):
Add multibyte memset functions
Add testcases for memset16/32/64
x86: Implement memset16, memset32 & memset64
ARM: Implement memset32 & memset64
alpha: Add support for memset16
zram: Convert to using memset_l
sym53c8xx_2: Convert to use memset32
vga: Optimise console scrolling
arch/alpha/include/asm/string.h | 15 +--
arch/alpha/include/asm/vga.h | 2 +-
arch/alpha/lib/memset.S | 10 +-
arch/arm/include/asm/string.h | 14 +++
arch/arm/kernel/armksyms.c | 2 +
arch/arm/lib/memset.S | 24 +++--
arch/mips/include/asm/vga.h | 7 ++
arch/powerpc/include/asm/vga.h | 8 ++
arch/sparc/include/asm/vga.h | 25 +++++
arch/x86/include/asm/string_32.h | 24 +++++
arch/x86/include/asm/string_64.h | 36 +++++++
drivers/block/zram/zram_drv.c | 13 +--
drivers/scsi/sym53c8xx_2/sym_hipd.c | 11 +-
include/linux/string.h | 30 ++++++
include/linux/vt_buffer.h | 12 +++
lib/Kconfig | 3 +
lib/string.c | 196 ++++++++++++++++++++++++++++++++++++
17 files changed, 394 insertions(+), 38 deletions(-)
--
2.13.2
next reply other threads:[~2017-07-20 18:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-20 18:45 Matthew Wilcox [this message]
2017-07-20 18:45 ` [PATCH v4 1/8] Add multibyte memset functions Matthew Wilcox
2017-07-20 18:45 ` [PATCH v4 2/8] Add testcases for memset16/32/64 Matthew Wilcox
2017-07-20 18:45 ` [PATCH v4 3/8] x86: Implement memset16, memset32 & memset64 Matthew Wilcox
2017-07-20 18:45 ` [PATCH v4 4/8] ARM: Implement " Matthew Wilcox
2017-07-20 18:45 ` [PATCH v4 5/8] alpha: Add support for memset16 Matthew Wilcox
2017-07-20 18:45 ` [PATCH v4 6/8] zram: Convert to using memset_l Matthew Wilcox
2017-07-20 18:45 ` [PATCH v4 7/8] sym53c8xx_2: Convert to use memset32 Matthew Wilcox
2017-07-20 18:45 ` [PATCH v4 8/8] vga: Optimise console scrolling Matthew Wilcox
2017-07-25 5:27 ` [PATCH v4 0/8] Multibyte memset variations Michael Ellerman
2017-07-25 13:08 ` Matthew Wilcox
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=20170720184539.31609-1-willy@infradead.org \
--to=willy@infradead.org \
--cc=akpm@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mawilcox@microsoft.com \
--cc=minchan@kernel.org \
--cc=mpe@ellerman.id.au \
/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
all inboxes | Powered by JetHome®