Re: [PATCH] mm: don't zero ballooned pages

2017-10-26 Thread ZhenweiPi
On 07/31/2017 03:51 PM, Michal Hocko wrote: On Mon 31-07-17 15:41:49, Wei Wang wrote: >On 07/31/2017 02:55 PM, Michal Hocko wrote: > >On Mon 31-07-17 12:13:33, Wei Wang wrote: > >>Ballooned pages will be marked as MADV_DONTNEED by the hypervisor and > >>shouldn't be given to the host ksmd to

Re: [PATCH] mm: don't zero ballooned pages

2017-10-26 Thread ZhenweiPi
on qemu upstream, code in qemu/util/osdep.c int qemu_madvise(void *addr, size_t len, int advice) { if (advice == QEMU_MADV_INVALID) { errno = EINVAL; return -1; } #if defined(CONFIG_MADVISE) return madvise(addr, len, advice); #elif

Re: [PATCH] mm: don't zero ballooned pages

2017-08-01 Thread Michael S. Tsirkin
On Mon, Jul 31, 2017 at 10:37:24AM +0200, Michal Hocko wrote: > On Mon 31-07-17 16:23:26, ZhenweiPi wrote: > > On 07/31/2017 03:51 PM, Michal Hocko wrote: > > > > >On Mon 31-07-17 15:41:49, Wei Wang wrote: > > >>>On 07/31/2017 02:55 PM, Michal Hocko wrote: > > >On Mon 31-07-17 12:13:33, Wei

Re: [PATCH] mm: don't zero ballooned pages

2017-07-31 Thread Michal Hocko
On Mon 31-07-17 16:23:26, ZhenweiPi wrote: > On 07/31/2017 03:51 PM, Michal Hocko wrote: > > >On Mon 31-07-17 15:41:49, Wei Wang wrote: > >>>On 07/31/2017 02:55 PM, Michal Hocko wrote: > >On Mon 31-07-17 12:13:33, Wei Wang wrote: > > >>Ballooned pages will be marked as MADV_DONTNEED by

Re: [PATCH] mm: don't zero ballooned pages

2017-07-31 Thread Michal Hocko
On Mon 31-07-17 15:41:49, Wei Wang wrote: > On 07/31/2017 02:55 PM, Michal Hocko wrote: > >On Mon 31-07-17 12:13:33, Wei Wang wrote: > >>Ballooned pages will be marked as MADV_DONTNEED by the hypervisor and > >>shouldn't be given to the host ksmd to scan. > >Could you point me where this

Re: [PATCH] mm: don't zero ballooned pages

2017-07-31 Thread Wei Wang
On 07/31/2017 02:55 PM, Michal Hocko wrote: On Mon 31-07-17 12:13:33, Wei Wang wrote: Ballooned pages will be marked as MADV_DONTNEED by the hypervisor and shouldn't be given to the host ksmd to scan. Could you point me where this MADV_DONTNEED is done, please? Sure. It's done in the

Re: [PATCH] mm: don't zero ballooned pages

2017-07-31 Thread Michal Hocko
On Mon 31-07-17 12:13:33, Wei Wang wrote: > Ballooned pages will be marked as MADV_DONTNEED by the hypervisor and > shouldn't be given to the host ksmd to scan. Could you point me where this MADV_DONTNEED is done, please? > Therefore, it is not > necessary to zero ballooned pages, which is very

[PATCH] mm: don't zero ballooned pages

2017-07-30 Thread Wei Wang
Ballooned pages will be marked as MADV_DONTNEED by the hypervisor and shouldn't be given to the host ksmd to scan. Therefore, it is not necessary to zero ballooned pages, which is very time consuming when the page amount is large. The ongoing fast balloon tests show that the time to balloon 7G