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-ppc-devel

Re: [XenPPC] [PATCH] [RFC] Xencomm patch to fix modules

To: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
Subject: Re: [XenPPC] [PATCH] [RFC] Xencomm patch to fix modules
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Thu, 18 Jan 2007 15:26:57 -0600
Cc: xen-ppc-devel <xen-ppc-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 18 Jan 2007 13:27:01 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <6B88B51A-6BAF-46A2-A514-393D19871CAB@xxxxxxxxxxxxxx>
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: IBM Linux Technology Center
References: <1169090458.2232.2.camel@thinkpad> <C318A5CB-C4C3-40B7-AD32-F197B76E81EC@xxxxxxxxxxxxxx> <1169146545.27242.14.camel@basalt> <6B88B51A-6BAF-46A2-A514-393D19871CAB@xxxxxxxxxxxxxx>
Reply-to: Hollis Blanchard <hollisb@xxxxxxxxxx>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Thu, 2007-01-18 at 16:18 -0500, Jimi Xenidis wrote:
> On Jan 18, 2007, at 1:55 PM, Hollis Blanchard wrote:
> 
> > On Thu, 2007-01-18 at 12:17 -0500, Jimi Xenidis wrote:
> >> I agree with most of Hollis's comments, but have some of my own.
> >>
> >> First, I do not think that the implementation of
> is_phys_contiguous()
> >> answers the question in its name and IMNSHO is bogus.  Perhaps
> >> something like:
> >>    mm/sparse.c vaddr_in_vmalloc_area 232 static int
> >> vaddr_in_vmalloc_area(void *addr)
> >>
> >> And use if (!vaddr_in_vmalloc_area)
> >
> > The name was my suggestion. It should be commented, but think about
> > it:
> > we don't care if something is vmalloc or not. We care if it's
> > physically
> > contiguous or not, so I strongly believe that should be the name of
> > the
> > test.
> 
> I'm not big on functions that do not implement what the name says it
> does.

It does exactly what the name says it does: it returns 0 if the area is
known to be physically discontiguous, and 1 otherwise.

It's called "malloc", not "allocate_from_buddy" or
"allocate_first_from_bitmap". That's because you can provide any
implementation of the interface, and it can change at any time, and when
it does change, you don't need to change the callers.

> However, the worst that can happen is a false-negative, (unless it is
> an ioremap() address which would be other problems).
> 
> Hey, wouldn't virt_addr_valid() do?

I can pass a perfectly "valid" virtual address that is within a
physically discontiguous area of memory, and this function would return
0.

-- 
Hollis Blanchard
IBM Linux Technology Center


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