Re: [RFC] Checking for error code in __offline_pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed 23-05-18 10:16:49, Oscar Salvador wrote:
[...]
> AFAIU, permament errors are things like -EBUSY, -ENOSYS, -ENOMEM,
> and a temporary one would be -EAGAIN?

It would be really great to have EBUSY as permanent and ENOMEM and
EAGAIN as temporary failures. But this is not so easy. The migration
code failes on the elevated ref count usually and we simply do not know
whether this is a short term pin or somebody holding the reference
basically for ever (from the migration POV). There was some discussion
about longterm pins on pages at LSFMM this year but it will take quite
some time before we will get some working solution.

> Maybe it is overcomplicated, but what about adding another parameter to
> migrate_pages() where we set the real error.
> something like:
> 
> int migrate_pages(struct list_head *from, new_page_t get_new_page,
> 		free_page_t put_new_page, unsigned long private,
> 		enum migrate_mode mode, int reason, int *error)

I am not sure we really need a new parameter. migrate_pages will tell us
the failure. We just do not know _which_ error to return currently.

-- 
Michal Hocko
SUSE Labs




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux