linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Ma, Yu" <yu.ma@intel.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Liam.Howlett@Oracle.com" <Liam.Howlett@Oracle.com>,
	"kirill@shutemov.name" <kirill@shutemov.name>,
	"Williams, Dan J" <dan.j.williams@intel.com>,
	"Hansen, Dave" <dave.hansen@intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"Zhu, Lipeng" <lipeng.zhu@intel.com>,
	"Deng, Pan" <pan.deng@intel.com>,
	"shakeelb@google.com" <shakeelb@google.com>,
	"Li, Tianyou" <tianyou.li@intel.com>,
	"Chen, Tim C" <tim.c.chen@intel.com>,
	"tim.c.chen@linux.intel.com" <tim.c.chen@linux.intel.com>
Subject: RE: [PATCH v2] mm/mmap: move vma operations to mm_struct out of the critical section of file mapping lock
Date: Wed, 12 Jul 2023 00:15:24 +0000	[thread overview]
Message-ID: <SN7PR11MB75907B372E6A2D273A6AFFA9E136A@SN7PR11MB7590.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20230711112824.e559065488b08ce649cccfd7@linux-foundation.org>

> -----Original Message-----
> From: Andrew Morton <akpm@linux-foundation.org>
> Sent: Wednesday, July 12, 2023 2:28 AM
> To: Ma, Yu <yu.ma@intel.com>
> Cc: Liam.Howlett@Oracle.com; kirill@shutemov.name; Williams, Dan J
> <dan.j.williams@intel.com>; Hansen, Dave <dave.hansen@intel.com>; linux-
> kernel@vger.kernel.org; linux-mm@kvack.org; Zhu, Lipeng
> <lipeng.zhu@intel.com>; Deng, Pan <pan.deng@intel.com>;
> shakeelb@google.com; Li, Tianyou <tianyou.li@intel.com>; Chen, Tim C
> <tim.c.chen@intel.com>; tim.c.chen@linux.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@intel.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

  reply	other threads:[~2023-07-12  0:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230606124939.93561-1-yu.ma@intel.com>
     [not found] ` <20230606192013.viiifjcgb6enyilx@revolver>
2023-06-06 19:54   ` [PATCH] " Liam R. Howlett
2023-06-07 13:09     ` Ma, Yu
2023-06-21 14:20     ` Ma, Yu
2023-07-05 16:54   ` Kirill A. Shutemov
2023-07-05 17:33     ` Liam R. Howlett
2023-07-05 19:06       ` Kirill A. Shutemov
2023-07-06 15:15         ` [PATCH] mm/mmap: move vmKirill A. Shutemov <kirill@shutemov.name>a " Ma, Yu
2023-07-11 17:20           ` [PATCH v2] mm/mmap: move vma " Yu Ma
2023-07-11 18:28             ` Andrew Morton
2023-07-12  0:15               ` Ma, Yu [this message]
2023-07-12 14:57               ` [PATCH v3] " Yu Ma
2023-07-06 22:04         ` [PATCH] " Suren Baghdasaryan
2023-07-07  4:40           ` Suren Baghdasaryan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SN7PR11MB75907B372E6A2D273A6AFFA9E136A@SN7PR11MB7590.namprd11.prod.outlook.com \
    --to=yu.ma@intel.com \
    --cc=Liam.Howlett@Oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=dan.j.williams@intel.com \
    --cc=dave.hansen@intel.com \
    --cc=kirill@shutemov.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lipeng.zhu@intel.com \
    --cc=pan.deng@intel.com \
    --cc=shakeelb@google.com \
    --cc=tianyou.li@intel.com \
    --cc=tim.c.chen@intel.com \
    --cc=tim.c.chen@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox