From: "Ryota OZAKI" <ozaki.ryota@gmail.com>
To: "Izik Eidus" <ieidus@redhat.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, kvm@vger.kernel.org, aarcange@redhat.com,
chrisw@redhat.com, avi@redhat.com, dlaor@redhat.com,
kamezawa.hiroyu@jp.fujitsu.com, cl@linux-foundation.org,
corbet@lwn.net
Subject: Re: [PATCH 0/4] ksm - dynamic page sharing driver for linux v2
Date: Thu, 20 Nov 2008 18:44:45 +0900 [thread overview]
Message-ID: <5e93dcec0811200144m1c6837bn28392e2d5f4277bd@mail.gmail.com> (raw)
In-Reply-To: <49252A54.6010602@redhat.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 2063 bytes --]
2008/11/20 Izik Eidus <ieidus@redhat.com>:> צ×××× Izik Eidus:>>>> צ×××× Ryota OZAKI:>>>>>> Hi Izik,>>>>>> I've tried your patch set, but ksm doesn't work in my machine.>>>>>> I compiled linux patched with the four patches and configured with KSM>>> and KVM enabled. After boot with the linux, I run two VMs running linux>>> using QEMU with a patch in your mail and started KSM scanner with your>>> script, then the host linux caused panic with the following oops.>>>>>>> Yes you are right, we are missing pte_unmap(pte); in get_pte()!>> that will effect just 32bits with highmem so this why you see it>> thanks for the reporting, i will fix it for v3>>>> below patch should fix it (i cant test it now, will test it for v3)>>>> can you report if it fix your problem? thanks>>> Thinking about what i just did, it is wrong,> this patch is the right one (still wasnt tested), but if you are going to> apply something then use this one.
Great! Applied the 2nd patch, ksm works with both HIGHMEM enabled and disabled.
Thanks for your quick response, ozaki-r
>> thanks>> diff --git a/mm/ksm.c b/mm/ksm.c> index 707be52..c842c29 100644> --- a/mm/ksm.c> +++ b/mm/ksm.c> @@ -569,14 +569,16 @@ out:> static int is_present_pte(struct mm_struct *mm, unsigned long addr)> {> pte_t *ptep;> + int r;>> ptep = get_pte(mm, addr);> if (!ptep)> return 0;>> - if (pte_present(*ptep))> - return 1;> - return 0;> + r = pte_present(*ptep);> + pte_unmap(ptep);> +> + return r;> }>> #define PAGEHASH_LEN 128> @@ -669,6 +671,7 @@ static int try_to_merge_one_page(struct mm_struct *mm,> if (!orig_ptep)> goto out_unlock;> orig_pte = *orig_ptep;> + pte_unmap(orig_ptep);> if (!pte_present(orig_pte))> goto out_unlock;> if (page_to_pfn(oldpage) != pte_pfn(orig_pte))>>ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
next prev parent reply other threads:[~2008-11-20 9:45 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-17 2:20 Izik Eidus
2008-11-17 2:20 ` [PATCH 1/4] Rmap: Add page_wrprotect() function Izik Eidus
2008-11-17 2:20 ` [PATCH 2/4] Add replace_page(): change the page pte is pointing to Izik Eidus
2008-11-17 2:20 ` [PATCH 3/4] add ksm kernel shared memory driver Izik Eidus
2008-11-17 2:20 ` [PATCH 4/4] MMU_NOTIFIRES: add set_pte_at_notify() Izik Eidus
2008-11-28 16:58 ` [PATCH 3/4] add ksm kernel shared memory driver Alan Cox
2008-12-02 18:07 ` Chris Wright
2008-12-02 18:13 ` Alan Cox
2008-12-02 21:24 ` Chris Wright
2008-12-02 21:37 ` Jonathan Corbet
2008-12-02 22:10 ` Alan Cox
2008-12-03 14:33 ` Pavel Machek
2008-12-04 9:48 ` Alan Cox
2008-11-20 7:44 ` [PATCH 0/4] ksm - dynamic page sharing driver for linux v2 Ryota OZAKI
2008-11-20 9:03 ` Izik Eidus
2008-11-20 9:13 ` Izik Eidus
2008-11-20 9:44 ` Ryota OZAKI [this message]
2008-11-28 12:57 ` Dmitri Monakhov
2008-11-28 13:51 ` Alan Cox
2009-04-04 14:35 Izik Eidus
2009-04-06 7:04 ` Nick Piggin
2009-04-06 7:33 ` Avi Kivity
2009-04-06 11:19 ` Izik Eidus
2009-04-06 13:42 ` Andrea Arcangeli
2009-04-06 11:15 ` Nikola Ciprich
2009-04-06 11:31 ` Izik Eidus
2009-04-07 13:57 ` Andrea Arcangeli
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=5e93dcec0811200144m1c6837bn28392e2d5f4277bd@mail.gmail.com \
--to=ozaki.ryota@gmail.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=avi@redhat.com \
--cc=chrisw@redhat.com \
--cc=cl@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=dlaor@redhat.com \
--cc=ieidus@redhat.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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
all inboxes | Powered by JetHome®