Re: [v3 PATCH] mm: move_pages: return valid node id in status if the page is already on the target node

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

 



On Thu 05-12-19 19:45:49, Cristopher Lameter wrote:
> On Fri, 6 Dec 2019, Yang Shi wrote:
> 
> > Felix Abecassis reports move_pages() would return random status if the
> > pages are already on the target node by the below test program:
> 
> Looks ok.
> 
> Acked-by: Christoph Lameter <cl@xxxxxxxxx>
> 
> Nitpicks:
> 
> > @@ -1553,7 +1555,7 @@ static int add_page_for_migration(struct mm_struct *mm, unsigned long addr,
> >  	if (PageHuge(page)) {
> >  		if (PageHead(page)) {
> >  			isolate_huge_page(page, pagelist);
> > -			err = 0;
> > +			err = 1;
> 
> Add a meaningful constant instead of 1?

Well 1 has a good meaning here actually. We have -errno or the number of
queued pages.

-- 
Michal Hocko
SUSE Labs



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux