Message ID | 5CADCC40020000780022621E@prv1-mh.provo.novell.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | x86/mem-sharing: statically initialize audit list head and lock | expand |
On 10/04/2019 11:58, Jan Beulich wrote: > There's no need to execute any instructions for doing so. > > Signed-off-by: Jan Beulich <jbeulich@suse.com> > --- > I wonder whether mem_sharing_init() shouldn't go away altogether then. I vote for removing it completely. The printk is a out-of-character compared to other subsystems in Xen. Either way, Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
On 4/10/19 12:13 PM, Andrew Cooper wrote: > On 10/04/2019 11:58, Jan Beulich wrote: >> There's no need to execute any instructions for doing so. >> >> Signed-off-by: Jan Beulich <jbeulich@suse.com> >> --- >> I wonder whether mem_sharing_init() shouldn't go away altogether then. > > I vote for removing it completely. The printk is a out-of-character > compared to other subsystems in Xen. +1
>>> On 10.04.19 at 13:20, <george.dunlap@citrix.com> wrote: > On 4/10/19 12:13 PM, Andrew Cooper wrote: >> On 10/04/2019 11:58, Jan Beulich wrote: >>> There's no need to execute any instructions for doing so. >>> >>> Signed-off-by: Jan Beulich <jbeulich@suse.com> >>> --- >>> I wonder whether mem_sharing_init() shouldn't go away altogether then. >> >> I vote for removing it completely. The printk is a out-of-character >> compared to other subsystems in Xen. > > +1 In any event I'll wait for Tamas'es opinion. There might be plans to put further meat into the function, after all. Jan
On Wed, Apr 10, 2019 at 6:17 AM Jan Beulich <JBeulich@suse.com> wrote: > > >>> On 10.04.19 at 13:20, <george.dunlap@citrix.com> wrote: > > On 4/10/19 12:13 PM, Andrew Cooper wrote: > >> On 10/04/2019 11:58, Jan Beulich wrote: > >>> There's no need to execute any instructions for doing so. > >>> > >>> Signed-off-by: Jan Beulich <jbeulich@suse.com> > >>> --- > >>> I wonder whether mem_sharing_init() shouldn't go away altogether then. > >> > >> I vote for removing it completely. The printk is a out-of-character > >> compared to other subsystems in Xen. > > > > +1 > > In any event I'll wait for Tamas'es opinion. There might be plans to put > further meat into the function, after all. +1 from me too, no plans on adding stuff here. Thanks, Tamas
--- a/xen/arch/x86/mm/mem_sharing.c +++ b/xen/arch/x86/mm/mem_sharing.c @@ -65,8 +65,8 @@ static DEFINE_PER_CPU(pg_lock_data_t, __ #if MEM_SHARING_AUDIT -static struct list_head shr_audit_list; -static spinlock_t shr_audit_lock; +static LIST_HEAD(shr_audit_list); +static DEFINE_SPINLOCK(shr_audit_lock); static DEFINE_RCU_READ_LOCK(shr_audit_read_lock); /* RCU delayed free of audit list entry */ @@ -1654,9 +1654,5 @@ int mem_sharing_domctl(struct domain *d, void __init mem_sharing_init(void) { printk("Initing memory sharing.\n"); -#if MEM_SHARING_AUDIT - spin_lock_init(&shr_audit_lock); - INIT_LIST_HEAD(&shr_audit_list); -#endif }
There's no need to execute any instructions for doing so. Signed-off-by: Jan Beulich <jbeulich@suse.com> --- I wonder whether mem_sharing_init() shouldn't go away altogether then.