Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1425434
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/3] mm: Don't blindly assign fallback_migrate_page() |
| Date | 2016-06-17 22:10 +0200 |
| Message-ID | <rL8fw-2Ds-41@gated-at.bofh.it> (permalink) |
| References | (3 earlier) <rKWHo-3Cb-45@gated-at.bofh.it> <rL4OC-qf-17@gated-at.bofh.it> <rL5hE-Ak-15@gated-at.bofh.it> <rL6GJ-1zJ-21@gated-at.bofh.it> <rL7Mt-2cg-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri 17-06-16 21:36:30, Richard Weinberger wrote:
>
>
> Am 17.06.2016 um 20:27 schrieb Michal Hocko:
> > On Fri 17-06-16 18:55:45, Richard Weinberger wrote:
> >> Am 17.06.2016 um 18:28 schrieb Michal Hocko:
> >>> But doesn't this disable the page migration and so potentially reduce
> >>> the compaction success rate for the large pile of filesystems? Without
> >>> any hint about that?
> >>
> >> The WARN_ON_ONCE() is the hint. ;)
> >
> > Right. My reply turned a different way than I meant... I meant to say
> > that there might be different regressions caused by this change without much
> > hint that a particular warning would be the smoking gun...
> >
>
> Okay, what about something like that?
> That way everything works as before and we don't have regressions
> but FS maintainers will notice the WARN_ON_ONCE() and hopefully review
> whether generic_migrate_page() is really suitable.
> If so, they can set their a_ops->migratepage to generic_migrate_page().
Yes this sounds better to me. I would just be more verbose about which
a_ops is missing the migratepage callback. The WARN_ON_ONCE will not
tell us which fs is the culprit. I am not even sure the calltrace is
really helpful and maybe printk_once would be more appropriate.
printk_once(KERN_INFO "%ps is missing migratepage callback. Please report to the respective filesystem maintainers.\n",
mapping->a_ops);
Or print once per a_ops would be even better but that sounds like an
over engineering...
> @@ -771,8 +773,15 @@ static int move_to_new_page(struct page *newpage, struct page *page,
> * is the most common path for page migration.
> */
> rc = mapping->a_ops->migratepage(mapping, newpage, page, mode);
> - else
> - rc = fallback_migrate_page(mapping, newpage, page, mode);
> + else {
> + /*
> + * Dear filesystem maintainer, please verify whether
> + * generic_migrate_page() is suitable for your
> + * filesystem, especially wrt. page flag handling.
> + */
> + WARN_ON_ONCE(1);
> + rc = generic_migrate_page(mapping, newpage, page, mode);
> + }
>
> /*
> * When successful, old pagecache page->mapping must be cleared before
>
> Thanks,
> //richard
--
Michal Hocko
SUSE Labs
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/3] mm: Don't blindly assign fallback_migrate_page() Richard Weinberger <richard@nod.at> - 2016-06-16 23:30 +0200
Re: [PATCH 1/3] mm: Don't blindly assign fallback_migrate_page() Andrew Morton <akpm@linux-foundation.org> - 2016-06-17 01:20 +0200
Re: [PATCH 1/3] mm: Don't blindly assign fallback_migrate_page() Richard Weinberger <richard@nod.at> - 2016-06-17 09:50 +0200
Re: [PATCH 1/3] mm: Don't blindly assign fallback_migrate_page() Michal Hocko <mhocko@kernel.org> - 2016-06-17 18:30 +0200
Re: [PATCH 1/3] mm: Don't blindly assign fallback_migrate_page() Richard Weinberger <richard@nod.at> - 2016-06-17 19:00 +0200
Re: [PATCH 1/3] mm: Don't blindly assign fallback_migrate_page() Michal Hocko <mhocko@kernel.org> - 2016-06-17 20:30 +0200
Re: [PATCH 1/3] mm: Don't blindly assign fallback_migrate_page() Richard Weinberger <richard@nod.at> - 2016-06-17 21:40 +0200
Re: [PATCH 1/3] mm: Don't blindly assign fallback_migrate_page() Michal Hocko <mhocko@kernel.org> - 2016-06-17 22:10 +0200
Re: [PATCH 1/3] mm: Don't blindly assign fallback_migrate_page() Richard Weinberger <richard@nod.at> - 2016-06-23 00:30 +0200
csiph-web