[openib-general] Re: user_mad: large rmpp length problem

Michael S. Tsirkin mst at mellanox.co.il
Mon Nov 28 03:12:32 PST 2005


Quoting Roland Dreier <rolandd at cisco.com>:
>  > Allocate memory for large MAD buffers with __get_free_pages,
>  > making it possible to get buffers up to 512KB in size.
> 
> Ugh, why is this an improvement?!

I use this patch mainly as a diagnostic vehicle for various tools
until we get it fixed in a better way.

> What are the chances of an order-9
> allocation succeeding on a system that's been running for a while?

Probably low. But reboot should help ;).

>  > +	if (length >= PAGE_SIZE)
>  > +		buf = (void *)__get_free_pages(gfp_mask, long_log2(roundup_pow_of_two(length)) - PAGE_SHIFT);
>  > +	else
>  > +		buf = kmalloc(length, gfp_mask);
> 
> this is extra-gross too.

I agree here.

> I don't think this is worth it -- much better to fix the MAD API to
> handle gather/scatter lists.

We are looking into that.

-- 
MST



More information about the general mailing list