lkml.org 
[lkml]   [2006]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 10 of 20] ipath - support for userspace apps using core driver
    On Thu, 16 Mar 2006, Bryan O'Sullivan wrote:
    >
    > This is more or less what we're doing now. Except we're not doing a
    > get_page after dma_alloc_coherent, and vmops->nopage is doing a
    > get_page. Reading between the lines, I guess the driver should be doing
    > a get_page right after the allocation, and a put_page before it does the
    > free? This matches my mental model at least, but it seems that my model
    > is a bit mental.

    There's no need to do a get_page after the allocation and a put_page
    before the free (though you could, it's just extra unnecessary work):
    the allocation comes with a reference count of 1, the free frees up
    that last remaining reference count of 1 (as Andrew explained more
    lucidly elsewhere in his mail).

    Hugh
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-03-16 18:29    [W:2.580 / U:0.164 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site