Re: [RFC v2 PATCH 0/4] speed up page allocation for __GFP_ZERO

2021-01-05 Thread David Hildenbrand
On 05.01.21 11:22, Liang Li wrote: That‘s mostly already existing scheduling logic, no? (How many vms can I put onto a specific machine eventually) >>> >>> It depends on how the scheduling component is designed. Yes, you can put >>> 10 VMs with 4C8G(4CPU, 8G RAM) on a host and 20 VMs wit

Re: [RFC v2 PATCH 0/4] speed up page allocation for __GFP_ZERO

2021-01-05 Thread Liang Li
> >> That‘s mostly already existing scheduling logic, no? (How many vms can I > >> put onto a specific machine eventually) > > > > It depends on how the scheduling component is designed. Yes, you can put > > 10 VMs with 4C8G(4CPU, 8G RAM) on a host and 20 VMs with 2C4G on > > another one. But if o

Re: [RFC v2 PATCH 0/4] speed up page allocation for __GFP_ZERO

2021-01-05 Thread David Hildenbrand
On 05.01.21 03:14, Liang Li wrote: > In our production environment, there are three main applications have such > requirement, one is QEMU [creating a VM with SR-IOV passthrough device], > anther other two are DPDK related applications, DPDK OVS and SPDK vhost, > for best performanc

Re: [RFC v2 PATCH 0/4] speed up page allocation for __GFP_ZERO

2021-01-04 Thread Liang Li
> >>> In our production environment, there are three main applications have such > >>> requirement, one is QEMU [creating a VM with SR-IOV passthrough device], > >>> anther other two are DPDK related applications, DPDK OVS and SPDK vhost, > >>> for best performance, they populate memory when starti

Re: [RFC v2 PATCH 0/4] speed up page allocation for __GFP_ZERO

2021-01-04 Thread David Hildenbrand
> Am 23.12.2020 um 13:12 schrieb Liang Li : > > On Wed, Dec 23, 2020 at 4:41 PM David Hildenbrand wrote: >> >> [...] >> I was rather saying that for security it's of little use IMHO. Application/VM start up time might be improved by using huge pages (and pre-zeroing these). Fr

Re: [RFC v2 PATCH 0/4] speed up page allocation for __GFP_ZERO

2021-01-04 Thread Liang Li
On Mon, Jan 4, 2021 at 8:56 PM Michal Hocko wrote: > > On Mon 21-12-20 11:25:22, Liang Li wrote: > [...] > > Security > > > > This is a weak version of "introduce init_on_alloc=1 and init_on_free=1 > > boot options", which zero out page in a asynchronous way. For users can't > > tolerate

Re: [RFC v2 PATCH 0/4] speed up page allocation for __GFP_ZERO

2021-01-04 Thread Liang Li
> > Win or not depends on its effect. For our case, it solves the issue > > that we faced, so it can be thought as a win for us. If others don't > > have the issue we faced, the result will be different, maybe they will > > be affected by the side effect of this feature. I think this is your > > c

Re: [RFC v2 PATCH 0/4] speed up page allocation for __GFP_ZERO

2021-01-04 Thread Michal Hocko
On Mon 21-12-20 11:25:22, Liang Li wrote: [...] > Security > > This is a weak version of "introduce init_on_alloc=1 and init_on_free=1 > boot options", which zero out page in a asynchronous way. For users can't > tolerate the impaction of 'init_on_alloc=1' or 'init_on_free=1' brings, > thi

Re: [RFC v2 PATCH 0/4] speed up page allocation for __GFP_ZERO

2021-01-04 Thread Michal Hocko
On Tue 22-12-20 22:42:13, Liang Li wrote: > > > = > > > QEMU use 4K pages, THP is off > > > round1 round2 round3 > > > w/o this patch:23.5s 24.7s 24.6s > > > w/ this patch: 10.2s 10.3s 11

Re: [RFC v2 PATCH 0/4] speed up page allocation for __GFP_ZERO

2020-12-23 Thread Liang Li
On Wed, Dec 23, 2020 at 4:41 PM David Hildenbrand wrote: > > [...] > > >> I was rather saying that for security it's of little use IMHO. > >> Application/VM start up time might be improved by using huge pages (and > >> pre-zeroing these). Free page reporting might be improved by using > >> MADV_FR

