Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756999AbYJMUWU (ORCPT ); Mon, 13 Oct 2008 16:22:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753050AbYJMUWE (ORCPT ); Mon, 13 Oct 2008 16:22:04 -0400 Received: from iona.labri.fr ([147.210.8.143]:48028 "EHLO iona.labri.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752495AbYJMUWD (ORCPT ); Mon, 13 Oct 2008 16:22:03 -0400 Message-ID: <48F3ADAF.2080200@inria.fr> Date: Mon, 13 Oct 2008 22:21:03 +0200 From: Brice Goglin User-Agent: Mozilla-Thunderbird 2.0.0.16 (X11/20080724) MIME-Version: 1.0 To: Christoph Lameter CC: LKML , linux-mm@kvack.org, Andrew Morton , Nathalie Furmento Subject: [PATCH 1/5] mm: stop returning -ENOENT from sys_move_pages() if nothing got migrated References: <48F3AD47.1050301@inria.fr> In-Reply-To: <48F3AD47.1050301@inria.fr> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1174 Lines: 42 There is no point in returning -ENOENT from sys_move_pages() if all pages were already on the right node, while we return 0 if only 1 page was not. Most application don't know where their pages are allocated, so it's not an error to try to migrate them anyway. Just return 0 and let the status array in user-space be checked if the application needs details. It will make the upcoming chunked-move_pages() support much easier. Signed-off-by: Brice Goglin --- mm/migrate.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/mm/migrate.c b/mm/migrate.c index 2a80136..e505b2f 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -926,11 +926,10 @@ set_status: pp->status = err; } + err = 0; if (!list_empty(&pagelist)) err = migrate_pages(&pagelist, new_page_node, (unsigned long)pm); - else - err = -ENOENT; up_read(&mm->mmap_sem); return err; -- 1.5.6.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/