[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • 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
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.