Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1401476 > unrolled thread

Re: UBIFS and page migration (take 3)

Started byRichard Weinberger <richard@nod.at>
First post2016-05-16 14:50 +0200
Last post2016-05-17 11:20 +0200
Articles 6 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: UBIFS and page migration (take 3) Richard Weinberger <richard@nod.at> - 2016-05-16 14:50 +0200
    Re: UBIFS and page migration (take 3) Vlastimil Babka <vbabka@suse.cz> - 2016-05-16 15:10 +0200
      Re: UBIFS and page migration (take 3) Christoph Hellwig <hch@infradead.org> - 2016-05-17 11:20 +0200
      Re: UBIFS and page migration (take 3) Richard Weinberger <richard@nod.at> - 2016-05-17 13:30 +0200
        Re: UBIFS and page migration (take 3) Richard Weinberger <richard@nod.at> - 2016-05-18 11:10 +0200
    Re: UBIFS and page migration (take 3) Christoph Hellwig <hch@infradead.org> - 2016-05-17 11:20 +0200

#1401476 — Re: UBIFS and page migration (take 3)

FromRichard Weinberger <richard@nod.at>
Date2016-05-16 14:50 +0200
SubjectRe: UBIFS and page migration (take 3)
Message-ID<rzq89-78d-3@gated-at.bofh.it>
Christoph,

Am 12.05.2016 um 13:49 schrieb Christoph Hellwig:
> Hi Richard,
> 
> the series looks fine to me, but it fails to address the root cause:

Is this a Reviewed-by? :-)

> that we have an inherently dangerous default for ->migratepage that
> assumes that file systems are implemented a certain way.  I think the
> series should also grow a third patch to remove the default and just
> wire it up for the known good file systems, although we'd need some
> input on what known good is.
>
> Any idea what filesystems do get regular testing with code that's using
> CMA? A good approximation might be those that use the bufer_head
> based aops from fs/buffer.c

No idea how much is being tested.
I fear most issues are unknown. At least for UBIFS it took
years to get aware of the issue.
Thanks again to Maxime and Boris for providing a reproducer.

There are two classes of issues:
a) filesystems that use buffer_migrate_page() but shouldn't
b) filesystems that don't implement ->migratepage() and fallback_migrate_page()
   is not suitable.

As starter we could kill the automatic assignment of fallback_migrate_page() and
non-buffer_head filesystems need to figure out whether fallback_migrate_page()
is suitable or not.
UBIFS found out the hard way. ;-\

MM folks, do we have a way to force page migration?
Maybe we can create a generic stress test.

Thanks,
//richard

[toc] | [next] | [standalone]


#1401486

FromVlastimil Babka <vbabka@suse.cz>
Date2016-05-16 15:10 +0200
Message-ID<rzqrv-7tO-1@gated-at.bofh.it>
In reply to#1401476
On 05/16/2016 02:44 PM, Richard Weinberger wrote:
> MM folks, do we have a way to force page migration?

On NUMA we have migrate_pages(2).

> Maybe we can create a generic stress test.
>
> Thanks,
> //richard
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
>

[toc] | [prev] | [next] | [standalone]


#1402213

FromChristoph Hellwig <hch@infradead.org>
Date2016-05-17 11:20 +0200
Message-ID<rzJkt-2Fq-7@gated-at.bofh.it>
In reply to#1401486
On Mon, May 16, 2016 at 03:03:55PM +0200, Vlastimil Babka wrote:
> On 05/16/2016 02:44 PM, Richard Weinberger wrote:
> >MM folks, do we have a way to force page migration?
> 
> On NUMA we have migrate_pages(2).

Do we have existing sets of it?  Otherwise it would be good to find
a way to wire it up for xfstests so that we enforce migratepage
is called.  Once I get some time I'll see how often we end up
calling migratepage for a normal QA run.

[toc] | [prev] | [next] | [standalone]


#1402297

FromRichard Weinberger <richard@nod.at>
Date2016-05-17 13:30 +0200
Message-ID<rzLmh-3UX-11@gated-at.bofh.it>
In reply to#1401486
Vlastimil,

Am 16.05.2016 um 15:03 schrieb Vlastimil Babka:
> On 05/16/2016 02:44 PM, Richard Weinberger wrote:
>> MM folks, do we have a way to force page migration?
> 
> On NUMA we have migrate_pages(2).

Doesn't this only migrate process (user) pages?
AFAIK we need a way to force migration of pages which
are in the page cache.

*confused*,
//richard

[toc] | [prev] | [next] | [standalone]


#1402819

FromRichard Weinberger <richard@nod.at>
Date2016-05-18 11:10 +0200
Message-ID<rA5El-8tT-7@gated-at.bofh.it>
In reply to#1402297
Am 17.05.2016 um 13:27 schrieb Richard Weinberger:
> Vlastimil,
> 
> Am 16.05.2016 um 15:03 schrieb Vlastimil Babka:
>> On 05/16/2016 02:44 PM, Richard Weinberger wrote:
>>> MM folks, do we have a way to force page migration?
>>
>> On NUMA we have migrate_pages(2).
> 
> Doesn't this only migrate process (user) pages?
> AFAIK we need a way to force migration of pages which
> are in the page cache.

While migrate_pages(2) does not seem to hit the ->migratepage()
function, echo 1 > /proc/sys/vm/compact_memory does.
Thanks Vlastimil for pointing me in the right direction!

Just reproduce the issue on UBIFS in a KVM guest and a
simulated NAND. :-)
Let's see whether I can come up with a generic test.

Thanks,
//richard

[toc] | [prev] | [next] | [standalone]


#1402212

FromChristoph Hellwig <hch@infradead.org>
Date2016-05-17 11:20 +0200
Message-ID<rzJkt-2Fq-3@gated-at.bofh.it>
In reply to#1401476
On Mon, May 16, 2016 at 02:44:49PM +0200, Richard Weinberger wrote:
> Is this a Reviewed-by? :-)

I don't know the code well enough to feel qualified for a review.  But
you get my:

Acked-by: Christoph Hellwig <hch@lst.de>

> There are two classes of issues:
> a) filesystems that use buffer_migrate_page() but shouldn't
> b) filesystems that don't implement ->migratepage() and fallback_migrate_page()
>    is not suitable.
> 
> As starter we could kill the automatic assignment of fallback_migrate_page() and
> non-buffer_head filesystems need to figure out whether fallback_migrate_page()
> is suitable or not.
> UBIFS found out the hard way. ;-\

Yes, I think this would be a good start.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web