From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752970Ab1IWKSW (ORCPT ); Fri, 23 Sep 2011 06:18:22 -0400 Received: from smtp-out.google.com ([74.125.121.67]:44281 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752180Ab1IWKST convert rfc822-to-8bit (ORCPT ); Fri, 23 Sep 2011 06:18:19 -0400 DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=dkim-signature:mime-version:in-reply-to:references:date: message-id:subject:from:to:cc:content-type: content-transfer-encoding:x-system-of-record; b=w2DuISSNBCBkaVLy1MuJO+HXWnwfC3eRLqgU8MfXflg5pvawY3B22ZP4KBerzI9yf tlgKWRwj/inbzO0YQLQfA== MIME-Version: 1.0 In-Reply-To: <20110922161523.f5b2193f.akpm@google.com> References: <1316230753-8693-1-git-send-email-walken@google.com> <1316230753-8693-7-git-send-email-walken@google.com> <20110922161523.f5b2193f.akpm@google.com> Date: Fri, 23 Sep 2011 03:18:13 -0700 Message-ID: Subject: Re: [PATCH 6/8] kstaled: rate limit pages scanned per second. From: Michel Lespinasse To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, KAMEZAWA Hiroyuki , Dave Hansen , Andrea Arcangeli , Rik van Riel , Johannes Weiner , KOSAKI Motohiro , Hugh Dickins , Peter Zijlstra , Michael Wolf , Andrew Morton Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 22, 2011 at 4:15 PM, Andrew Morton wrote: > On Fri, 16 Sep 2011 20:39:11 -0700 > Michel Lespinasse wrote: > >> Scan some number of pages from each node every second, instead of trying to >> scan the entime memory at once and being idle for the rest of the configured >> interval. > > Well...  why?  The amount of work done per scan interval is the same > (actually, it will be slightly increased due to cache evictions). > > I think we should see a good explanation of what observed problem this > hackery^Wtweak is trying to solve.  Once that is revealed, we can > compare the proposed solution with one based on thread policy/priority > (for example). There are two aspects to this: - some people might find it nicer to have a small amount of load during the entire scan interval, rather than some spike when we trigger the scanning and some idle time afterwards. That part is highly debatable and there are probably better ways to achieve this. - jitter reduction - if we were to scan the entire memory at once without sleeping, the pages that are scanned first would have a fairly constant interval between times they are looked at; however if the time to scan pages is not constant (it could vary depending on CPU load and pages getting allocated and freed) the pages that are scanned towards the end of each scan would have a bit more jitter. This effect is reduced by trying to scan a fixed number of pages per second. > This is all rather unpleasing. Yeah, this is not my favourite patch in the series :/ Would it help if I reordered it last in the series, as it seems more controversial & the later ones don't functionally depend on it ? -- Michel "Walken" Lespinasse A program is never fully debugged until the last user dies. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail138.messagelabs.com (mail138.messagelabs.com [216.82.249.35]) by kanga.kvack.org (Postfix) with ESMTP id 3D2689000BD for ; Fri, 23 Sep 2011 06:18:23 -0400 (EDT) Received: from wpaz33.hot.corp.google.com (wpaz33.hot.corp.google.com [172.24.198.97]) by smtp-out.google.com with ESMTP id p8NAIJeu011437 for ; Fri, 23 Sep 2011 03:18:19 -0700 Received: from qyg14 (qyg14.prod.google.com [10.241.82.142]) by wpaz33.hot.corp.google.com with ESMTP id p8NAHTeM012101 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Fri, 23 Sep 2011 03:18:18 -0700 Received: by qyg14 with SMTP id 14so3791060qyg.9 for ; Fri, 23 Sep 2011 03:18:13 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20110922161523.f5b2193f.akpm@google.com> References: <1316230753-8693-1-git-send-email-walken@google.com> <1316230753-8693-7-git-send-email-walken@google.com> <20110922161523.f5b2193f.akpm@google.com> Date: Fri, 23 Sep 2011 03:18:13 -0700 Message-ID: Subject: Re: [PATCH 6/8] kstaled: rate limit pages scanned per second. From: Michel Lespinasse Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Sender: owner-linux-mm@kvack.org List-ID: To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, KAMEZAWA Hiroyuki , Dave Hansen , Andrea Arcangeli , Rik van Riel , Johannes Weiner , KOSAKI Motohiro , Hugh Dickins , Peter Zijlstra , Michael Wolf , Andrew Morton On Thu, Sep 22, 2011 at 4:15 PM, Andrew Morton wrote: > On Fri, 16 Sep 2011 20:39:11 -0700 > Michel Lespinasse wrote: > >> Scan some number of pages from each node every second, instead of trying= to >> scan the entime memory at once and being idle for the rest of the config= ured >> interval. > > Well... =A0why? =A0The amount of work done per scan interval is the same > (actually, it will be slightly increased due to cache evictions). > > I think we should see a good explanation of what observed problem this > hackery^Wtweak is trying to solve. =A0Once that is revealed, we can > compare the proposed solution with one based on thread policy/priority > (for example). There are two aspects to this: - some people might find it nicer to have a small amount of load during the entire scan interval, rather than some spike when we trigger the scanning and some idle time afterwards. That part is highly debatable and there are probably better ways to achieve this. - jitter reduction - if we were to scan the entire memory at once without sleeping, the pages that are scanned first would have a fairly constant interval between times they are looked at; however if the time to scan pages is not constant (it could vary depending on CPU load and pages getting allocated and freed) the pages that are scanned towards the end of each scan would have a bit more jitter. This effect is reduced by trying to scan a fixed number of pages per second. > This is all rather unpleasing. Yeah, this is not my favourite patch in the series :/ Would it help if I reordered it last in the series, as it seems more controversial & the later ones don't functionally depend on it ? --=20 Michel "Walken" Lespinasse A program is never fully debugged until the last user dies. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org