Received: by 10.223.176.46 with SMTP id f43csp308736wra; Fri, 19 Jan 2018 18:15:11 -0800 (PST) X-Google-Smtp-Source: AH8x224SkJn02gNO917MYBQyXZa/v2kLhG1hBTaki/f/rdzyopi/BNTrcFp34NceTcrYp60KWarR X-Received: by 10.98.150.213 with SMTP id s82mr622660pfk.10.1516414510939; Fri, 19 Jan 2018 18:15:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516414510; cv=none; d=google.com; s=arc-20160816; b=rWb4k7mfjZEjdSKXOg+RBa9D6nxlYthYa3XuUiJyhcl2nYeuhMNKkQexTRkUgZxU1i KqaxeKGf79/UsCWWrdqo+njQN85RhY++YdPnHJBle/ip/RVBSi8BosDnjNAUmEu0yriA ovZR/Bju2i4nRlS/Mp48xomV5kDsAT76XvAbJ80qoOOdayAezQj+A+LIsM4tIUAt1OMD 7VviYRn3HgNQn4sLvDoaIDK42ZbIL32SdrMyRNkyqHHnsQNZDdLExCEMmCvtwY+lpblf i5qZ0xK0Xjc3QsfaYBW5I503hjxd7NMjgyigD70BFix6mHlZUMRQtb/Vee3ZlSbMt48K 1G/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=nBz5ZtYYmNQb5pp62iFvQWNPrCluutz2+RfTkC2xE4M=; b=PTCE79yy2Nr48OBHjLFicK1noyuMHMj2k4gPU1gHN1YLepPZbJP9UZqDIJLYt0hFFG z3TfkB20+CUY45LlTomUeIbgIKBVYr7ljIMQ5/rJmQfEKY4a/63BvoQilufFCT+7ACQ9 osedz7O2QjjJxHQN2f2YV1V1KPLEqCNRE8kWHabFu5JnRXJjorrFW/SsUsAQyNd+OwzT 8BIeyxd70UKWtOA/TkvGXLCTv4z4DylQgfWOXF6AsxsYHx5zI+Oo+nA7AHqdqGByzfHC Ab5qOWNkIWfAdf3uCpYy9OMuuc4a0kcE3C6zzJKLjEjXpMVHktf8jEwJ5qVbSlnjqxRe Zxvg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s6si9278161pgr.221.2018.01.19.18.14.56; Fri, 19 Jan 2018 18:15:10 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756509AbeATCNC (ORCPT + 99 others); Fri, 19 Jan 2018 21:13:02 -0500 Received: from resqmta-ch2-04v.sys.comcast.net ([69.252.207.36]:42504 "EHLO resqmta-ch2-04v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756450AbeATCM5 (ORCPT ); Fri, 19 Jan 2018 21:12:57 -0500 Received: from resomta-ch2-19v.sys.comcast.net ([69.252.207.115]) by resqmta-ch2-04v.sys.comcast.net with ESMTP id cidueDoZ3D4D6cieOeCDds; Sat, 20 Jan 2018 02:12:56 +0000 Received: from gentwo.org ([98.222.162.64]) by resomta-ch2-19v.sys.comcast.net with SMTP id cieNeSuqywxuRcieNeWAwz; Sat, 20 Jan 2018 02:12:56 +0000 Received: by gentwo.org (Postfix, from userid 1001) id 5BD961160154; Fri, 19 Jan 2018 20:12:55 -0600 (CST) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id 586691160139; Fri, 19 Jan 2018 20:12:55 -0600 (CST) Date: Fri, 19 Jan 2018 20:12:55 -0600 (CST) From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: Henry Willard 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 Subject: Re: [PATCH] mm: numa: Do not trap faults on shared data section pages. In-Reply-To: <2BEFC6DE-7A47-4CB9-AAE5-CEF70453B46F@oracle.com> Message-ID: 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> <2BEFC6DE-7A47-4CB9-AAE5-CEF70453B46F@oracle.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="8323329-1740495615-1516414375=:14056" X-CMAE-Envelope: MS4wfPLsobVOwyAvtlGnQ10XgKwTLHbrSE2gtQpVimp3eW9ly+9mfy28tBJ369vcknL6uVMp7VcWhopciI7VPNdm+r5TbUf1MI+CDdl1eqsTxazX1rQBG3MD zbuhQhL2zOI5ClUTnYu+dcFKAV+GygleKpHpKLQ2rW+u1+VL+AgBOIENK6JLAT1QheKn+jC+qPjqRyL6N5HH/R5RXhRCdOTFhlsow44n0sC1UlkceJ4EW9DZ B/j9OUP6TjSNWzbXK5g4a4qxixYYS5skxkqWOYstKa21fG4Y5GcOWvTrQS3KXDKxequLQNM6HNdQ+lLgco6HGcTviYAQ64fUR6Rvd2HgVSfqCXXAZHGjUJzr phy66/TzTBf42eOBSTbhWhCdb6gttmiXCwsjDIP6Yq72qRMhVCCRb3QXmdFsdWas4OvoR1ZY9mUl2ZKNdiBshkYjXBTnM/zCE3MLs5h0EO3hwROw8TejPORE Lk0SJyCabVcn2Aknrf6kQgNKo0y9s/y5XXLFT6tDqQazJd+NW9p3+3UHQb9HsIm5duljGOtN4u0aFf/n3Kv3Oda0IHejLneuI6NB+SLrkxbNnZRuJez4C2FJ qgt8vCAConXJRTbdxFZurChg Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1740495615-1516414375=:14056 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT On Thu, 18 Jan 2018, Henry Willard wrote: > If MPOL_MF_LAZY were allowed and specified things would not work > correctly. change_pte_range() is unaware of and can’t honor the > difference between MPOL_MF_MOVE_ALL and MPOL_MF_MOVE. Not sure how that relates to what I said earlier... Sorry. > > 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’t > understand why it would be desirable to modify the behavior via sysfs. I think the most common case of shared pages occurs for pages that contain code. In that case a page may be mapped into hundreds if not thousands of processes. In particular that is often the case for basic system libraries like the c library which may actually be mapped into every binary that is running. It is very difficult and expensive to unmap these pages from all the processes in order to migrate them. So some sort of limit would be useful to avoid unnecessary migration attempts. One example would be to forbid migrating pages that are mapped in more than 5 processes. Some sysctl know would be useful here to set the boundary. Your patch addresses a special case here by forbidding migration of any page mapped by more than a single process (mapcount !=1). That would mean f.e. that the complete migration of a set of processes that rely on sharing data via a memory segment is impossible because those shared pages can never be moved. By setting the limit higher that migration would still be possible. Maybe we can set that limit by default at 5 and allow a higher setting if users have applications that require a higher mapcoun? F.e. a common construct is a shepherd task and N worker threads. If those tasks each have their own address space and only communicate via a shared data segment then one may want to set the limit higher than N in order to allow the migration of the group of processes. --8323329-1740495615-1516414375=:14056--