Re: [RFC v2 PATCH 0/4] speed up page allocation for __GFP_ZERO

2020-12-23 Thread David Hildenbrand
[...] >> I was rather saying that for security it's of little use IMHO. >> Application/VM start up time might be improved by using huge pages (and >> pre-zeroing these). Free page reporting might be improved by using >> MADV_FREE instead of MADV_DONTNEED in the hypervisor. >> >>> this feature, abo

Re: [RFC v2 PATCH 0/4] speed up page allocation for __GFP_ZERO

2020-12-22 Thread Alexander Duyck
On Mon, Dec 21, 2020 at 8:25 AM Liang Li wrote: > > The first version can be found at: https://lkml.org/lkml/2020/4/12/42 > > Zero out the page content usually happens when allocating pages with > the flag of __GFP_ZERO, this is a time consuming operation, it makes > the population of a large vma

Re: [RFC v2 PATCH 0/4] speed up page allocation for __GFP_ZERO

2020-12-22 Thread Daniel Jordan
Liang Li writes: > The first version can be found at: https://lkml.org/lkml/2020/4/12/42 > > Zero out the page content usually happens when allocating pages with > the flag of __GFP_ZERO, this is a time consuming operation, it makes > the population of a large vma area very slowly. This patch intr

Re: [RFC v2 PATCH 0/4] speed up page allocation for __GFP_ZERO

2020-12-22 Thread Liang Li
> > = > > QEMU use 4K pages, THP is off > > round1 round2 round3 > > w/o this patch:23.5s 24.7s 24.6s > > w/ this patch: 10.2s 10.3s 11.2s > > > > QEMU use 4K pages, THP is on > >

Re: [RFC v2 PATCH 0/4] speed up page allocation for __GFP_ZERO

2020-12-22 Thread Liang Li
https://static.sched.com/hosted_files/kvmforum2020/51/The%20Practice%20Method%20to%20Speed%20Up%2010x%20Boot-up%20Time%20for%20Guest%20in%20Alibaba%20Cloud.pdf > > > > and the flowing link is mine: > > https://static.sched.com/hosted_files/kvmforum2020/90/Speed%20Up%20Creation%20of%20a%20VM%20With%

Re: [RFC v2 PATCH 0/4] speed up page allocation for __GFP_ZERO

2020-12-22 Thread Matthew Wilcox
On Mon, Dec 21, 2020 at 11:25:22AM -0500, Liang Li wrote: > Creating a VM [64G RAM, 32 CPUs] with GPU passthrough > = > QEMU use 4K pages, THP is off > round1 round2 round3 > w/o this patch:23.5s 24.7s 2

Re: [RFC v2 PATCH 0/4] speed up page allocation for __GFP_ZERO

2020-12-22 Thread David Hildenbrand
> >>> >>> Virtulization >>> = >>> Speed up VM creation and shorten guest boot time, especially for PCI >>> SR-IOV device passthrough scenario. Compared with some of the para >>> vitalization solutions, it is easy to deploy because it’s transparent >>> to guest and can handle DMA proper

Re: [RFC v2 PATCH 0/4] speed up page allocation for __GFP_ZERO

2020-12-22 Thread Liang Li
On Tue, Dec 22, 2020 at 4:47 PM David Hildenbrand wrote: > > On 21.12.20 17:25, Liang Li wrote: > > The first version can be found at: https://lkml.org/lkml/2020/4/12/42 > > > > Zero out the page content usually happens when allocating pages with > > the flag of __GFP_ZERO, this is a time consumin

Re: [RFC v2 PATCH 0/4] speed up page allocation for __GFP_ZERO

2020-12-22 Thread David Hildenbrand
On 21.12.20 17:25, Liang Li wrote: > The first version can be found at: https://lkml.org/lkml/2020/4/12/42 > > Zero out the page content usually happens when allocating pages with > the flag of __GFP_ZERO, this is a time consuming operation, it makes > the population of a large vma area very slowl

[RFC v2 PATCH 0/4] speed up page allocation for __GFP_ZERO

2020-12-21 Thread Liang Li
The first version can be found at: https://lkml.org/lkml/2020/4/12/42 Zero out the page content usually happens when allocating pages with the flag of __GFP_ZERO, this is a time consuming operation, it makes the population of a large vma area very slowly. This patch introduce a new feature for zer