From: Dave Hansen <dave@sr71.net>
To: Pradeep Sawlani <pradeep.sawlani@gmail.com>,
Hugh Dickins <hughd@google.com>,
Izik Eidus <izik.eidus@ravellosystems.com>,
Andrea Arcangeli <aarcange@redhat.com>,
Chris Wright <chrisw@sous-sol.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
MEMORY MANAGEMENT <linux-mm@kvack.org>,
Arjan van de Ven <arjan@linux.intel.com>,
Suri Maddhula <surim@amazon.com>, Matt Wilson <msw@amazon.com>,
Anthony Liguori <aliguori@amazon.com>,
Pradeep Sawlani <sawlani@amazon.com>
Subject: Re: [PATCH RFC 0/1] ksm: check and skip page, if it is already scanned
Date: Tue, 04 Mar 2014 09:11:14 -0800 [thread overview]
Message-ID: <53160932.6060200@sr71.net> (raw)
In-Reply-To: <1393901333-5569-1-git-send-email-pradeep.sawlani@gmail.com>
On 03/03/2014 06:48 PM, Pradeep Sawlani wrote:
> Patch uses two bits to detect if page is scanned, one bit for odd cycle
> and other for even cycle. This adds one more bit in page flags and
> overloads existing bit (PG_owner_priv_1).
> Changes are based of 3.4.79 kernel, since I have used that for verification.
> Detail discussion can be found at https://lkml.org/lkml/2014/2/13/624
> Suggestion(s) are welcome for alternative solution in order to avoid one more
> bit in page flags.
Allocate a big bitmap (depends on how many pages you are scanning).
Hash the page's pfn and index in to the bitmap. If the bit is set,
don't scan the page. If not set, then set it. Vary the hash for each
scanning pass to reduce the same collision happening repeatedly. Clear
the bitmap before each scan.
You'll get plenty of collisions, especially for a small table, but who
cares?
The other option is to bloat anon_vma instead, and only do one scan for
each anon_vma that shares the same root. That's a bit more invasive though.
--
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>
next prev parent reply other threads:[~2014-03-04 17:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-04 2:48 Pradeep Sawlani
2014-03-04 2:48 ` [PATCH RFC 1/1] " Pradeep Sawlani
2014-03-04 17:11 ` Dave Hansen [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-03-04 2:48 [PATCH RFC 0/1] " Pradeep Sawlani
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=53160932.6060200@sr71.net \
--to=dave@sr71.net \
--cc=aarcange@redhat.com \
--cc=aliguori@amazon.com \
--cc=arjan@linux.intel.com \
--cc=chrisw@sous-sol.org \
--cc=hughd@google.com \
--cc=izik.eidus@ravellosystems.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=msw@amazon.com \
--cc=pradeep.sawlani@gmail.com \
--cc=sawlani@amazon.com \
--cc=surim@amazon.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