From: Pengfei Xu <pengfei.xu@intel.com>
To: Li Wang <liwang@redhat.com>
Cc: Andrea Arcangeli <andreaa@redhat.com>,
feij.fnst@cn.fujitsu.com, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v1 1/1] migrate_pages03: remove wait_ksmd_full_scan() check because it's not necessary
Date: Fri, 19 Jul 2024 09:29:15 +0800 [thread overview]
Message-ID: <ZpnBa3mKjxgO+H0V@xpf.sh.intel.com> (raw)
In-Reply-To: <CAEemH2d=t3Ki2dmQo30FH6naBmDKCSYCiVh6dhM7Bigr3hbg6A@mail.gmail.com>
Hi Li Wang and Andrea Arcangeli,
On 2024-07-18 at 18:09:56 +0800, Li Wang wrote:
> Sorry, forgot to cc Andrea Arcangeli in the last reply.
>
>
> On Thu, Jul 18, 2024 at 6:06 PM Li Wang <liwang@redhat.com> wrote:
>
> > Pengfei Xu <pengfei.xu@intel.com> wrote:
> >
> > Remove wait_ksmd_full_scan() check because it's not a necessary step for
> >> migrate_pages03 syscall test:
> >> 1. KSM(kernel samepage merging) could be enabled and it is optional for
> >> migrate_pages syscall testing.
> >>
> >
> > The wait_ksmd_full_scan guarantees the actual merging happens then test
> > can migrate those merged KSM pages to reproduce the regression panic in
> > kernel commit 4b0ece6fa0167b.
> >
> > So this is a necessary configuration before testing.
I did not consider the above situation. Is it possible to improve
wait_ksmd_full_scan() to handle the scenario described in point 2?
> >
> >
> >> 2. When server launched any qemu guest, wait_ksmd_full_scan() will in
> >> infinite loop due to /sys/kernel/mm/ksm/full_scans number would not
> >> increase anymore, and migrate_pages03 will failed with timeout reason.
> >> After removed wait_ksmd_full_scan(), migrate_pages03 could pass without
> >> issue.
> >
> >
> > Yes, this timeout problem likely exists. That is the KSM design which can't
> > avoid "unrelated" page merging happening in the background.
> > But removing the wait_ksmd_full_scan might not be a good approach IMHO.
Yes, thanks for above background info sharing!
Best Regards,
Thank you!
> >
> > Cc @Andrea Arcangeli <aarcange@redhat.com> if he has good suggestions on
> > the test.
> >
> >
> >> Signed-off-by: Pengfei Xu <pengfei.xu@intel.com>
> >> ---
> >> testcases/kernel/syscalls/migrate_pages/migrate_pages03.c | 1 -
> >> 1 file changed, 1 deletion(-)
> >>
> >> diff --git a/testcases/kernel/syscalls/migrate_pages/migrate_pages03.c
> >> b/testcases/kernel/syscalls/migrate_pages/migrate_pages03.c
> >> index 4d3299b61..f514ed10c 100644
> >> --- a/testcases/kernel/syscalls/migrate_pages/migrate_pages03.c
> >> +++ b/testcases/kernel/syscalls/migrate_pages/migrate_pages03.c
> >> @@ -95,7 +95,6 @@ static void setup(void)
> >>
> >> SAFE_FILE_SCANF(PATH_KSM "run", "%d", &orig_ksm_run);
> >> SAFE_FILE_PRINTF(PATH_KSM "run", "%d", 1);
> >> - wait_ksmd_full_scan();
> >> }
> >>
> >> static void cleanup(void)
> >> --
> >> 2.43.0
> >>
> >>
> >> --
> >> Mailing list info: https://lists.linux.it/listinfo/ltp
> >>
> >>
> >
> > --
> > Regards,
> > Li Wang
> >
>
>
> --
> Regards,
> Li Wang
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2024-07-19 1:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1721293231.git.pengfei.xu@intel.com>
2024-07-18 9:03 ` [LTP] [PATCH v1 1/1] migrate_pages03: remove wait_ksmd_full_scan() check because it's not necessary Pengfei Xu
2024-07-18 10:06 ` Li Wang
2024-07-18 10:09 ` Li Wang
2024-07-19 1:29 ` Pengfei Xu [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=ZpnBa3mKjxgO+H0V@xpf.sh.intel.com \
--to=pengfei.xu@intel.com \
--cc=andreaa@redhat.com \
--cc=feij.fnst@cn.fujitsu.com \
--cc=liwang@redhat.com \
--cc=ltp@lists.linux.it \
/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