<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:monospace"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 29, 2021 at 9:27 AM Li Wang <<a href="mailto:liwang@redhat.com">liwang@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 26, 2021 at 8:53 PM Jan Stancek <<a href="mailto:jstancek@redhat.com" target="_blank">jstancek@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">When empty set is passed to MPOL_PREFERRED, memory is allocated<br>
on the node of the CPU that triggered the allocation.<br>
<br>
After kernel commit:<br>
7858d7bca7fb ("mm/mempolicy: don't handle MPOL_LOCAL like a fake MPOL_PREFERRED policy")<br>
kernel returns stored policy as MPOL_LOCAL.<br></blockquote><div><br></div><div><div style="font-size:small">As the MPOL_LOCAL has been setup as a real policy, I'm wondering should we</div><div style="font-size:small">add more tests for it in the next? e.g.</div></div></div></div></blockquote><div><br></div><div><div style="font-family:monospace" class="gmail_default">Right, but we also need something in setup to avoid running it</div><div style="font-family:monospace" class="gmail_default">for kernels that don't support
MPOL_LOCAL.</div><div style="font-family:monospace" class="gmail_default"><br></div><div style="font-family:monospace" class="gmail_default">You're right that parameters in tst_res message appear to be in wrong order.<br></div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div><div style="font-size:small"><br></div><div style="font-size:small">--- a/testcases/kernel/syscalls/mbind/mbind01.c<br>+++ b/testcases/kernel/syscalls/mbind/mbind01.c<br>@@ -47,6 +47,19 @@ struct test_case {<br> };<br> <br> static struct test_case tcase[] = {<br>+ {<br>+ POLICY_DESC(MPOL_LOCAL),<br>+ .ret = 0,<br>+ .err = 0,<br>+ .test = test_none,<br>+ .exp_nodemask = &empty_nodemask,<br>+ },<br>+ {<br>+ POLICY_DESC_TEXT(MPOL_LOCAL, "target exists"),<br>+ .ret = -1,<br>+ .err = EINVAL,<br>+ .test = test_default,<br>+ },<br> {<br> POLICY_DESC(MPOL_DEFAULT),<br> .ret = 0,<br></div><div style="font-size:small"><br></div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Per <a href="mailto:mhocko@suse.com" target="_blank">mhocko@suse.com</a> in <a href="https://lists.linux.it/pipermail/ltp/2021-June/023037.html" rel="noreferrer" target="_blank">https://lists.linux.it/pipermail/ltp/2021-June/023037.html</a><br>
Strictly speaking this is breaking user interface but I am wondering<br>
whether this really matter or is completely unexpected ... I would<br>
be inclined to keep this inconsistency and see whether anybody<br>
actually complains and have a relevant use for this behavior.<br>
<br>
Modify the test to accept either MPOL_PREFERRED or MPOL_LOCAL.<br>
<br>
Signed-off-by: Jan Stancek <<a href="mailto:jstancek@redhat.com" target="_blank">jstancek@redhat.com</a>><br></blockquote><div><br></div><div><div style="font-size:small">Reviewed-by: Li Wang <<a href="mailto:liwang@redhat.com" target="_blank">liwang@redhat.com</a>></div></div><div style="font-size:small"><br></div></div><div style="font-size:small">But anyway, this patch makes sense!</div><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>
</blockquote></div></div>