|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Ping: [PATCH] use clear_domain_page() instead of open coding it
On Mon, 2015-10-26 at 07:06 -0600, Jan Beulich wrote:
> > > > On 19.10.15 at 16:51, <JBeulich@xxxxxxxx> wrote:
>
> "REST" maintainers, could I please get an ack or otherwise on this
> common code change?
>
> Thanks, Jan
>
> > --- a/xen/common/page_alloc.c
> > +++ b/xen/common/page_alloc.c
> > @@ -1959,22 +1959,16 @@ __initcall(pagealloc_keyhandler_init);
> >
> > void scrub_one_page(struct page_info *pg)
> > {
> > - void *p;
> > -
> > if ( unlikely(pg->count_info & PGC_broken) )
> > return;
> >
> > - p = __map_domain_page(pg);
> > -
> > #ifndef NDEBUG
> > /* Avoid callers relying on allocations returning zeroed pages. */
> > - memset(p, 0xc2, PAGE_SIZE);
> > + unmap_domain_page(memset(__map_domain_page(pg), 0xc2, PAGE_SIZE));
I'm not madly keep on this clever nesting of the map/memset/unmap and would
have preferred a more localised void *p (or a memset_domain_page helper
maybe), but I don't mind enough to block this over:
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
> > #else
> > /* For a production build, clear_page() is the fastest way to
> > scrub. */
> > - clear_page(p);
> > + clear_domain_page(_mfn(page_to_mfn(pg)));
> > #endif
> > -
> > - unmap_domain_page(p);
> > }
> >
> > static void dump_heap(unsigned char key)
>
>
>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |