Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753411AbeABL0F (ORCPT + 1 other); Tue, 2 Jan 2018 06:26:05 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:53724 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753300AbeABL0B (ORCPT ); Tue, 2 Jan 2018 06:26:01 -0500 Subject: Re: [RFC PATCH 1/3] mm, numa: rework do_pages_move To: Michal Hocko , linux-mm@kvack.org References: <20171207143401.GK20234@dhcp22.suse.cz> <20171208161559.27313-1-mhocko@kernel.org> <20171208161559.27313-2-mhocko@kernel.org> Cc: Zi Yan , Naoya Horiguchi , "Kirill A. Shutemov" , Vlastimil Babka , Andrew Morton , Andrea Reale , LKML , Michal Hocko From: Anshuman Khandual Date: Tue, 2 Jan 2018 16:55:46 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20171208161559.27313-2-mhocko@kernel.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 18010211-0040-0000-0000-0000041FCBF4 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18010211-0041-0000-0000-000020C30CE4 Message-Id: <2e467ad3-a443-bde4-afa2-664bca57914f@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-02_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1801020168 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 12/08/2017 09:45 PM, Michal Hocko wrote: > From: Michal Hocko > > do_pages_move is supposed to move user defined memory (an array of > addresses) to the user defined numa nodes (an array of nodes one for > each address). The user provided status array then contains resulting > numa node for each address or an error. The semantic of this function is > little bit confusing because only some errors are reported back. Notably > migrate_pages error is only reported via the return value. This patch It does report back the migration failures as well. In new_page_node there is '*result = &pm->status' which going forward in unmap_and_move will hold migration error or node ID of the new page. newpage = get_new_page(page, private, &result); ............ if (result) { if (rc) *result = rc; else *result = page_to_nid(newpage); }