From: Anshuman Khandual <khandual@linux.vnet.ibm.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] selfttest/powerpc: Add memory page migration tests
Date: Tue, 20 Oct 2015 08:36:03 +0530 [thread overview]
Message-ID: <5625AF9B.6080606@linux.vnet.ibm.com> (raw)
In-Reply-To: <87pp0fhwjc.fsf@linux.vnet.ibm.com>
On 10/16/2015 05:09 PM, Aneesh Kumar K.V wrote:
> Anshuman Khandual <khandual@linux.vnet.ibm.com> writes:
>
>> On 10/15/2015 09:16 PM, Anshuman Khandual wrote:
>>> This adds two tests for memory page migration. One for normal page
>>> migration which works for both 4K or 64K base page size kernel and
>>> the other one is for 16MB huge page migration which will work both
>>> 4K or 64K base page sized 16MB huge pages as and when we support
>>> huge page migration.
>>>
>>> Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
>>> ---
>>> - Works for normal page migration on both 64K and 4K base pages
>>> - Works for 16MB huge page migration (64K) on Aneesh's V2 PTE changes
>>>
>>> +
>>> +int test_migration(unsigned long length)
>>> +{
>>> + unsigned long failed;
>>> + void *addr;
>>> + int ret;
>>> +
>>> + addr = mmap(MMAP_ADDR, length, MMAP_PROT, MMAP_FLAGS, -1, 0);
>>> + if (addr == MAP_FAILED) {
>>> + perror("mmap() failed");
>>> + exit(-1);
>>> + }
>>
>> Will add a mlock() call here as well. Some times soft offline
>> fails while trying to move a huge chunk of memory on a system
>> because of swapping. With a mlock() in there the problem gets
>> resolved.
>
> Is that with respect to hugetlb pages ? I doubt, because hugetlb pages
> are not swapped out.
Thats correct. It is related to normal pages (4K or 64K). Have not
seen this swap problem of HugeTLB pages.
next prev parent reply other threads:[~2015-10-20 3:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-15 15:46 [PATCH] selfttest/powerpc: Add memory page migration tests Anshuman Khandual
2015-10-16 10:35 ` Anshuman Khandual
2015-10-16 11:39 ` Aneesh Kumar K.V
2015-10-20 3:06 ` Anshuman Khandual [this message]
2015-10-21 9:32 ` Michael Ellerman
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=5625AF9B.6080606@linux.vnet.ibm.com \
--to=khandual@linux.vnet.ibm.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=linuxppc-dev@ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.