Thread (11 messages) 11 messages, 5 authors, 2017-02-08
  • (off-list ancestor, not in this archive)
  • memfill · Matthew Wilcox <willy@infradead.org> · 2017-02-06
  • Re: memfill · zhouxianrong <hidden> · 2017-02-07
  • Re: memfill · Minchan Kim <minchan@kernel.org> · 2017-02-07
  • Re: memfill · David Howells <dhowells@redhat.com> · 2017-02-07
  • Re: memfill · Matthew Wilcox <willy@infradead.org> · 2017-02-07
  • Re: memfill · David Howells <dhowells@redhat.com> · 2017-02-07
  • Re: memfill · Matthew Wilcox <willy@infradead.org> · 2017-02-07
  • Re: memfill · James Bottomley <James.Bottomley@HansenPartnership.com> · 2017-02-07
  • Re: memfill · Matthew Wilcox <willy@infradead.org> · 2017-02-08
  • Re: memfill · James Bottomley <James.Bottomley@HansenPartnership.com> · 2017-02-08
  • Re: memfill · Matthew Wilcox <willy@infradead.org> · 2017-02-08

Re: memfill

From: Matthew Wilcox <willy@infradead.org>
Date: 2017-02-07 17:23:05
Also in: lkml

On Tue, Feb 07, 2017 at 09:40:04AM +0000, David Howells wrote:
Matthew Wilcox [off-list ref] wrote:
quoted
[adding linux-arch to see if anyone there wants to do an optimised
version of memfill for their CPU]
For mn10300, this is superfluous since the memset() implementation will do
optimised filling of up to 8 x 4 bytes per loop if the alignments suit.

This is also superfluous for frv as that will do up to 8 x 8 bytes per loop.

So on both those arches, memfill() should probably just wrap memset().
You've misunderstood the purpose of memfill.  memfill allows the caller
to specify a pattern which is not a single byte in size, eg memfill(addr,
0x12345678, 64) would result in 0x12345678 being reproduced 16 times.
memset(addr, 0x12345678, 64) would result in 0x78 being reproduced
64 times.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help