linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrea Arcangeli <aarcange@redhat.com>
To: sioh Lee <solee@os.korea.ac.kr>
Cc: akpm@linux-foundation.org, mingo@kernel.org,
	zhongjiang@huawei.com, minchan@kernel.org,
	arvind.yadav.cs@gmail.com, imbrenda@linux.vnet.ibm.com,
	kirill.shutemov@linux.intel.com, linux-mm@kvack.org
Subject: Re: [PATCH] mm/ksm : Checksum calculation function change (jhash2 -> crc32)
Date: Thu, 3 Aug 2017 15:23:50 +0200	[thread overview]
Message-ID: <20170803132350.GI21775@redhat.com> (raw)
In-Reply-To: <bf406908-bf93-83dd-54e6-d2e3e5881db6@os.korea.ac.kr>

On Thu, Aug 03, 2017 at 02:26:27PM +0900, sioh Lee wrote:
> Thank you very much for reading and responding to my commit.
> I understand the problem with crc32 you describe.
> I will investigate a?? as the first step, I will try to compare the number of CoWs with jhash2 and crc32. And I will send you the experiment results.

Also the number of KSM merges and ideally in a non simple workload. If
the hash triggers false positives it's not just that there will be
more CoWs, but the unstable tree will get more unstable and its
ability to find equality will decrease. This is why I don't like to
weaken the hash with a crc and I'd rather prefer to keep a real hash
there (doesn't need to be a crypto one, but it'd be even better if it
was).

The hash isn't used to find equality, it's only used to find which
pages are updated frequently (and if an app overwrites the same value
over and over, not even a crypto hash would be capable to detect it).

There were attempts to replace the hashing with a dirty bit set in
hardware in the pagetable in fact, that would be the ideal way, but
it's quite more complicated that way.

Thanks,
Andrea

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2017-08-03 13:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-01 12:07 [PATCH] mm/ksm : Checksum calculation function change (jhash2 -> crc32) leesioh
2017-08-01 13:29 ` Claudio Imbrenda
2017-08-01 20:05 ` Andrea Arcangeli
2017-08-02 12:26   ` Claudio Imbrenda
2017-08-03  5:26   ` sioh Lee
2017-08-03 13:23     ` Andrea Arcangeli [this message]
2017-08-09 13:17       ` sioh Lee
2017-08-24 19:14         ` Andrea Arcangeli
2017-08-29  6:35           ` sioh Lee
2017-08-29 16:05             ` Andrea Arcangeli
  -- strict thread matches above, loose matches on Subject: below --
2017-10-11 15:49 Timofey Titovets

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=20170803132350.GI21775@redhat.com \
    --to=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=arvind.yadav.cs@gmail.com \
    --cc=imbrenda@linux.vnet.ibm.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=mingo@kernel.org \
    --cc=solee@os.korea.ac.kr \
    --cc=zhongjiang@huawei.com \
    /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).