From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nadav Amit Subject: Re: [lkp-robot] [mm] 7674270022: will-it-scale.per_process_ops -19.3% regression Date: Tue, 8 Aug 2017 01:16:08 -0700 Message-ID: References: <20170802000818.4760-7-namit@vmware.com> <20170808011923.GE25554@yexl-desktop> <20170808022830.GA28570@bbox> <93CA4B47-95C2-43A2-8E92-B142CAB1DAF7@gmail.com> <970B5DC5-BFC2-461E-AC46-F71B3691D301@gmail.com> <20170808080821.GA31730@bbox> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="f403045e3dfa58c50c0556399359" Return-path: In-Reply-To: <20170808080821.GA31730@bbox> Sender: owner-linux-mm@kvack.org To: Minchan Kim Cc: linux-arch@vger.kernel.org, Ingo Molnar , Jeff Dike , Andrew Morton , Martin Schwidefsky , Heiko Carstens , "David S. Miller" , lkp@01.org, Russell King , Tony Luck , Yoshinori Sato , "open list:MEMORY MANAGEMENT" , LKML , kernel test robot List-Id: linux-arch.vger.kernel.org --f403045e3dfa58c50c0556399359 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Aug 8, 2017 01:08, "Minchan Kim" wrote: On Mon, Aug 07, 2017 at 10:51:00PM -0700, Nadav Amit wrote: > Nadav Amit wrote: > > > Minchan Kim wrote: > > > >> Hi, > >> > >> On Tue, Aug 08, 2017 at 09:19:23AM +0800, kernel test robot wrote: > >>> Greeting, > >>> > >>> FYI, we noticed a -19.3% regression of will-it-scale.per_process_ops due to commit: > >>> > >>> > >>> commit: 76742700225cad9df49f05399381ac3f1ec3dc60 ("mm: fix MADV_[FREE|DONTNEED] TLB flush miss problem") > >>> url: https://github.com/0day-ci/linux/commits/Nadav-Amit/mm- migrate-prevent-racy-access-to-tlb_flush_pending/20170802-205715 > >>> > >>> > >>> in testcase: will-it-scale > >>> on test machine: 88 threads Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz with 64G memory > >>> with following parameters: > >>> > >>> nr_task: 16 > >>> mode: process > >>> test: brk1 > >>> cpufreq_governor: performance > >>> > >>> test-description: Will It Scale takes a testcase and runs it from 1 through to n parallel copies to see if the testcase will scale. It builds both a process and threads based test in order to see any differences between the two. > >>> test-url: https://github.com/antonblanchard/will-it-scale > >> > >> Thanks for the report. > >> Could you explain what kinds of workload you are testing? > >> > >> Does it calls frequently madvise(MADV_DONTNEED) in parallel on multipl= e > >> threads? > > > > According to the description it is "testcase:brk increase/decrease of one > > page=E2=80=9D. According to the mode it spawns multiple processes, not = threads. > > > > Since a single page is unmapped each time, and the iTLB-loads increase > > dramatically, I would suspect that for some reason a full TLB flush is > > caused during do_munmap(). > > > > If I find some free time, I=E2=80=99ll try to profile the workload - bu= t feel free > > to beat me to it. > > The root-cause appears to be that tlb_finish_mmu() does not call > dec_tlb_flush_pending() - as it should. Any chance you can take care of it? Oops, but with second looking, it seems it's not my fault. ;-) https://marc.info/?l=3Dlinux-mm&m=3D150156699114088&w=3D2 Err... Sorry for that... --f403045e3dfa58c50c0556399359 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Aug 8, 2017 01:08, "Minchan Kim" <minchan@kernel.org> wrote:
On Mon, A= ug 07, 2017 at 10:51:00PM -0700, Nadav Amit wrote:
> Nadav Amit <nadav.amit@gmai= l.com> wrote:
>
> > Minchan Kim <minchan@ker= nel.org> wrote:
> >
> >> Hi,
> >>
> >> On Tue, Aug 08, 2017 at 09:19:23AM +0800, kernel test robot w= rote:
> >>> Greeting,
> >>>
> >>> FYI, we noticed a -19.3% regression of will-it-scale.per_= process_ops due to commit:
> >>>
> >>>
> >>> commit: 76742700225cad9df49f05399381ac3f1ec3dc60 (&q= uot;mm: fix MADV_[FREE|DONTNEED] TLB flush miss problem")
> >>> url: https://github.com/0day-ci/l= inux/commits/Nadav-Amit/mm-migrate-prevent-racy-access-to-tlb_flu= sh_pending/20170802-205715
> >>>
> >>>
> >>> in testcase: will-it-scale
> >>> on test machine: 88 threads Intel(R) Xeon(R) CPU E5-2699 = v4 @ 2.20GHz with 64G memory
> >>> with following parameters:
> >>>
> >>>=C2=A0 =C2=A0nr_task: 16
> >>>=C2=A0 =C2=A0mode: process
> >>>=C2=A0 =C2=A0test: brk1
> >>>=C2=A0 =C2=A0cpufreq_governor: performance
> >>>
> >>> test-description: Will It Scale takes a testcase and runs= it from 1 through to n parallel copies to see if the testcase will scale. = It builds both a process and threads based test in order to see any differe= nces between the two.
> >>> test-url: https://github.com/a= ntonblanchard/will-it-scale
> >>
> >> Thanks for the report.
> >> Could you explain what kinds of workload you are testing?
> >>
> >> Does it calls frequently madvise(MADV_DONTNEED) in parallel o= n multiple
> >> threads?
> >
> > According to the description it is "testcase:brk increase/de= crease of one
> > page=E2=80=9D. According to the mode it spawns multiple processes= , not threads.
> >
> > Since a single page is unmapped each time, and the iTLB-loads inc= rease
> > dramatically, I would suspect that for some reason a full TLB flu= sh is
> > caused during do_munmap().
> >
> > If I find some free time, I=E2=80=99ll try to profile the workloa= d - but feel free
> > to beat me to it.
>
> The root-cause appears to be that tlb_finish_mmu() does not call
> dec_tlb_flush_pending() - as it should. Any chance you can take care o= f it?

Oops, but with second looking, it seems it's not my fault. ;-) https://marc.info/?l=3Dlinux-mm&= ;m=3D150156699114088&w=3D2

E= rr... Sorry for that...

<= /div>
--f403045e3dfa58c50c0556399359-- -- 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