WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Re: [Xen-changelog] Linux scrubs memory before returnign

To: Rik van Riel <riel@xxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [Xen-changelog] Linux scrubs memory before returnign it to Xen, or transferring it to
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Sun, 19 Sep 2004 11:33:14 +0100
Cc: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxxxx>
Delivery-date: Sun, 19 Sep 2004 11:35:06 +0100
Envelope-to: steven.hand@xxxxxxxxxxxx
In-reply-to: Your message of "Sat, 18 Sep 2004 13:01:24 EDT." <Pine.LNX.4.44.0409181259230.32697-100000@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
> > +#ifdef CONFIG_XEN_SCRUB_PAGES
> > +        else
> > +        {
> > +            void *p = kmap(&mem_map[*currp]);
> > +            scrub_pages(p, 1);
> > +            kunmap(&mem_map[*currp]);
> > +        }
> > +#endif
> 
> Since scrub_pages() becomes a NOOP when the config option
> is not set, why the additional #ifdef in the source code ?

Avoids an unnecessary kmap/kunmap, which in Xen would both trap to
ring 0. I don't know if it would make much of a performance
difference, but I decided to ifdef the whole thing just in case.

I hope you like the abuse of __dev_alloc_skb() :-)

 -- Keir


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

<Prev in Thread] Current Thread [Next in Thread>