From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx191.postini.com [74.125.245.191]) by kanga.kvack.org (Postfix) with SMTP id A9DF16B0032 for ; Tue, 17 Sep 2013 04:22:06 -0400 (EDT) Received: by mail-vb0-f45.google.com with SMTP id e15so3633540vbg.4 for ; Tue, 17 Sep 2013 01:22:05 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20130917080502.GH22421@suse.de> References: <1378805550-29949-35-git-send-email-mgorman@suse.de> <20130917080502.GH22421@suse.de> Date: Tue, 17 Sep 2013 16:22:05 +0800 Message-ID: Subject: Re: ????: [PATCH 34/50] sched: numa: Do not trap hinting faults for shared libraries From: "Figo.zhang" Content-Type: multipart/alternative; boundary=047d7b34347c1f85af04e69004d7 Sender: owner-linux-mm@kvack.org List-ID: To: Mel Gorman Cc: ?????? , Peter Zijlstra , Rik van Riel , Srikar Dronamraju , Ingo Molnar , Andrea Arcangeli , Johannes Weiner , Linux-MM , LKML --047d7b34347c1f85af04e69004d7 Content-Type: text/plain; charset=ISO-8859-1 2013/9/17 Mel Gorman > On Tue, Sep 17, 2013 at 10:02:22AM +0800, ?????? wrote: > > index fd724bc..5d244d0 100644 > > --- a/kernel/sched/fair.c > > +++ b/kernel/sched/fair.c > > @@ -1227,6 +1227,16 @@ void task_numa_work(struct callback_head *work) > > if (!vma_migratable(vma)) > > continue; > > > > + /* > > + * Shared library pages mapped by multiple processes are > not > > + * migrated as it is expected they are cache replicated. > Avoid > > + * hinting faults in read-only file-backed mappings or the > vdso > > + * as migrating the pages will be of marginal benefit. > > + */ > > + if (!vma->vm_mm || > > + (vma->vm_file && (vma->vm_flags & (VM_READ|VM_WRITE)) > == (VM_READ))) > > + continue; > > + > > > > =?? May I ask a question, we should consider some VMAs canot be scaned > for BalanceNuma? > > (VM_DONTEXPAND | VM_RESERVED | VM_INSERTPAGE | > > VM_NONLINEAR | VM_MIXEDMAP | VM_SAO)); > > vma_migratable check covers most of the other VMAs we do not care > about. I do not see the point of checking for some of the VMA flags you > mention. Please state which of the additional flags that you think should > be checked and why. > => we should filter out the VMAs of VM_MIXEDMAP, because of it just set pte_mknuma for normal mapping pages in change_pte_range. Best, Figo.zhang > > -- > Mel Gorman > SUSE Labs > > -- > 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 > --047d7b34347c1f85af04e69004d7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable



2013/9/17 Mel Gorman <mgorman@suse.de>
On Tue, Sep 17, 2013 at 10:02:22AM +0800, ?????? wrote:
> index fd724bc..5d244d0 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -1227,6 +1227,16 @@ void task_numa_work(struct callback_head *work)=
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (!vma_migratable(vma))
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 continue;
>
> + =A0 =A0 =A0 =A0 =A0 =A0 /*
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0* Shared library pages mapped by multiple= processes are not
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0* migrated as it is expected they are cac= he replicated. Avoid
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0* hinting faults in read-only file-backed= mappings or the vdso
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0* as migrating the pages will be of margi= nal benefit.
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0*/
> + =A0 =A0 =A0 =A0 =A0 =A0 if (!vma->vm_mm ||
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (vma->vm_file && (vma->= ;vm_flags & (VM_READ|VM_WRITE)) =3D=3D (VM_READ)))
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 continue;
> +
>
> =3D?? May I ask a question, we should consider some VMAs canot be scan= ed for BalanceNuma?
> (VM_DONTEXPAND | VM_RESERVED | VM_INSERTPAGE |
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 VM_NON= LINEAR | VM_MIXEDMAP | VM_SAO));

vma_migratable check covers most of the other VMAs we do not care
about. =A0I do not see the point of checking for some of the VMA flags you<= br> mention. Please state which of the additional flags that you think should be checked and why.

=3D> we should f= ilter out the VMAs of =A0VM_MIXEDMAP, because of =A0it just set pte_mknuma = for normal mapping pages in=A0change_pte_range.

Be= st,
Figo.zhang

=A0
=A0

--
Mel Gorman
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.= =A0For more info on Linux MM,
see: http://www.linu= x-mm.org/ .
Don't email: <a href=3Dmailto:"dont@kvack.org"> email@kva= ck.org </a>

--047d7b34347c1f85af04e69004d7-- -- 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