Re: [PATCH v4 2/2] mm/gup.c: Refactor check_and_migrate_movable_pages()

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

 



On Thu, Aug 18, 2022 at 09:24:28AM +1000, Alistair Popple wrote:
> 	collected = collect_longterm_unpinnable_pages(&movable_page_list,
> 						      nr_pages, pages);
> 	if (collected == 0)
> 		return 0;
> 
> 	ret = migrate_longterm_unpinnable_pages(&movable_page_list, nr_pages,
> 						pages);
> 	if (ret)
> 		return ret;
> 
> 	return -EAGAIN;
> 
> Which IMHO looks at lot more normal and sane than what I had.

That isn't "success oriented flow" :)

> > But why return 0 from the helper function in the first place?
> 
> To stick with the paradigm of 0 == success. Ie.

But it doesn't mean success if we squashed it to EAGAIN here.

-EAGAIN == retry
      0 == success, real success
everything else == -ERRNO, failure

Stick with one convection in all the functions in this file in this grouping.

Jason




[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