Received: by 10.223.176.46 with SMTP id f43csp268513wra; Thu, 18 Jan 2018 17:08:27 -0800 (PST) X-Google-Smtp-Source: ACJfBov6xsYbGFiQqWfIS/Ai0ZoDA9IkkksgUQ95H2y+Nyv3hXlFJWmyV+UdRev2vLxpSS7gPXLa X-Received: by 10.99.114.30 with SMTP id n30mr34195801pgc.178.1516324107471; Thu, 18 Jan 2018 17:08:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516324107; cv=none; d=google.com; s=arc-20160816; b=dnOws20f7G2BwinXGxlnOOy0uvzE5u34cYYtArzNaBtfUwgTAfap8sqVyMO8s9i/QV fRgNUubE2GwiMIGBJY/OYeKZuvv/vIxv0gUixF6cG7IrAT7OuT2j/E6kxEU/O6Ilt7ic h6PqggunJiaz1s8ylMHtOrQQoxufhBY4Dh+i3E+7ik2ti1REF8923039LEuyo8OZ2jzU HFfk+VYF7XeWcm9KHgsRBxKnVjK6mySvUvf9MHXoBlcOSZi4QkQo5z45lj5IGHjyzACq Yh0ClnPGSIT+gkTF2L6mNyd+JyheWoisIZxeZ+UTmUgHZw9FlBYXn7mdFG5/2MsHxwNT qA0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature:arc-authentication-results; bh=jsmGNCVJtjBzpMGxVVkrLyqghkNDoPa5JFgGITACOEk=; b=MVFVNpqBSLIie8z+pnGh8ITslUhjjUxLQeFhvIkf4Dazknb6dSn3WaS3jdmDiv1cTf G4V7t0pkOmL2y0qOeQ6q4/7sg715zcImnnyaoSgMQsEzNTg4sVcdTej9TyFtvn78Sr1w mtT5zRe8xD9z88vQRE1ud7YLVg0PbfR383x0TeyztUkjOzPLT8mR81rpjcIvkv82SOyG 15keIAU3i2BMTzX2MG5NFQ7R0sNWG+0t2/Reqs/j/x1agfYSYUfJgWmwVrPptVd1C3NE d8nYvftj2P+yuSBb07kmgHzDw/4k+hMMhS9jRzN04vVaDfuysfCq2FGYIKW1CQ3/FLjt MSjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=WFjpxqyT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l8si5588649pgf.140.2018.01.18.17.08.13; Thu, 18 Jan 2018 17:08:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=WFjpxqyT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755344AbeASBHZ (ORCPT + 99 others); Thu, 18 Jan 2018 20:07:25 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:54814 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754855AbeASBHS (ORCPT ); Thu, 18 Jan 2018 20:07:18 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w0J12MqF031646; Fri, 19 Jan 2018 01:07:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=content-type : mime-version : subject : from : in-reply-to : date : cc : content-transfer-encoding : message-id : references : to; s=corp-2017-10-26; bh=jsmGNCVJtjBzpMGxVVkrLyqghkNDoPa5JFgGITACOEk=; b=WFjpxqyTYOuP0VUbMrjzMd/NvLxygM1+bQ1rMt2ly/9FFbhREtGhD593Dj5R5Mtl39mR Go5/JQK2GHojQ1WDo5Xn0HAW/49PzixsYAwDpPimmTc0L7xOol6gpNVRaaLOXTyNQk3p Y1hpqiyXwqopTOcfBN7xLbbTt0RXElRmAr2XQHkkVNZAaDt40Z4TVmrVzELzNrUJIuvq Yhaf6MKOeUzBGVQvoE80dwRw2FnJMirmPsoI48Tg5g3gLrzL7WUdPY55YZ6STPnZ6wCj +dYi+VuZ/fdWPEPUkix4KB9WB9jrdTzxLFlc12gEzFiwvjGxeZlL8LE2uWfCDovbT12c uQ== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2120.oracle.com with ESMTP id 2fk4qu8a9d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 19 Jan 2018 01:07:02 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w0J170km016949 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 19 Jan 2018 01:07:01 GMT Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w0J16xDm013892; Fri, 19 Jan 2018 01:06:59 GMT Received: from dhcp-10-159-135-33.vpn.oracle.com (/10.159.135.33) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 18 Jan 2018 17:06:58 -0800 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Subject: Re: [PATCH] mm: numa: Do not trap faults on shared data section pages. From: Henry Willard In-Reply-To: Date: Thu, 18 Jan 2018 17:06:54 -0800 Cc: Mel Gorman , akpm@linux-foundation.org, kstewart@linuxfoundation.org, zi.yan@cs.rutgers.edu, pombredanne@nexb.com, aarcange@redhat.com, gregkh@linuxfoundation.org, aneesh.kumar@linux.vnet.ibm.com, kirill.shutemov@linux.intel.com, jglisse@redhat.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Message-Id: <2BEFC6DE-7A47-4CB9-AAE5-CEF70453B46F@oracle.com> References: <1516130924-3545-1-git-send-email-henry.willard@oracle.com> <1516130924-3545-2-git-send-email-henry.willard@oracle.com> <20180116212614.gudglzw7kwzd3get@suse.de> To: Christopher Lameter X-Mailer: Apple Mail (2.3445.5.20) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8778 signatures=668654 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=3 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1801190008 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Jan 17, 2018, at 10:23 AM, Christopher Lameter = wrote: >=20 > On Tue, 16 Jan 2018, Mel Gorman wrote: >=20 >> My main source of discomfort is the fact that this is permanent as = two >> processes perfectly isolated but with a suitably shared COW mapping >> will never migrate the data. A potential improvement to get the = reported >> bandwidth up in the test program would be to skip the rest of the VMA = if >> page_mapcount !=3D 1 in a COW mapping as it would be reasonable to = assume >> the remaining pages in the VMA are also affected and the scan is = wasteful. >> There are counter-examples to this but I suspect that the full VMA = being >> shared is the common case. Whether you do that or not; >=20 > Same concern here. Typically CAP_SYS_NICE will bypass the check that = the > page is only mapped to a single process and the check looks exactly = like > the ones for manual migration. Using CAP_SYS_NICE would be surprising > here since autonuma is not triggered by the currently running process. >=20 > Can we configure this somehow via sysfs? If I understand the code correctly, CAP_SYS_NICE allows MPOL_MF_MOVE_ALL = to be set with mbind() or used with move_pages(). CAP_SYS_NICE also = causes migrate_pages() to behave as if MPOL_MF_MOVE_ALL were specified. = There are checks requiring either MPOL_MF_MOVE_ALL or = page_mapcount(page) =3D=3D 1. The normal case does not call = change_prot_numa(). change_prot_numa() is only called when MPOL_MF_LAZY = is specified, and at the moment MPOL_MF_LAZY is not recognized as a = valid flag. It looks to me that as things stand now, change_prot_numa() = is only called from task_numa_work(). If MPOL_MF_LAZY were allowed and specified things would not work = correctly. change_pte_range() is unaware of and can=E2=80=99t honor the = difference between MPOL_MF_MOVE_ALL and MPOL_MF_MOVE.=20 For the case of auto numa balancing, it may be undesirable for shared = pages to be migrated whether they are also copy-on-write or not. The = copy-on-write test was added to restrict the effect of the patch to the = specific situation we observed. Perhaps I should remove it, I don=E2=80=99= t understand why it would be desirable to modify the behavior via sysfs. Thanks, Henry >=20 >=20