drivers/block/zram/zram_drv.c: convert to using memset_l
Subsystems (2)
PATCH 58/126 drivers/block/zram/zram_drv.c: convert to using memset_l
From: Matthew Wilcox <[email protected]>
Subject: drivers/block/zram/zram_drv.c: convert to using memset_l
zram was the motivation for creating memset_l(). Minchan Kim sees a 7% performance improvement on x86 with 100MB of non-zero deduplicatable data:
perf stat -r 10 dd if=/dev/zram0 of=/dev/null
vanilla: 0.232050465 seconds time elapsed ( +- 0.51% )memset_l: 0.217219387 seconds time elapsed ( +- 0.07% )
Signed-off-by Matthew Wilcox <[email protected]>
Tested-by Minchan Kim <[email protected]>
Cc Sergey Senozhatsky <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc "James E.J. Bottomley" <[email protected]>
Cc "Martin K. Petersen" <[email protected]>
Cc David Miller <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Ivan Kokshaysky <[email protected]>
Cc Matt Turner <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Ralf Baechle <[email protected]>
Cc Richard Henderson <[email protected]>
Cc Russell King <[email protected]>
Cc Sam Ravnborg <[email protected]>
Cc Thomas Gleixner <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
drivers/block/zram/zram_drv.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-)
drivers/block/zram/zram_drv.c renamed from drivers/block/zram/zram_drv.c~zram-convert-to-using-memset_l +1 -4
@@ -175,20 +175,11 @@ static inline void update_used_max(struc }while (old_max != cur_max); } -static inline void zram_fill_page (char *ptr,unsigned long len, +static inline void zram_fill_page (void *ptr,unsigned long len,unsigned long value) { -int i; -unsigned long *page = (unsigned long *)ptr; -WARN_ON_ONCE (!IS_ALIGNED (len,sizeof (unsigned long )));