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

[Xen-devel] What's the purpose of VM_FOREIGN

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] What's the purpose of VM_FOREIGN
From: "Li, Xin B" <xin.b.li@xxxxxxxxx>
Date: Tue, 1 Aug 2006 16:02:07 +0800
Delivery-date: Tue, 01 Aug 2006 01:03:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Aca1QMiOyp6i8ZIRRCKZyGPqlWWxUA==
Thread-topic: What's the purpose of VM_FOREIGN
It is defined in Mm.h (linux-2.6-xen-sparse\include\linux), and only
used in Memory.c (linux-2.6-xen-sparse\mm) as follow:

#ifdef CONFIG_XEN
                if (vma && (vma->vm_flags & VM_FOREIGN)) {
                        struct page **map = vma->vm_private_data;
                        int offset = (start - vma->vm_start) >>
PAGE_SHIFT;
                        if (map[offset] != NULL) {
                                if (pages) {
                                        struct page *page = map[offset];
                                        
                                        pages[i] = page;
                                        get_page(page);
                                }
                                if (vmas)
                                        vmas[i] = vma;
                                i++;
                                start += PAGE_SIZE;
                                len--;
                                continue;
                        }
                }
#endif

But I never saw when the bit is set, so this code path can not be
reached?
-Xin

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

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