Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751039Ab3IPPkl (ORCPT ); Mon, 16 Sep 2013 11:40:41 -0400 Received: from cantor2.suse.de ([195.135.220.15]:45939 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750880Ab3IPPkk (ORCPT ); Mon, 16 Sep 2013 11:40:40 -0400 Date: Mon, 16 Sep 2013 16:40:35 +0100 From: Mel Gorman To: Peter Zijlstra Cc: Rik van Riel , Srikar Dronamraju , Ingo Molnar , Andrea Arcangeli , Johannes Weiner , Linux-MM , LKML Subject: Re: [PATCH 14/50] sched: Set the scan rate proportional to the memory usage of the task being scanned Message-ID: <20130916154035.GE22421@suse.de> References: <1378805550-29949-1-git-send-email-mgorman@suse.de> <1378805550-29949-15-git-send-email-mgorman@suse.de> <20130916151822.GE9326@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20130916151822.GE9326@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1531 Lines: 39 On Mon, Sep 16, 2013 at 05:18:22PM +0200, Peter Zijlstra wrote: > On Tue, Sep 10, 2013 at 10:31:54AM +0100, Mel Gorman wrote: > > @@ -860,9 +908,14 @@ void task_numa_fault(int node, int pages, bool migrated) > > * If pages are properly placed (did not migrate) then scan slower. > > * This is reset periodically in case of phase changes > > */ > > - if (!migrated) > > - p->numa_scan_period = min(sysctl_numa_balancing_scan_period_max, > > + if (!migrated) { > > + /* Initialise if necessary */ > > + if (!p->numa_scan_period_max) > > + p->numa_scan_period_max = task_scan_max(p); > > + > > + p->numa_scan_period = min(p->numa_scan_period_max, > > p->numa_scan_period + jiffies_to_msecs(10)); > > So the next patch changes the jiffies_to_msec() thing.. is that really > worth a whole separate patch? > No, I can collapse them. > Also, I really don't believe any of that is 'right', increasing the scan > period by a fixed amount for every !migrated page is just wrong. > At the moment Rik and I are both looking at adapting the scan rate based on whether the faults trapped since the last scan window were local or remote faults. It should be able to sensibly adapt the scan rate independently of the RSS of the process. -- Mel Gorman SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/