Thread (8 messages) 8 messages, 3 authors, 2021-06-07

Re: [mm/mempolicy] 7463fff037: ltp.mbind01.fail

From: Michal Hocko <mhocko@suse.com>
Date: 2021-06-07 08:10:12
Also in: lkml, ltp, oe-lkp

On Mon 07-06-21 15:48:15, kernel test robot wrote:
mbind01.c:169: TINFO: case MPOL_PREFERRED (no target)
mbind01.c:188: TFAIL: Wrong policy: 1, expected: 4
AFAIU this points to
static void test_none(unsigned int i, char *p)
{
        struct test_case *tc = &tcase[i];

        TEST(mbind(p, MEM_LENGTH, tc->policy, NULL, 0, tc->flags));
}

So it calls MPOL_PREFERRED with NULL parameter and the test has failed
because the kernel returns MPOL_LOCAL instead of MPOL_PREFERRED. Strictly
speaking this is breaking user interface but I am wondering whether this
really matter or is completely unexpected.  The manual page explicitly
talks about this case
"
	If the nodemask and maxnode arguments specify the empty set, then
	the memory is allocated on the node of the CPU that triggered the
	allocation.
"

I would be inclined to keep this inconsistency and see whether anybody
actually complains and have a relevant use for this behavior. The
cleanup which makes the code easier to maintain and less error prone
doesn't really deserve to get ditched just because of this IMHO.
-- 
Michal Hocko
SUSE Labs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help