[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <SN7PR11MB75907B372E6A2D273A6AFFA9E136A@SN7PR11MB7590.namprd11.prod.outlook.com>
Date: Wed, 12 Jul 2023 00:15:24 +0000
From: "Ma, Yu" <yu.ma@...el.com>
To: Andrew Morton <akpm@...ux-foundation.org>
CC: "Liam.Howlett@...cle.com" <Liam.Howlett@...cle.com>,
"kirill@...temov.name" <kirill@...temov.name>,
"Williams, Dan J" <dan.j.williams@...el.com>,
"Hansen, Dave" <dave.hansen@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"Zhu, Lipeng" <lipeng.zhu@...el.com>,
"Deng, Pan" <pan.deng@...el.com>,
"shakeelb@...gle.com" <shakeelb@...gle.com>,
"Li, Tianyou" <tianyou.li@...el.com>,
"Chen, Tim C" <tim.c.chen@...el.com>,
"tim.c.chen@...ux.intel.com" <tim.c.chen@...ux.intel.com>
Subject: RE: [PATCH v2] mm/mmap: move vma operations to mm_struct out of the
critical section of file mapping lock
> -----Original Message-----
> From: Andrew Morton <akpm@...ux-foundation.org>
> Sent: Wednesday, July 12, 2023 2:28 AM
> To: Ma, Yu <yu.ma@...el.com>
> Cc: Liam.Howlett@...cle.com; kirill@...temov.name; Williams, Dan J
> <dan.j.williams@...el.com>; Hansen, Dave <dave.hansen@...el.com>; linux-
> kernel@...r.kernel.org; linux-mm@...ck.org; Zhu, Lipeng
> <lipeng.zhu@...el.com>; Deng, Pan <pan.deng@...el.com>;
> shakeelb@...gle.com; Li, Tianyou <tianyou.li@...el.com>; Chen, Tim C
> <tim.c.chen@...el.com>; tim.c.chen@...ux.intel.com
> Subject: Re: [PATCH v2] mm/mmap: move vma operations to mm_struct out
> of the critical section of file mapping lock
>
> On Tue, 11 Jul 2023 13:20:20 -0400 Yu Ma <yu.ma@...el.com> wrote:
>
> > UnixBench/Execl represents a class of workload where bash scripts are
> > spawned frequently to do some short jobs. When running multiple
> > parallel tasks, hot osq_lock is observed from do_mmap and exit_mmap.
> > Both of them come from load_elf_binary through the call chain
> > "execl->do_execveat_common->bprm_execve->load_elf_binary". In
> > do_mmap,it will call mmap_region to create vma node, initialize it and
> > insert it to vma maintain structure in mm_struct and i_mmap tree of
> > the mapping file, then increase map_count to record the number of vma
> > nodes used. The hot osq_lock is to protect operations on file’s i_mmap
> > tree. For the mm_struct member change like vma insertion and map_count
> > update, they do not affect i_mmap tree. Move those operations out of
> > the lock's critical section, to reduce hold time on the lock.
> >
> > With this change, on Intel Sapphire Rapids 112C/224T platform, based
> > on v6.0-rc6, the 160 parallel score improves by 12%. The patch has no
> > obvious performance gain on v6.4-rc4 due to regression of this
> > benchmark from this commit f1a7941243c102a44e8847e3b94ff4ff3ec56f25
> > (mm: convert mm's rss stats into percpu_counter). Related discussion
> > and conclusion can be referred at the mail thread initiated by 0day as
> below:
> > Link:
> > https://lore.kernel.org/linux-mm/a4aa2e13-7187-600b-c628-
> 7e8fb108def0@
> > intel.com/
>
> Could you please redo/retest this against a kernel which has
> 1c7873e3364 ("mm: lock newly mapped VMA with corrected ordering")?
> mainline, mm-unstable or linux-next.
>
OK, no problem.
Regards
Yu
Powered by blists - more mailing lists