for (i = 0; i < len / sizeof(*page); i++)
> > + page[i] = value;
> > + }
> > +}
>
> I've hacked up memset32/memset64 for both ARM and x86 here:
>
> http://git.infradead.org/users/willy/linux-dax.git/shortlog/refs/heads/memfill
Thanks fo
for (i = 0; i < len / sizeof(*page); i++)
> > + page[i] = value;
> > + }
> > +}
>
> I've hacked up memset32/memset64 for both ARM and x86 here:
>
> http://git.infradead.org/users/willy/linux-dax.git/shortlog/refs/heads/memfill
Thanks fo
d up memset32/memset64 for both ARM and x86 here:
http://git.infradead.org/users/willy/linux-dax.git/shortlog/refs/heads/memfill
Can you do some performance testing and see if it makes a difference?
At this point, I'd probably ask for the first 5 patches in that git
branch to be included, and leave
d up memset32/memset64 for both ARM and x86 here:
http://git.infradead.org/users/willy/linux-dax.git/shortlog/refs/heads/memfill
Can you do some performance testing and see if it makes a difference?
At this point, I'd probably ask for the first 5 patches in that git
branch to be included, and leave
har c;
+
+ memset_l(foo, (unsigned long)main, 21);
+
+ assert(foo[21] == 0);
+ assert(foo[20] == (unsigned long)main);
+
+ assert(foo[0] == (unsigned long)main);
+ memset_l(foo, 1, 0);
+ assert(foo[0] == (unsigned long)main);
+
+ memfill(foo, 10 * si
assert(foo[21] == 0);
+ assert(foo[20] == (unsigned long)main);
+
+ assert(foo[0] == (unsigned long)main);
+ memset_l(foo, 1, 0);
+ assert(foo[0] == (unsigned long)main);
+
+ memfill(foo, 10 * sizeof(long), , sizeof(s));
+ printf("%lx %lx\n",
From: Matthew Wilcox <mawil...@microsoft.com>
Similar to Lars Wirzenius' memfill(), this version has optimisations for
source sizes of 1, 2, 4 (and 8 on 64 bit architectures).
Signed-off-by: Matthew Wilcox <mawil...@microsoft.com>
---
include/linux/string.h | 3 +++
lib/string.c
From: Matthew Wilcox
Similar to Lars Wirzenius' memfill(), this version has optimisations for
source sizes of 1, 2, 4 (and 8 on 64 bit architectures).
Signed-off-by: Matthew Wilcox
---
include/linux/string.h | 3 +++
lib/string.c | 41 +
2
tterns larger than those contained in a
single byte.
The memfill() function exists as part of Lars Wirzenius' publib, but
it's not necessarily the most convenient interface to use. So I offer
four interfaces as part of this patchset -- memset_l (long), memset32
(32-bit), memset64 (64-bit) and m
contained in a
single byte.
The memfill() function exists as part of Lars Wirzenius' publib, but
it's not necessarily the most convenient interface to use. So I offer
four interfaces as part of this patchset -- memset_l (long), memset32
(32-bit), memset64 (64-bit) and memfill (arbitrary length).
We
On Tue, Feb 07, 2017 at 11:07:34AM -0800, James Bottomley wrote:
> > /**
> > * memfill - Fill a region of memory with the given value
> > * @s: Pointer to the start of the region.
> > * @v: The word to fill the region with.
> > * @n: The size of the region.
>
On Tue, Feb 07, 2017 at 11:07:34AM -0800, James Bottomley wrote:
> > /**
> > * memfill - Fill a region of memory with the given value
> > * @s: Pointer to the start of the region.
> > * @v: The word to fill the region with.
> > * @n: The size of the region.
>
On Wed, Feb 08, 2017 at 01:01:08PM -0800, James Bottomley wrote:
> Yes, that's about it. My only qualm looking at the proposal was if
> memfill is genuinely useful to something why would it only want to fill
> in units of sizeof(long). On the other hand, we've been operating for
On Wed, Feb 08, 2017 at 01:01:08PM -0800, James Bottomley wrote:
> Yes, that's about it. My only qualm looking at the proposal was if
> memfill is genuinely useful to something why would it only want to fill
> in units of sizeof(long). On the other hand, we've been operating for
On Wed, 2017-02-08 at 10:04 -0800, Matthew Wilcox wrote:
> On Tue, Feb 07, 2017 at 11:07:34AM -0800, James Bottomley wrote:
> > > /**
> > > * memfill - Fill a region of memory with the given value
> > > * @s: Pointer to the start of the region.
> >
On Wed, 2017-02-08 at 10:04 -0800, Matthew Wilcox wrote:
> On Tue, Feb 07, 2017 at 11:07:34AM -0800, James Bottomley wrote:
> > > /**
> > > * memfill - Fill a region of memory with the given value
> > > * @s: Pointer to the start of the region.
> >
On Mon, 2017-02-06 at 06:49 -0800, Matthew Wilcox wrote:
> [adding linux-arch to see if anyone there wants to do an optimised
> version of memfill for their CPU]
>
> On Mon, Feb 06, 2017 at 12:16:44AM +0900, Minchan Kim wrote:
> > +static inline void zram_fill_page(char *ptr,
On Mon, 2017-02-06 at 06:49 -0800, Matthew Wilcox wrote:
> [adding linux-arch to see if anyone there wants to do an optimised
> version of memfill for their CPU]
>
> On Mon, Feb 06, 2017 at 12:16:44AM +0900, Minchan Kim wrote:
> > +static inline void zram_fill_page(char *ptr,
On Tue, Feb 07, 2017 at 05:29:15PM +, David Howells wrote:
> Matthew Wilcox <wi...@infradead.org> wrote:
>
> > 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,
> >
On Tue, Feb 07, 2017 at 05:29:15PM +, David Howells wrote:
> Matthew Wilcox wrote:
>
> > 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 re
Matthew Wilcox <wi...@infradead.org> wrote:
> 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(ad
Matthew Wilcox wrote:
> 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 re
On Tue, Feb 07, 2017 at 09:40:04AM +, David Howells wrote:
> Matthew Wilcox <wi...@infradead.org> wrote:
>
> > [adding linux-arch to see if anyone there wants to do an optimised
> > version of memfill for their CPU]
>
> For mn10300, this is superfluous sin
On Tue, Feb 07, 2017 at 09:40:04AM +, David Howells wrote:
> Matthew Wilcox wrote:
>
> > [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() implementa
Matthew Wilcox <wi...@infradead.org> wrote:
> [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 ali
Matthew Wilcox wrote:
> [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 i
Hi Matthew,
On Mon, Feb 06, 2017 at 06:49:02AM -0800, Matthew Wilcox wrote:
>
> [adding linux-arch to see if anyone there wants to do an optimised
> version of memfill for their CPU]
>
> On Mon, Feb 06, 2017 at 12:16:44AM +0900, Minchan Kim wrote:
> > +static inline voi
Hi Matthew,
On Mon, Feb 06, 2017 at 06:49:02AM -0800, Matthew Wilcox wrote:
>
> [adding linux-arch to see if anyone there wants to do an optimised
> version of memfill for their CPU]
>
> On Mon, Feb 06, 2017 at 12:16:44AM +0900, Minchan Kim wrote:
> > +static inline voi
On 2017/2/6 22:49, Matthew Wilcox wrote:
[adding linux-arch to see if anyone there wants to do an optimised
version of memfill for their CPU]
On Mon, Feb 06, 2017 at 12:16:44AM +0900, Minchan Kim wrote:
+static inline void zram_fill_page(char *ptr, unsigned long len
On 2017/2/6 22:49, Matthew Wilcox wrote:
[adding linux-arch to see if anyone there wants to do an optimised
version of memfill for their CPU]
On Mon, Feb 06, 2017 at 12:16:44AM +0900, Minchan Kim wrote:
+static inline void zram_fill_page(char *ptr, unsigned long len
[adding linux-arch to see if anyone there wants to do an optimised
version of memfill for their CPU]
On Mon, Feb 06, 2017 at 12:16:44AM +0900, Minchan Kim wrote:
> +static inline void zram_fill_page(char *ptr, unsigned long len,
> + unsigned long
[adding linux-arch to see if anyone there wants to do an optimised
version of memfill for their CPU]
On Mon, Feb 06, 2017 at 12:16:44AM +0900, Minchan Kim wrote:
> +static inline void zram_fill_page(char *ptr, unsigned long len,
> + unsigned long
32 matches
Mail list logo