Re: [Qemu-devel] [PATCHv5 06/10] migration: search for zero instead of dup pages

2013-04-08 Thread Paolo Bonzini
Il 08/04/2013 11:25, Peter Lieven ha scritto: >> > Actually we can use mmap+munmap to allocate a well-aligned, always zero >> > block for the RAM. > like this? This doesn't align it. I'll send a patch shortly. Paolo

Re: [Qemu-devel] [PATCHv5 06/10] migration: search for zero instead of dup pages

2013-04-08 Thread Peter Lieven
Am 08.04.2013 um 10:38 schrieb Paolo Bonzini : > Il 06/04/2013 00:06, Peter Lieven ha scritto: I think we should MADV_DONTNEED it. >> i have to correct myself, on Linux it seems that MADV_DONTNEED guarantees >> that >> subsequent reads will return a zero filled page. >> >> If I am right wi

Re: [Qemu-devel] [PATCHv5 06/10] migration: search for zero instead of dup pages

2013-04-08 Thread Peter Lieven
Am 08.04.2013 um 10:49 schrieb Kevin Wolf : > Am 08.04.2013 um 10:33 hat Peter Lieven geschrieben: >> >> Am 05.04.2013 um 21:23 schrieb Kevin Wolf : >> >>> Am 26.03.2013 um 10:58 hat Peter Lieven geschrieben: virtually all dup pages are zero pages. remove the special is_dup_page() fun

Re: [Qemu-devel] [PATCHv5 06/10] migration: search for zero instead of dup pages

2013-04-08 Thread Kevin Wolf
Am 08.04.2013 um 10:33 hat Peter Lieven geschrieben: > > Am 05.04.2013 um 21:23 schrieb Kevin Wolf : > > > Am 26.03.2013 um 10:58 hat Peter Lieven geschrieben: > >> virtually all dup pages are zero pages. remove > >> the special is_dup_page() function and use the > >> optimized buffer_find_nonzer

Re: [Qemu-devel] [PATCHv5 06/10] migration: search for zero instead of dup pages

2013-04-08 Thread Peter Lieven
Am 08.04.2013 um 10:33 schrieb Peter Lieven : > > Am 05.04.2013 um 21:23 schrieb Kevin Wolf : > >> Am 26.03.2013 um 10:58 hat Peter Lieven geschrieben: >>> virtually all dup pages are zero pages. remove >>> the special is_dup_page() function and use the >>> optimized buffer_find_nonzero_offset()

Re: [Qemu-devel] [PATCHv5 06/10] migration: search for zero instead of dup pages

2013-04-08 Thread Paolo Bonzini
Il 06/04/2013 00:06, Peter Lieven ha scritto: >> > I think we should MADV_DONTNEED it. > i have to correct myself, on Linux it seems that MADV_DONTNEED guarantees that > subsequent reads will return a zero filled page. > > If I am right with that we could MADV_DONTNEED the memory on startup and ke

Re: [Qemu-devel] [PATCHv5 06/10] migration: search for zero instead of dup pages

2013-04-08 Thread Peter Lieven
Am 05.04.2013 um 21:23 schrieb Kevin Wolf : > Am 26.03.2013 um 10:58 hat Peter Lieven geschrieben: >> virtually all dup pages are zero pages. remove >> the special is_dup_page() function and use the >> optimized buffer_find_nonzero_offset() function >> instead. >> >> here buffer_find_nonzero_off

Re: [Qemu-devel] [PATCHv5 06/10] migration: search for zero instead of dup pages

2013-04-05 Thread Peter Lieven
Am 05.04.2013 um 22:00 schrieb Paolo Bonzini : > Il 05/04/2013 21:23, Kevin Wolf ha scritto: virtually all dup pages are zero pages. remove the special is_dup_page() function and use the optimized buffer_find_nonzero_offset() function instead. here buffer_find_nonze

Re: [Qemu-devel] [PATCHv5 06/10] migration: search for zero instead of dup pages

2013-04-05 Thread Peter Lieven
Am 05.04.2013 um 22:00 schrieb Paolo Bonzini : > Il 05/04/2013 21:23, Kevin Wolf ha scritto: virtually all dup pages are zero pages. remove the special is_dup_page() function and use the optimized buffer_find_nonzero_offset() function instead. here buffer_find_nonze

Re: [Qemu-devel] [PATCHv5 06/10] migration: search for zero instead of dup pages

2013-04-05 Thread Paolo Bonzini
Il 05/04/2013 21:23, Kevin Wolf ha scritto: >> > virtually all dup pages are zero pages. remove >> > the special is_dup_page() function and use the >> > optimized buffer_find_nonzero_offset() function >> > instead. >> > >> > here buffer_find_nonzero_offset() is used directly >> > to avoid the unne

Re: [Qemu-devel] [PATCHv5 06/10] migration: search for zero instead of dup pages

2013-04-05 Thread Kevin Wolf
Am 26.03.2013 um 10:58 hat Peter Lieven geschrieben: > virtually all dup pages are zero pages. remove > the special is_dup_page() function and use the > optimized buffer_find_nonzero_offset() function > instead. > > here buffer_find_nonzero_offset() is used directly > to avoid the unnecssary addit

[Qemu-devel] [PATCHv5 06/10] migration: search for zero instead of dup pages

2013-03-26 Thread Peter Lieven
virtually all dup pages are zero pages. remove the special is_dup_page() function and use the optimized buffer_find_nonzero_offset() function instead. here buffer_find_nonzero_offset() is used directly to avoid the unnecssary additional checks in buffer_is_zero(). raw performace gain checking 1 G