Re: [Xen-devel] [PATCH V3 3/8] xen: Delay m2p_override initialization

From: Konrad Rzeszutek Wilk
Date: Wed Nov 12 2014 - 13:47:17 EST


On Tue, Nov 11, 2014 at 10:29:32AM +0000, David Vrabel wrote:
> On 11/11/14 05:43, Juergen Gross wrote:
> > The m2p overrides are used to be able to find the local pfn for a
> > foreign mfn mapped into the domain. They are used by driver backends
> > having to access frontend data.
> >
> > As this functionality isn't used in early boot it makes no sense to
> > initialize the m2p override functions very early. It can be done
> > later without doing any harm, removing the need for allocating memory
> > via extend_brk().
> >
> > While at it make some m2p override functions static as they are only
> > used internally.
>
> Reviewed-by: David Vrabel <david.vrabel@xxxxxxxxxx>
>
> But...
>
> > static struct page *m2p_find_override(unsigned long mfn)
> > {
> > unsigned long flags;
> > - struct list_head *bucket = &m2p_overrides[mfn_hash(mfn)];
> > + struct list_head *bucket;
> > struct page *p, *ret;
>
>
> if (unlikely(!m2p_overrides))
> return NULL;
>
> Would be preferred,

Aye,

Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
>
> David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/