From: Jin Dongming <jin.dongming@np.css.fujitsu.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>,
Andrea Arcangeli <aarcange@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
Huang Ying <ying.huang@intel.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/4] Check whether pages are poisoned before copying
Date: Fri, 18 Mar 2011 14:26:25 +0900 [thread overview]
Message-ID: <4D82ED01.304@np.css.fujitsu.com> (raw)
In-Reply-To: <20110317152150.GF11094@one.firstfloor.org>
Hi, Andi
(2011/03/18 0:21), Andi Kleen wrote:
>> At least copy to the last page of the huge page is performed after
>> all preceding copies are finished. So I'm not sure it is really
>> "a few" or not.
>> Still I think making the window smaller than now is worthwhile,
>> no matter it is change from 0.1% to 0.01%, or from 0.01% to 0.001%.
>
> Note that hwpoison will never reach 100% coverage. That's impossible.
> But to get nearer to 100% it's better to concentrate of the paths
> that affect long time windows and significant amounts of memory.
> What those are is often non-obvious and needs measurements.
>
>>
>> Or did you find the downside of the check here?
>
> The usual problem is how to test it. That tends to be harder
> than just writing the code. If it's not tested it's probably
> not worth having.
>
We did the test with our own test method. And the problem happened
as we expected really.
The method needs kernel part and user part. They are listed as following.
1. Kernel part
A. Debug interface
- check whether the THP aligned page belongs to THP.
- set the page position to be poisoned.
- set the flag whether 4K page or THP in khugepaged daemon will
be poisoned.
- split the requested THP to 4K pages.
B. A daemon poison_sched
Make poison_sched daemon call memory_failure().
C. Changes in khugepaged for debug.
- Check whether the requested page will be collapsed.
- Set poison information for poison_sched daemon
when the requested page will be collapsed.
- print the poison information to kernel log
when the page has been poisoned.
2. User part
A test APL
- Request memory which may be containing THP.
- Set test conditions with debug interface.
The steps for our own test are like following:
1. APL requests memory and check whether the THP aligned page is
THP with debug interface. If the THP aligned page is not THP,
APL will be restarted until THP is mapped.
2. APL set the page position being poisoned and the flag
whether 4K page or THP in khugepaged daemon is poisoned
with debug interface.
3. APL requests to split the requested THP with debug interface.
Here kernel must remember the split THP page address and pfn
for later page collapse.
(Waiting for page collapse ...)
4. When khugepaged daemon collapses the remembered split THP address
and pfn, khugepaged daemon will set poison information
for poison_sched daemon.
5. khugepaged daemon will do its work continually, and poison_sched
daemon will call memory_failure() deal with poisoned page
at the same time.
6. khugepaged daemon will print poison information to kernel log.
And whether the APL will be killed or not will be checked
by ourselves.
After we confirmed the above problem, the patch set is also implemented to
be tested. we confirmed the patch set could resolve the problem we got.
Thanks.
Best Regards,
Jin Dongming
> -Andi
next prev parent reply other threads:[~2011-03-18 5:26 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-17 2:30 [PATCH 0/4] THP: page collapsing vs. poisoning Hidetoshi Seto
2011-03-17 2:31 ` [PATCH 1/4] Lock the new THP when collapsing pages Hidetoshi Seto
2011-03-17 2:32 ` [PATCH 2/4] Free the collapsed pages after the new THP is mapped Hidetoshi Seto
2011-03-17 2:32 ` [PATCH 3/4] Check whether pages are poisoned before copying Hidetoshi Seto
2011-03-17 4:14 ` Andi Kleen
2011-03-17 5:20 ` Hidetoshi Seto
2011-03-17 6:26 ` Andi Kleen
2011-03-17 7:43 ` Hidetoshi Seto
2011-03-17 14:04 ` Andrea Arcangeli
2011-03-17 15:25 ` Andi Kleen
2011-03-17 16:12 ` Andrea Arcangeli
2011-03-17 16:27 ` Andi Kleen
2011-03-17 16:47 ` Andrea Arcangeli
2011-03-17 22:55 ` Andi Kleen
2011-03-23 17:26 ` K.Prasad
2011-03-23 17:32 ` Andi Kleen
2011-03-17 15:21 ` Andi Kleen
2011-03-18 5:26 ` Jin Dongming [this message]
2011-03-17 2:33 ` [PATCH 4/4] Check whether the new THP is poisoned before it is mapped to APL Hidetoshi Seto
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=4D82ED01.304@np.css.fujitsu.com \
--to=jin.dongming@np.css.fujitsu.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=seto.hidetoshi@jp.fujitsu.com \
--cc=ying.huang@intel.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