[folded-merged] docs-mm-gup-pin_user_pagesrst-add-a-case-5-v2.patch removed from -mm tree

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

 



The patch titled
     Subject: docs: mm/gup: pin_user_pages.rst: add a "case 5"
has been removed from the -mm tree.  Its filename was
     docs-mm-gup-pin_user_pagesrst-add-a-case-5-v2.patch

This patch was dropped because it was folded into docs-mm-gup-pin_user_pagesrst-add-a-case-5.patch

------------------------------------------------------
From: John Hubbard <jhubbard@xxxxxxxxxx>
Subject: docs: mm/gup: pin_user_pages.rst: add a "case 5"

There are four cases listed in pin_user_pages.rst. These are
intended to help developers figure out whether to use
get_user_pages*(), or pin_user_pages*(). However, the four cases
do not cover all the situations. For example, drivers/vhost/vhost.c
has a "pin, write to page, set page dirty, unpin" case.

Add a fifth case, to help explain that there is a general pattern
that requires pin_user_pages*() API calls.

Link: http://lkml.kernel.org/r/20200601052633.853874-2-jhubbard@xxxxxxxxxx
Signed-off-by: John Hubbard <jhubbard@xxxxxxxxxx>
Cc: Vlastimil Babka <vbabka@xxxxxxx>
Cc: Jan Kara <jack@xxxxxxx>
Cc: Jérôme Glisse <jglisse@xxxxxxxxxx>
Cc: Dave Chinner <david@xxxxxxxxxxxxx>
Cc: Jonathan Corbet <corbet@xxxxxxx>
Cc: Souptick Joarder <jrdr.linux@xxxxxxxxx>
Cc: "Michael S . Tsirkin" <mst@xxxxxxxxxx>
Cc: Jason Wang <jasowang@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 Documentation/core-api/pin_user_pages.rst |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

--- a/Documentation/core-api/pin_user_pages.rst~docs-mm-gup-pin_user_pagesrst-add-a-case-5-v2
+++ a/Documentation/core-api/pin_user_pages.rst
@@ -174,21 +174,19 @@ needs to be set.
 CASE 5: Pinning in order to write to the data within the page
 -------------------------------------------------------------
 Even though neither DMA nor Direct IO is involved, just a simple case of "pin,
-access page's data, unpin" can cause a problem. Case 5 may be considered a
+write to a page's data, unpin" can cause a problem. Case 5 may be considered a
 superset of Case 1, plus Case 2, plus anything that invokes that pattern. In
 other words, if the code is neither Case 1 nor Case 2, it may still require
 FOLL_PIN, for patterns like this:
 
 Correct (uses FOLL_PIN calls):
     pin_user_pages()
-    access the data within the pages
-    set_page_dirty_lock()
+    write to the data within the pages
     unpin_user_pages()
 
 INCORRECT (uses FOLL_GET calls):
     get_user_pages()
-    access the data within the pages
-    set_page_dirty_lock()
+    write to the data within the pages
     put_page()
 
 page_maybe_dma_pinned(): the whole point of pinning
_

Patches currently in -mm which might be from jhubbard@xxxxxxxxxx are

mm-gup-update-pin_user_pagesrst-for-case-3-mmu-notifiers.patch
mm-gup-introduce-pin_user_pages_locked.patch
mm-gup-frame_vector-convert-get_user_pages-pin_user_pages.patch
mm-gup-documentation-fix-for-pin_user_pages-apis.patch
docs-mm-gup-pin_user_pagesrst-add-a-case-5.patch
vhost-convert-get_user_pages-pin_user_pages.patch





[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux