All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ray Fucillo <Ray.Fucillo@intersystems.com>
To: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Ray Fucillo <Ray.Fucillo@intersystems.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-mm <linux-mm@kvack.org>
Subject: Re: scalability regressions related to hugetlb_fault() changes
Date: Fri, 25 Mar 2022 00:02:08 +0000	[thread overview]
Message-ID: <8E9438A4-56BF-4DBF-9424-2161A488352B@intersystems.com> (raw)
In-Reply-To: <e4cfa252-7be8-48b2-9f19-019bcc0038af@oracle.com>


> On Mar 24, 2022, at 6:41 PM, Mike Kravetz <mike.kravetz@oracle.com> wrote:
> 
> I also seem to remember thinking about the possibility of
> avoiding the synchronization if pmd sharing was not possible.  That may be
> a relatively easy way to speed things up.  Not sure if pmd sharing comes
> into play in your customer environments, my guess would be yes (shared
> mappings ranges more than 1GB in size and aligned to 1GB).

Hi Mike, 

This is one very large shared memory segment allocated at database startup.  It's common for it to be hundreds of GB.  We allocate it with shmget() passing SHM_HUGETLB (when huge pages have been reserved for us).  Not sure if that answers...

> Also, do you have any specifics about the regressions your customers are
> seeing?  Specifically what paths are holding i_mmap_rwsem in write mode
> for long periods of time.  I would expect something related to unmap.
> Truncation can have long hold times especially if there are may shared
> mapping.  Always worth checking specifics, but more likely this is a general
> issue.

We've seen the write lock originate from calling shmat(), shmdt() and process exit.  We've also seen it from a fork() off of one of the processes that are attached to the shared memory segment.  Some evidence suggests that fork is a more costly case.  However, while there are some important places where we'd use fork(), it's more unusual because most process creation will vfork() and execv() a new database process (which then attaches with shmat()).

  reply	other threads:[~2022-03-25  0:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-24 20:12 scalability regressions related to hugetlb_fault() changes Ray Fucillo
2022-03-24 21:55 ` Randy Dunlap
2022-03-24 22:41   ` Mike Kravetz
2022-03-25  0:02     ` Ray Fucillo [this message]
2022-03-25  4:40       ` Mike Kravetz
2022-03-25 13:33         ` Ray Fucillo
2022-03-28 18:30           ` Mike Kravetz
2022-03-30 12:22 ` Thorsten Leemhuis

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=8E9438A4-56BF-4DBF-9424-2161A488352B@intersystems.com \
    --to=ray.fucillo@intersystems.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mike.kravetz@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.