[ofa-general] Re: [PATCH 1/3] V2 - libmthca - Optimize memory allocation of QP buffers

sebastien dugue sebastien.dugue at bull.net
Wed Jul 8 00:19:41 PDT 2009


  Hi Roland,

On Tue, 07 Jul 2009 21:14:59 -0700
Roland Dreier <rdreier at cisco.com> wrote:

> So I'm finally looking at applying this patch.  And I wonder why you
> only do this for QP buffers -- it seems every other object allocated
> with mthca_alloc_buf(), namely CQs, SRQs and mem-free doorbell records,
> are all also page aligned, and similarly waste memory.

  You're right here that all alignd buffers could be allocated with mmap().
As I didn't want to be too radical, I only changed the QP buffers as those
are the most offending consumers of aligned memory.

  If everyone agrees on dropping posix_memalign() for good (which I think
would be a good thing), then I'll respin those 2 patches.

  Sebastien.

> 
> So should we not just replace the posix_memalign() in alloc_buf with
> anonymous mmap, and end up with a simpler patch that saves even more
> memory?
> 
>  - R.
> 



More information about the general mailing list