linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Timofey Titovets <timofey.titovets@synesis.ru>
To: Pavel.Tatashin@microsoft.com
Cc: linux-mm@kvack.org, rppt@linux.vnet.ibm.com,
	Andrea Arcangeli <aarcange@redhat.com>,
	kvm@vger.kernel.org, Sioh Lee <solee@os.korea.ac.kr>
Subject: Re: [PATCH V7 0/2] KSM replace hash algo with xxhash
Date: Fri, 14 Sep 2018 00:34:02 +0300	[thread overview]
Message-ID: <CAGqmi77gN0f_3GP5A8zfnzaWj84ajkEmA8dXnpDHeOsj1tbaKQ@mail.gmail.com> (raw)
In-Reply-To: <93650ca3-dd72-ba84-49a3-7f383a0eb7e8@microsoft.com>

пт, 14 сент. 2018 г. в 0:26, Pasha Tatashin <Pavel.Tatashin@microsoft.com>:
>
>
>
> On 9/13/18 5:19 PM, Timofey Titovets wrote:
> > From: Timofey Titovets <nefelim4ag@gmail.com>
> >
> > Currently used jhash are slow enough and replace it allow as to make KSM
> > less cpu hungry.
> >
> > About speed (in kernel):
> >         ksm: crc32c   hash() 12081 MB/s
> >         ksm: xxh64    hash()  8770 MB/s
> >         ksm: xxh32    hash()  4529 MB/s
> >         ksm: jhash2   hash()  1569 MB/s
> >
> > By sioh Lee tests (copy from other mail):
> > Test platform: openstack cloud platform (NEWTON version)
> > Experiment node: openstack based cloud compute node (CPU: xeon E5-2620 v3, memory 64gb)
> > VM: (2 VCPU, RAM 4GB, DISK 20GB) * 4
> > Linux kernel: 4.14 (latest version)
> > KSM setup - sleep_millisecs: 200ms, pages_to_scan: 200
> >
> > Experiment process
> > Firstly, we turn off KSM and launch 4 VMs.
> > Then we turn on the KSM and measure the checksum computation time until full_scans become two.
> >
> > The experimental results (the experimental value is the average of the measured values)
> > crc32c_intel: 1084.10ns
> > crc32c (no hardware acceleration): 7012.51ns
> > xxhash32: 2227.75ns
> > xxhash64: 1413.16ns
> > jhash2: 5128.30ns
> >
> > In summary, the result shows that crc32c_intel has advantages over all
> > of the hash function used in the experiment. (decreased by 84.54% compared to crc32c,
> > 78.86% compared to jhash2, 51.33% xxhash32, 23.28% compared to xxhash64)
> > the results are similar to those of Timofey.
> >
> > But,
> > use only xxhash for now, because for using crc32c,
> > cryptoapi must be initialized first - that require some
> > tricky solution to work good in all situations.
> >
> > So:
> >   - Fisrt patch implement compile time pickup of fastest implementation of xxhash
> >     for target platform.
> >   - Second replace jhash2 with xxhash
> >
> > Thanks.
> >
> > CC: Andrea Arcangeli <aarcange@redhat.com>
> > CC: linux-mm@kvack.org
> > CC: kvm@vger.kernel.org
> > CC: leesioh <solee@os.korea.ac.kr>
> >
> > Timofey Titovets (2):
> >   xxHash: create arch dependent 32/64-bit xxhash()
> >   ksm: replace jhash2 with xxhash
> >
> >  include/linux/xxhash.h | 23 +++++++++++++
> >  mm/Kconfig             |  2 ++
> >  mm/ksm.c               | 93 +++++++++++++++++++++++++++++++++++++++++++++++---
> >  3 files changed, 114 insertions(+), 4 deletions(-)
>
> This is wrong stat. ksm.c should not have any new lines at all.

Sorry, just copy-paste error when i rework patchset.
Must be:
 include/linux/xxhash.h | 23 +++++++++++++++++++++++
 mm/Kconfig             |  1 +
 mm/ksm.c               |  4 ++--

And i leave some useless new lines in second patch, i can drop them
byself and resend if that needed.

Thanks.

      reply	other threads:[~2018-09-13 21:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-13 21:19 [PATCH V7 0/2] KSM replace hash algo with xxhash Timofey Titovets
2018-09-13 21:19 ` [PATCH V7 1/2] xxHash: create arch dependent 32/64-bit xxhash() Timofey Titovets
2018-09-13 21:24   ` Pasha Tatashin
2018-09-13 21:19 ` [PATCH V7 2/2] ksm: replace jhash2 with xxhash Timofey Titovets
2018-09-13 21:24   ` Pasha Tatashin
2018-09-13 21:26   ` Pasha Tatashin
2018-09-13 21:26 ` [PATCH V7 0/2] KSM replace hash algo " Pasha Tatashin
2018-09-13 21:34   ` Timofey Titovets [this message]

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=CAGqmi77gN0f_3GP5A8zfnzaWj84ajkEmA8dXnpDHeOsj1tbaKQ@mail.gmail.com \
    --to=timofey.titovets@synesis.ru \
    --cc=Pavel.Tatashin@microsoft.com \
    --cc=aarcange@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rppt@linux.vnet.ibm.com \
    --cc=solee@os.korea.ac.kr \
    /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;
as well as URLs for NNTP newsgroup(s).