Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752263AbdIVVBZ (ORCPT ); Fri, 22 Sep 2017 17:01:25 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:34600 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751974AbdIVVBX (ORCPT ); Fri, 22 Sep 2017 17:01:23 -0400 Date: Fri, 22 Sep 2017 16:01:13 -0500 From: Reza Arbab To: Andrew Morton Cc: Michal Hocko , Jan Kara , Ross Zwisler , "Kirill A. Shutemov" , Lorenzo Stoakes , Dave Jiang , =?iso-8859-1?B?Suly9G1l?= Glisse , Matthew Wilcox , Hugh Dickins , Huang Ying , Ingo Molnar , "Aneesh Kumar K.V" , James Morse , Naoya Horiguchi , Minchan Kim , Johannes Weiner , Will Deacon , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/device-public-memory: Enable move_pages() to stat device memory References: <1506111236-28975-1-git-send-email-arbab@linux.vnet.ibm.com> <20170922203157.4txavkwmvyh2ufmd@arbab-laptop.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20170922203157.4txavkwmvyh2ufmd@arbab-laptop.localdomain> Organization: IBM Linux Technology Center User-Agent: NeoMutt/20170914 (1.9.0) X-TM-AS-GCONF: 00 x-cbid: 17092221-0048-0000-0000-000001E99AD0 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007779; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000231; SDB=6.00920875; UDB=6.00462764; IPR=6.00701096; BA=6.00005601; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017252; XFM=3.00000015; UTC=2017-09-22 21:01:21 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17092221-0049-0000-0000-000042A5C308 Message-Id: <20170922210113.c2dn5mjis6zyted7@arbab-laptop.localdomain> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-09-22_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1709220293 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 923 Lines: 31 On Fri, Sep 22, 2017 at 08:31:57PM +0000, Reza Arbab wrote: >On Fri, Sep 22, 2017 at 08:13:56PM +0000, Reza Arbab wrote: >>The move_pages() syscall can be used to find the numa node where a page >>currently resides. This is not working for device public memory pages, >>which erroneously report -EFAULT (unmapped or zero page). > >Argh. Please disregard this patch. > >My test setup has a chunk of system memory carved out as pretend >device public memory, to experiment with. Of course the real thing has >no numa node! On third thought, yes it does! static int hmm_devmem_pages_create(struct hmm_devmem *devmem) { : nid = dev_to_node(device); if (nid < 0) nid = numa_mem_id(); : if (devmem->pagemap.type == MEMORY_DEVICE_PUBLIC) ret = arch_add_memory(nid, align_start, align_size, false); : } So now I think the patch may be right after all. Please un-disregard it. Regard it? Whatever. -- Reza Arbab