[LTP] mbind() fails to fail with EIO

Yang Shi
2019-03-19T16:25:58Z

On Tue, Mar 19, 2019 at 7:52 AM Kirill A. Shutemov <kirill@shutemov.name> wrote:
>
> On Tue, Mar 19, 2019 at 03:41:33PM +0100, Oscar Salvador wrote:
> > On Tue, Mar 19, 2019 at 05:26:39PM +0300, Kirill A. Shutemov wrote:
> > > That's all sounds reasonable.
> > >
> > > We only need to make sure the bug fixed by 77bf45e78050 will not be
> > > re-introduced.
> >
> > I gave it a spin with the below patch.
> > Your testcase works (so the bug is not re-introduced), and we get -EIO
> > when running the ltp test [1].
> > So unless I am missing something, it should be enough.

Thanks for adding the missing part.

>
> Don't we need to bypass !vma_migratable(vma) check in
> queue_pages_test_walk() for MPOL_MF_STRICT? I mean user still might want
> to check if all pages are on the right not even the vma is not migratable.

I think we need. As long as there is "existing page was already on a
node that does not follow the policy" with MPOL_MF_STRICT, it should
return -EIO. So, even though the vma is not migratable it should check
if the above condition is true or not.

I will wrap all the stuff into a formal patch.

Thanks,
Yang

>
> --
> Kirill A. Shutemov