From: Michael Ellerman <mpe@ellerman•id.au>
To: Anshuman Khandual <khandual@linux•vnet.ibm.com>, linuxppc-dev@ozlabs•org
Cc: aneesh.kumar@linux•vnet.ibm.com
Subject: Re: [PATCH] selfttest/powerpc: Add memory page migration tests
Date: Wed, 21 Oct 2015 20:32:08 +1100 [thread overview]
Message-ID: <1445419928.3870.4.camel@ellerman.id.au> (raw)
In-Reply-To: <1444923967-22899-1-git-send-email-khandual@linux.vnet.ibm.com>
On Thu, 2015-10-15 at 21:16 +0530, 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.
> diff --git a/tools/testing/selftests/powerpc/mm/run_mmtests b/tools/testing/selftests/powerpc/mm/run_mmtests
> new file mode 100755
> index 0000000..c537f4e
> --- /dev/null
> +++ b/tools/testing/selftests/powerpc/mm/run_mmtests
> @@ -0,0 +1,21 @@
> +#!/bin/bash
> +mnt=./huge
> +mkdir $mnt
> +mount -t hugetlbfs none $mnt
> +
> +echo 256 > /proc/sys/vm/nr_hugepages
> +echo "HugeTLB vs THP"
> +./hugetlb_vs_thp_test
> +
> +echo "Subpage Protection"
> +./subpage_prot
> +
> +echo "Test normal page migration"
> +./page-migration
> +
> +echo "Test huge page migration"
> +./hugepage-migration
> +
> +#cleanup
> +umount $mnt
> +rm -rf $mnt
I'm not a fan of this script at all.
It looks like you borrowed the logic from selftests/vm/run_vmtests, but
stripped out all the error handling.
Please write it so that it attempts to do the hugepage setup, but if it fails,
prints a warning and then tries to run the tests anyway. That way if a regular
user runs the test, but hugepages are already setup, some of the tests can
still run.
It also needs to print if any of the tests fail, and the whole test needs to
return an error if any test fails.
cheers
prev parent reply other threads:[~2015-10-21 9:32 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
2015-10-21 9:32 ` Michael Ellerman [this message]
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=1445419928.3870.4.camel@ellerman.id.au \
--to=mpe@ellerman$(echo .)id.au \
--cc=aneesh.kumar@linux$(echo .)vnet.ibm.com \
--cc=khandual@linux$(echo .)vnet.ibm.com \
--cc=linuxppc-dev@ozlabs$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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