linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Ankur Arora <ankur.a.arora@oracle.com>
To: pasha.tatashin@soleen.com
Cc: axelrasmussen@google.com, david@redhat.com, jiaqiyan@google.com,
	jthoughton@google.com, linmiaohe@huawei.com, linux-mm@kvack.org,
	lsf-pc@lists.linux-foundation.org, mhocko@suse.com,
	mike.kravetz@oracle.com, naoya.horiguchi@nec.com,
	peterx@redhat.com, rientjes@google.com, shy828301@gmail.com,
	willy@infradead.org, yosryahmed@google.com, ziy@nvidia.com,
	ankur.a.arora@oracle.com
Subject: Re: [LSF/MM/BPF TOPIC] HGM for hugetlbfs
Date: Fri,  9 Jun 2023 12:04:57 -0700	[thread overview]
Message-ID: <20230609190457.2028958-1-ankur.a.arora@oracle.com> (raw)
In-Reply-To: <CA+CK2bDNpqMkXmWATCyKyGXK294G3gU_TraxMXUVDz+n7PZW4w@mail.gmail.com>

> > > Hate to even bring this up, but there are complaints today about 'allocation
> > > time' of 1GB pages from the hugetlb pool.  This 'allocation time' is actually
> > > the time it takes to clear/zero 1G of memory.  Only reason I mention is
> > > using something like CMA to allocate 1G pages (at fault time) may add
> > > unacceptable latency.
> >
> > One solution I had in mind is that you could zero these 1GB pages at free
> > time in a worker thread, so that you do not pay the penalty at page allocation
> > time. But it would not work if the allocation comes right after a page is
> > freed.
> 
> In addition, there were several proposals to speed zeroing of huge pages:
> 
> 1. X86 specific: Cannon Matthews proposed "clear 1G pages with
> streaming stores on x86" change.
> https://lore.kernel.org/linux-mm/20200307010353.172991-1-cannonmatthews@google.com
> 
> This speeds up setting up 1G pages by roughly 4 times.
> 
> 2. X86 specific: Kirill and Andi proposed also proposed a similar
> change even earlier:
> https://lore.kernel.org/all/1345470757-12005-1-git-send-email-kirill.shutemov@linux.intel.com

Also, this one more recently from me:
  https://lore.kernel.org/all/20220606202109.1306034-1-ankur.a.arora@oracle.com/

Linus had some comments on the overall approach and I had sent out this
as follow-up:
  https://lore.kernel.org/all/20230403052233.1880567-1-ankur.a.arora@oracle.com/

> 3. Arch Generic: Ktasks https://lwn.net/Articles/770826
> That allows zeroing HugeTLB pages in Parallel.
> 
> 4. VM Specific: https://lwn.net/Articles/931933/
> Allows to lazyly zero 1G pages in the guest.
> 
> I looked through the (1) proposal and did not see any major pushbacks,
> I do not see why movnti can't be used specifically for gigantic pages.

AFAICT, the recent concerns are mostly around proper API, and in
encapsulating MOVNTI like primitives such that they can be safely
used.


Ankur


  reply	other threads:[~2023-06-09 19:05 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-06 19:19 Mike Kravetz
2023-03-14 15:37 ` James Houghton
2023-04-12  1:44   ` David Rientjes
2023-05-24 20:26 ` James Houghton
2023-05-26  3:00   ` David Rientjes
     [not found]     ` <20230602172723.GA3941@monkey>
2023-06-06 22:40       ` David Rientjes
2023-06-07  7:38         ` David Hildenbrand
2023-06-07  7:51           ` Yosry Ahmed
2023-06-07  8:13             ` David Hildenbrand
2023-06-07 22:06               ` Mike Kravetz
2023-06-08  0:02                 ` David Rientjes
2023-06-08  6:34                   ` David Hildenbrand
2023-06-08 18:50                     ` Yang Shi
2023-06-08 21:23                       ` Mike Kravetz
2023-06-09  1:57                         ` Zi Yan
2023-06-09 15:17                           ` Pasha Tatashin
2023-06-09 19:04                             ` Ankur Arora [this message]
2023-06-09 19:57                           ` Matthew Wilcox
2023-06-08 20:10                     ` Matthew Wilcox
2023-06-09  2:59                       ` David Rientjes
2023-06-13 14:59                       ` Jason Gunthorpe
2023-06-13 15:15                         ` David Hildenbrand
2023-06-13 15:45                           ` Peter Xu
2023-06-08 21:54                 ` [Lsf-pc] " Dan Williams
2023-06-08 22:35                   ` Mike Kravetz
2023-06-09  3:36                     ` Dan Williams
2023-06-09 20:20                       ` James Houghton
2023-06-13 15:17                         ` Jason Gunthorpe
2023-06-07 14:40           ` Matthew Wilcox

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=20230609190457.2028958-1-ankur.a.arora@oracle.com \
    --to=ankur.a.arora@oracle.com \
    --cc=axelrasmussen@google.com \
    --cc=david@redhat.com \
    --cc=jiaqiyan@google.com \
    --cc=jthoughton@google.com \
    --cc=linmiaohe@huawei.com \
    --cc=linux-mm@kvack.org \
    --cc=lsf-pc@lists.linux-foundation.org \
    --cc=mhocko@suse.com \
    --cc=mike.kravetz@oracle.com \
    --cc=naoya.horiguchi@nec.com \
    --cc=pasha.tatashin@soleen.com \
    --cc=peterx@redhat.com \
    --cc=rientjes@google.com \
    --cc=shy828301@gmail.com \
    --cc=willy@infradead.org \
    --cc=yosryahmed@google.com \
    --cc=ziy@nvidia.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