Re: [PATCH 1/3] mm: correct return value of migrate_pages()

2012-07-16 Thread Christoph Lameter
On Tue, 17 Jul 2012, JoonSoo Kim wrote: > > Actually, it makes me wonder if there is any code that uses this > > information. If not, it would be best in my opinion to make it return > > zero or negative error code, but that would have to be checked. > > I think that, too. > I looked at every

Re: [PATCH 1/3] mm: correct return value of migrate_pages()

2012-07-16 Thread JoonSoo Kim
2012/7/17 Michal Nazarewicz : > Acked-by: Michal Nazarewicz Thanks. > Actually, it makes me wonder if there is any code that uses this > information. If not, it would be best in my opinion to make it return > zero or negative error code, but that would have to be checked. I think that, too. I

Re: [PATCH 1/3] mm: correct return value of migrate_pages()

2012-07-16 Thread Michal Nazarewicz
Joonsoo Kim writes: > migrate_pages() should return number of pages not migrated or error code. > When unmap_and_move return -EAGAIN, outer loop is re-execution without > initialising nr_failed. This makes nr_failed over-counted. > > So this patch correct it by initialising nr_failed in outer

Re: [PATCH 1/3] mm: correct return value of migrate_pages()

2012-07-16 Thread Christoph Lameter
On Tue, 17 Jul 2012, JoonSoo Kim wrote: > > for (pass = 0; pass < 10 && retry; pass++) { > retry = 0; > + nr_failed = 0; > > list_for_each_entry_safe(page, page2, from, lru) { > cond_resched(); > > When I resend with

Re: [PATCH 1/3] mm: correct return value of migrate_pages()

2012-07-16 Thread JoonSoo Kim
2012/7/17 Christoph Lameter : > On Tue, 17 Jul 2012, Joonsoo Kim wrote: > >> migrate_pages() should return number of pages not migrated or error code. >> When unmap_and_move return -EAGAIN, outer loop is re-execution without >> initialising nr_failed. This makes nr_failed over-counted. > > The

Re: [PATCH 1/3] mm: correct return value of migrate_pages()

2012-07-16 Thread Christoph Lameter
On Tue, 17 Jul 2012, Joonsoo Kim wrote: > migrate_pages() should return number of pages not migrated or error code. > When unmap_and_move return -EAGAIN, outer loop is re-execution without > initialising nr_failed. This makes nr_failed over-counted. The itention of the nr_failed was only to give

[PATCH 1/3] mm: correct return value of migrate_pages()

2012-07-16 Thread Joonsoo Kim
migrate_pages() should return number of pages not migrated or error code. When unmap_and_move return -EAGAIN, outer loop is re-execution without initialising nr_failed. This makes nr_failed over-counted. So this patch correct it by initialising nr_failed in outer loop. Signed-off-by: Joonsoo Kim

[PATCH 1/3] mm: correct return value of migrate_pages()

2012-07-16 Thread Joonsoo Kim
migrate_pages() should return number of pages not migrated or error code. When unmap_and_move return -EAGAIN, outer loop is re-execution without initialising nr_failed. This makes nr_failed over-counted. So this patch correct it by initialising nr_failed in outer loop. Signed-off-by: Joonsoo Kim

Re: [PATCH 1/3] mm: correct return value of migrate_pages()

2012-07-16 Thread Christoph Lameter
On Tue, 17 Jul 2012, Joonsoo Kim wrote: migrate_pages() should return number of pages not migrated or error code. When unmap_and_move return -EAGAIN, outer loop is re-execution without initialising nr_failed. This makes nr_failed over-counted. The itention of the nr_failed was only to give an

Re: [PATCH 1/3] mm: correct return value of migrate_pages()

2012-07-16 Thread JoonSoo Kim
2012/7/17 Christoph Lameter c...@linux.com: On Tue, 17 Jul 2012, Joonsoo Kim wrote: migrate_pages() should return number of pages not migrated or error code. When unmap_and_move return -EAGAIN, outer loop is re-execution without initialising nr_failed. This makes nr_failed over-counted. The

Re: [PATCH 1/3] mm: correct return value of migrate_pages()

2012-07-16 Thread Christoph Lameter
On Tue, 17 Jul 2012, JoonSoo Kim wrote: for (pass = 0; pass 10 retry; pass++) { retry = 0; + nr_failed = 0; list_for_each_entry_safe(page, page2, from, lru) { cond_resched(); When I resend with this, could I

Re: [PATCH 1/3] mm: correct return value of migrate_pages()

2012-07-16 Thread Michal Nazarewicz
Joonsoo Kim js1...@gmail.com writes: migrate_pages() should return number of pages not migrated or error code. When unmap_and_move return -EAGAIN, outer loop is re-execution without initialising nr_failed. This makes nr_failed over-counted. So this patch correct it by initialising nr_failed

Re: [PATCH 1/3] mm: correct return value of migrate_pages()

2012-07-16 Thread JoonSoo Kim
2012/7/17 Michal Nazarewicz min...@tlen.pl: Acked-by: Michal Nazarewicz min...@mina86.com Thanks. Actually, it makes me wonder if there is any code that uses this information. If not, it would be best in my opinion to make it return zero or negative error code, but that would have to be

Re: [PATCH 1/3] mm: correct return value of migrate_pages()

2012-07-16 Thread Christoph Lameter
On Tue, 17 Jul 2012, JoonSoo Kim wrote: Actually, it makes me wonder if there is any code that uses this information. If not, it would be best in my opinion to make it return zero or negative error code, but that would have to be checked. I think that, too. I looked at every callsites