From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f42.google.com (mail-pa0-f42.google.com [209.85.220.42]) by kanga.kvack.org (Postfix) with ESMTP id 981916B0031 for ; Tue, 15 Jul 2014 21:54:03 -0400 (EDT) Received: by mail-pa0-f42.google.com with SMTP id lf10so339007pab.29 for ; Tue, 15 Jul 2014 18:54:03 -0700 (PDT) Received: from mga03.intel.com (mga03.intel.com. [143.182.124.21]) by mx.google.com with ESMTP id ik3si4900301pbc.249.2014.07.15.18.54.01 for ; Tue, 15 Jul 2014 18:54:02 -0700 (PDT) From: "Zhang, Tianfei" Subject: About refault distance Date: Wed, 16 Jul 2014 01:53:55 +0000 Message-ID: Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_BA6F50564D52C24884F9840E07E32DEC17D58E35CDSMSX102ccrcor_" MIME-Version: 1.0 Sender: owner-linux-mm@kvack.org List-ID: To: "hannes@cmpxchg.org" Cc: "linux-mm@kvack.org" --_000_BA6F50564D52C24884F9840E07E32DEC17D58E35CDSMSX102ccrcor_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Johannes, May I ask you a question about refault distance? Is it supposed the distance of the first and second time to access the a fa= ulted page cache is the same? In reality how about the ratio will be the same? Refault Distance1 =3D Refault Distance2 On the first refault, We supposed that: Refault Distance =3D A NR_INACTIVE_FILE =3D B NR_ACTIVE_FILE =3D C * fault page add to inactive list tail The Refault Distance =3D A | * B | | C * +--------------+ | +-------------+ * reclaim <- | inactive | <-+-- demotion | active | <--+ * +--------------+ +-------------+ | * | | * +-------------- promotion ------------------+ Why we use A <=3D C to add faulted page to ACTIVE LIST? Your patch is want to solve "A workload is thrashing when its pages are fre= quently used but they are evicted from the inactive list every time before another acces= s would have promoted them to the active list." ? so when a First Refault page add to INACTIVE LIST, it is a Distance B befor= e eviction. So I am confuse the condition on workingset_refault(). Best, Figo.zhang --_000_BA6F50564D52C24884F9840E07E32DEC17D58E35CDSMSX102ccrcor_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi J= ohannes,

 

May = I ask you a question about refault distance?

 

Is i= t supposed the distance of the first and second time to access the a faulte= d page cache is the same? In reality how about the

rati= o will be the same?

 

&nbs= p;           Refault Dist= ance1 =3D Refault Distance2

 

On t= he first refault, We supposed that:

&nbs= p;           Refault Dist= ance =3D A

&nbs= p;           NR_INACTIVE_= FILE =3D B

&nbs= p;           NR_ACTIVE_FI= LE =3D C

 

*         &= nbsp;        fault page add to inac= tive list tail

        &nb= sp;           The Refault= Distance  =3D A

        &nb= sp;            =      |

&nbs= p;*            =        B     |  = ;      |       =      C

*&nb= sp;             = ;+--------------+   |      =       +-------------+

*&nb= sp;  reclaim <- |   inactive   | <-+-- d= emotion |    active   | <--+

*&nb= sp;            = +--------------+        &n= bsp;       +-------------+  = ;  |

*&nb= sp;            =         |     &= nbsp;           &nbs= p;            &= nbsp;            |

*&nb= sp;            =         +-------------- promotion --= ----------------+

 

 

Why = we use A <=3D C to add faulted page to ACTIVE LIST?

 

Your= patch is want to solve “A workload is thrashing when its pages are f= requently used

but = they are evicted from the inactive list every time before another access wo= uld have

prom= oted them to the active list.” ?

 

so w= hen a First Refault page add to INACTIVE LIST, it is a Distance B before ev= iction.

So I= am confuse the condition on workingset_refault().

 

 

Best= ,

Figo= .zhang

--_000_BA6F50564D52C24884F9840E07E32DEC17D58E35CDSMSX102ccrcor_-- -- 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