From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933875AbcJLPkn (ORCPT ); Wed, 12 Oct 2016 11:40:43 -0400 Received: from mga09.intel.com ([134.134.136.24]:31712 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932245AbcJLPke (ORCPT ); Wed, 12 Oct 2016 11:40:34 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,482,1473145200"; d="scan'208";a="889302980" Date: Wed, 12 Oct 2016 08:40:33 -0700 From: Andi Kleen To: Mel Gorman Cc: Andi Kleen , peterz@infradead.org, linux-mm@kvack.org, akpm@linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Don't touch single threaded PTEs which are on the right node Message-ID: <20161012154033.GH3078@tassilo.jf.intel.com> References: <1476217738-10451-1-git-send-email-andi@firstfloor.org> <20161012054933.GB20573@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161012054933.GB20573@suse.de> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > You shouldn't need to check the number of mm_users and the node the task > is running on for every PTE being scanned. Ok. > > A more important corner case is if the VMA is shared with a task running on > another node. By avoiding the NUMA hinting faults here, the hinting faults > trapped by the remote process will appear exclusive and allow migration of > the page. This will happen even if the single-threade task is continually > using the pages. > > When you said "we had some problems", you didn't describe the workload or > what the problems were (I'm assuming latency/jitter). Would restricting > this check to private VMAs be sufficient? The problem we ran into was that prefetches were not working, but yes it would also cause extra latencies and jitter and in general is unnecessary overhead. It is super easy to reproduce. Just run main() {for(;;);} It will eventually get some of its pages unmapped. Yes doing it for private only would be fine. I'll add a check for that. -Andi