Re: [Xen-devel] [PATCH v11 2/3] x86/mem_sharing: reset a fork

2020-03-18 Thread Tamas K Lengyel
On Wed, Mar 18, 2020 at 8:13 AM Jan Beulich wrote: > > On 18.03.2020 15:00, Tamas K Lengyel wrote: > > On Wed, Mar 18, 2020 at 5:36 AM Jan Beulich wrote: > >> On 28.02.2020 19:40, Tamas K Lengyel wrote: > >>> +mfn = page_to_mfn(page); > >>> +if ( mfn_valid(mfn) ) > >> > >> All pag

Re: [Xen-devel] [PATCH v11 2/3] x86/mem_sharing: reset a fork

2020-03-18 Thread Jan Beulich
On 18.03.2020 15:00, Tamas K Lengyel wrote: > On Wed, Mar 18, 2020 at 5:36 AM Jan Beulich wrote: >> On 28.02.2020 19:40, Tamas K Lengyel wrote: >>> +mfn = page_to_mfn(page); >>> +if ( mfn_valid(mfn) ) >> >> All pages on a domain's list should have a valid MFN - what are you >> tryi

Re: [Xen-devel] [PATCH v11 2/3] x86/mem_sharing: reset a fork

2020-03-18 Thread Tamas K Lengyel
On Wed, Mar 18, 2020 at 5:36 AM Jan Beulich wrote: > > On 28.02.2020 19:40, Tamas K Lengyel wrote: > > --- a/xen/arch/x86/mm/mem_sharing.c > > +++ b/xen/arch/x86/mm/mem_sharing.c > > @@ -1775,6 +1775,91 @@ static int fork(struct domain *cd, struct domain *d) > > return rc; > > } > > > > +/

Re: [Xen-devel] [PATCH v11 2/3] x86/mem_sharing: reset a fork

2020-03-18 Thread Jan Beulich
On 28.02.2020 19:40, Tamas K Lengyel wrote: --- a/xen/arch/x86/mm/mem_sharing.c +++ b/xen/arch/x86/mm/mem_sharing.c @@ -1775,6 +1775,91 @@ static int fork(struct domain *cd, struct domain *d) return rc; } +/* + * The fork reset operation is intended to be used on short-lived forks onl

[Xen-devel] [PATCH v11 2/3] x86/mem_sharing: reset a fork

2020-02-28 Thread Tamas K Lengyel
Implement hypercall that allows a fork to shed all memory that got allocated for it during its execution and re-load its vCPU context from the parent VM. This allows the forked VM to reset into the same state the parent VM is in a faster way then creating a new fork would be. Measurements show abou