[openib-general][kdapl]: vmalloc instead of kmalloc

Guy German guyg at voltaire.com
Tue Aug 2 09:02:15 PDT 2005


Hi Muli,

Muli Ben-Yehuda <mailto:mulix at mulix.org> wrote:
> On Tue, Aug 02, 2005 at 06:24:49PM +0300, Guy German wrote:
> 
>> There are some places where kmalloc might not be enough :
>> in dapl_evd_event_alloc there is an allocation:
>> 
>> 	event = kmalloc(evd->qlen * sizeof *event);
>> 
>> whereas evd->qlen can be 128k (depends on max_cqe of the hca) and
>> kmalloc would fail. 
>> 
>> The same goes to dapl_rbuf_alloc.
>> 
>> Is it legit to replace those kmallocs with vmallocs ?
> 
> Why do we need such a large allocation?
> To answer your question, vmalloc has a performance overhead and can
> and will fail when vmalloc-space is exhausted (as can kmalloc, for
> different reasons). Can this allocation be cut down so that it
> becomes a non-issue? 

evd_min_qlen defines the size of the event queue that the Consumer requested.
sizeof *event = 184 - that leaves ~712 pending events, which is not much.
ISER target is trying to support about 5000 (by their calculations), but other consumers 
might want to support even more and there is no reason for dapl to limit what the ib can provide.
Note that iser dequeues the events itself (only the first event is accepted from a callback), hence the
need for a normal size queue.

Thanks,
Guy.

> 
> Cheers,
> Muli



More information about the general mailing list