Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1598850
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Minchan Kim <minchan@kernel.org> |
| Newsgroups | linux.kernel |
| Subject | Re: memfill v2 now with ARM and x86 implementations |
| Date | Mon, 13 Mar 2017 06:20:02 +0100 |
| Message-ID | <tkqyK-3Xf-7@gated-at.bofh.it> (permalink) |
| References | <t7wLE-AL-9@gated-at.bofh.it> <tjQEW-4bK-13@gated-at.bofh.it> |
| X-Original-To | Matthew Wilcox <willy@infradead.org> |
| X-Original-Senderip | 156.147.1.127 |
| X-Original-Mailfrom | minchan@kernel.org |
| X-Original-Senderip | 165.244.249.25 |
| X-Original-Mailfrom | minchan@kernel.org |
| X-Original-Senderip | 10.177.223.161 |
| X-Original-Mailfrom | minchan@kernel.org |
| MIME-Version | 1.0 |
| User-Agent | Mutt/1.5.24 (2015-08-30) |
| X-Mimetrack | Itemize by SMTP Server on LGEKRMHUB04/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2017/03/13 14:17:50, Serialize by Router on LGEKRMHUB04/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2017/03/13 14:17:50, Serialize complete at 2017/03/13 14:17:50 |
| Content-Type | text/plain; charset="us-ascii" |
| Content-Disposition | inline |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 49 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Andrew Morton <akpm@linux-foundation.org>, <linux-kernel@vger.kernel.org>, <sergey.senozhatsky@gmail.com>, <iamjoonsoo.kim@lge.com>, <ngupta@vflare.org>, <zhouxianrong@huawei.com>, <zhouxiyu@huawei.com>, <weidu.du@huawei.com>, <zhangshiming5@huawei.com>, <Mi.Sophia.Wang@huawei.com>, <won.ho.park@huawei.com> |
| X-Original-Date | Mon, 13 Mar 2017 14:17:50 +0900 |
| X-Original-Message-ID | <20170313051750.GA18927@bbox> |
| X-Original-References | <1486307804-27903-1-git-send-email-minchan@kernel.org> <20170311145640.GB1860@bombadil.infradead.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1598850 |
Show key headers only | View raw
Hi Matthew,
On Sat, Mar 11, 2017 at 06:56:40AM -0800, Matthew Wilcox wrote:
> 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 value)
> > +{
> > + int i;
> > + unsigned long *page = (unsigned long *)ptr;
> > +
> > + WARN_ON_ONCE(!IS_ALIGNED(len, sizeof(unsigned long)));
> > +
> > + if (likely(value == 0)) {
> > + memset(ptr, 0, len);
> > + } else {
> > + 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 for the patch.
>
> Can you do some performance testing and see if it makes a difference?
I tested that zram is *full* with non-zero 100M dedupable data(i.e.,
it's a ideal case) on x86. With this, I see 7% enhancement.
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% )
I doubt it makes such benefit in read workload which a small percent
non-zero dedup data(e.g., under 3%) but it makes code simple/perform
win.
Thanks.
>
> At this point, I'd probably ask for the first 5 patches in that git
> branch to be included, and leave out memfill and the shoddy testsuite.
>
> I haven't actually tested either asm implementation ... only the
> C fallback.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
memfill v2 now with ARM and x86 implementations Matthew Wilcox <willy@infradead.org> - 2017-03-11 16:00 +0100 Re: memfill v2 now with ARM and x86 implementations Minchan Kim <minchan@kernel.org> - 2017-03-13 06:20 +0100
csiph-web