From: Ian Campbell <ian.campbell@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
Keir Fraser <keir@xen.org>, Tim Deegan <tim@xen.org>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Kevin Tian <kevin.tian@intel.com>,
Jun Nakajima <jun.nakajima@intel.com>,
xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: Ping: [PATCH] use clear_domain_page() instead of open coding it
Date: Mon, 2 Nov 2015 13:50:52 +0000 [thread overview]
Message-ID: <1446472252.3088.43.camel@citrix.com> (raw)
In-Reply-To: <562E335902000078000AE9C7@prv-mh.provo.novell.com>
On Mon, 2015-10-26 at 07:06 -0600, Jan Beulich wrote:
> > > > On 19.10.15 at 16:51, <JBeulich@suse.com> 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@citrix.com>
> > #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)
>
>
>
next prev parent reply other threads:[~2015-11-02 13:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-19 14:51 [PATCH] use clear_domain_page() instead of open coding it Jan Beulich
2015-10-20 9:53 ` Andrew Cooper
2015-10-20 9:53 ` George Dunlap
2015-10-26 13:06 ` Ping: " Jan Beulich
2015-10-26 15:47 ` Ian Jackson
2015-10-26 15:59 ` Jan Beulich
2015-11-02 13:50 ` Ian Campbell [this message]
2015-10-29 1:13 ` Tian, Kevin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1446472252.3088.43.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=jun.nakajima@intel.com \
--cc=keir@xen.org \
--cc=kevin.tian@intel.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.