From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759449AbZD2QIJ (ORCPT ); Wed, 29 Apr 2009 12:08:09 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757899AbZD2QHx (ORCPT ); Wed, 29 Apr 2009 12:07:53 -0400 Received: from mail-qy0-f196.google.com ([209.85.221.196]:60181 "EHLO mail-qy0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754012AbZD2QHw convert rfc822-to-8bit (ORCPT ); Wed, 29 Apr 2009 12:07:52 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=fsmefQq7kx5P2NKa8k59aynEsssUgAdz2ziBAKVb63tQWgf6o8gEMZTkyEN1ANqygD hQXeVztQmOnqWnOuGp3J4kxGPNV5bXtk2BQdWHziBicUZ0ydcSGV4DmOx3orJ/hBNgbW oni+8AWu/zcJ9u1broDLx5B/yWgZ+KxgqK3Gg= MIME-Version: 1.0 In-Reply-To: <20090429114708.66114c03@cuia.bos.redhat.com> References: <20090428044426.GA5035@eskimo.com> <20090428192907.556f3a34@bree.surriel.com> <1240987349.4512.18.camel@laptop> <20090429114708.66114c03@cuia.bos.redhat.com> Date: Thu, 30 Apr 2009 01:07:51 +0900 X-Google-Sender-Auth: 13702ed1c39fa3f9 Message-ID: <2f11576a0904290907g48e94e74ye97aae593f6ac519@mail.gmail.com> Subject: Re: [PATCH] vmscan: evict use-once pages first (v2) From: KOSAKI Motohiro To: Rik van Riel Cc: Peter Zijlstra , Elladan , linux-kernel@vger.kernel.org, tytso@mit.edu, linux-mm@kvack.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Looks good than previous version. but I have one question. > diff --git a/mm/vmscan.c b/mm/vmscan.c > index eac9577..4471dcb 100644 > --- a/mm/vmscan.c > +++ b/mm/vmscan.c > @@ -1489,6 +1489,18 @@ static void shrink_zone(int priority, struct zone *zone, >                        nr[l] = scan; >        } > > +       /* > +        * When the system is doing streaming IO, memory pressure here > +        * ensures that active file pages get deactivated, until more > +        * than half of the file pages are on the inactive list. > +        * > +        * Once we get to that situation, protect the system's working > +        * set from being evicted by disabling active file page aging. > +        * The logic in get_scan_ratio protects anonymous pages. > +        */ > +       if (nr[LRU_INACTIVE_FILE] > nr[LRU_ACTIVE_FILE]) > +               nr[LRU_ACTIVE_FILE] = 0; > + >        while (nr[LRU_INACTIVE_ANON] || nr[LRU_ACTIVE_FILE] || >                                        nr[LRU_INACTIVE_FILE]) { >                for_each_evictable_lru(l) { we handle active_anon vs inactive_anon ratio by shrink_list(). Why do you insert this logic insert shrink_zone() ? 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 SMTP id B00296B003D for ; Wed, 29 Apr 2009 12:07:45 -0400 (EDT) Received: by yx-out-1718.google.com with SMTP id 36so688269yxh.26 for ; Wed, 29 Apr 2009 09:07:51 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20090429114708.66114c03@cuia.bos.redhat.com> References: <20090428044426.GA5035@eskimo.com> <20090428192907.556f3a34@bree.surriel.com> <1240987349.4512.18.camel@laptop> <20090429114708.66114c03@cuia.bos.redhat.com> Date: Thu, 30 Apr 2009 01:07:51 +0900 Message-ID: <2f11576a0904290907g48e94e74ye97aae593f6ac519@mail.gmail.com> Subject: Re: [PATCH] vmscan: evict use-once pages first (v2) From: KOSAKI Motohiro Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Sender: owner-linux-mm@kvack.org To: Rik van Riel Cc: Peter Zijlstra , Elladan , linux-kernel@vger.kernel.org, tytso@mit.edu, linux-mm@kvack.org List-ID: Hi Looks good than previous version. but I have one question. > diff --git a/mm/vmscan.c b/mm/vmscan.c > index eac9577..4471dcb 100644 > --- a/mm/vmscan.c > +++ b/mm/vmscan.c > @@ -1489,6 +1489,18 @@ static void shrink_zone(int priority, struct zone = *zone, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0nr[l] =3D scan; > =A0 =A0 =A0 =A0} > > + =A0 =A0 =A0 /* > + =A0 =A0 =A0 =A0* When the system is doing streaming IO, memory pressure= here > + =A0 =A0 =A0 =A0* ensures that active file pages get deactivated, until = more > + =A0 =A0 =A0 =A0* than half of the file pages are on the inactive list. > + =A0 =A0 =A0 =A0* > + =A0 =A0 =A0 =A0* Once we get to that situation, protect the system's wo= rking > + =A0 =A0 =A0 =A0* set from being evicted by disabling active file page a= ging. > + =A0 =A0 =A0 =A0* The logic in get_scan_ratio protects anonymous pages. > + =A0 =A0 =A0 =A0*/ > + =A0 =A0 =A0 if (nr[LRU_INACTIVE_FILE] > nr[LRU_ACTIVE_FILE]) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 nr[LRU_ACTIVE_FILE] =3D 0; > + > =A0 =A0 =A0 =A0while (nr[LRU_INACTIVE_ANON] || nr[LRU_ACTIVE_FILE] || > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0nr[LRU_INACTIVE_FILE]) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0for_each_evictable_lru(l) { we handle active_anon vs inactive_anon ratio by shrink_list(). Why do you insert this logic insert shrink_zone() ? -- 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/ . Don't email: email@kvack.org