Re: [PATCH] staging: gasket: Convert get_user_pages*() --> pin_user_pages*()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2020-05-28 23:27, Souptick Joarder wrote:
On Fri, May 29, 2020 at 11:46 AM Souptick Joarder <jrdr.linux@xxxxxxxxx> wrote:

On Thu, May 28, 2020 at 4:34 PM Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:

On Thu, May 28, 2020 at 02:32:42AM +0530, Souptick Joarder wrote:
This code was using get_user_pages_fast(), in a "Case 2" scenario
(DMA/RDMA), using the categorization from [1]. That means that it's
time to convert the get_user_pages_fast() + put_page() calls to
pin_user_pages_fast() + unpin_user_page() calls.

You are saying that the page is used for DIO and not DMA, but it sure
looks to me like it is used for DMA.

No, I was referring to "Case 2" scenario in change log which means  it is
used for DMA, not DIO.

Hi,

Dan, I also uncertain as to how you read this as referring to DIO. Case 2 is
DMA or RDMA, and in fact the proposed commit log says both of those things:
Case 2 and DMA/RDMA. I don't see "DIO" anywhere here...




    503                          /* Map the page into DMA space. */
    504                          ptes[i].dma_addr =
    505                                  dma_map_page(pg_tbl->device, page, 0, PAGE_SIZE,
    506                                               DMA_BIDIRECTIONAL);

To be honest, that starting paragraph was confusing.  At first I thought
you were saying gasket was an RDMA driver. :P  I shouldn't have to read
a different document to understand the commit message.  It should be
summarized enough and the other documentation is supplemental.

"In 2019 we introduced pin_user_pages() and now we are converting
get_user_pages() to the new API as appropriate".

As all other similar conversion have similar change logs, so I was trying
to maintain the same. John might have a different opinion on this.

For example, I was referring to few recent similar commits for change logs.

http://lkml.kernel.org/r/20200519002124.2025955-5-jhubbard@xxxxxxxxxx
https://lore.kernel.org/r/20200518015237.1568940-1-jhubbard@xxxxxxxxxx



John, Any further opinion ??


Well, I've gotten away with the current wording for quite a few patches so
far, but that sure doesn't mean it's perfect! :)

Maybe adding the words that Dan suggests, above, will suffice? Here:

>>> "In 2019 we introduced pin_user_pages() and now we are converting
>>> get_user_pages() to the new API as appropriate".


thanks,
--
John Hubbard
NVIDIA
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux