Skip to contentSkip to conversation

mm/gup: correct pin_user_pages.rst location

PATCH In review Vitaly Kuznetsov 4 participants 4 messages May 26, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm/gup: correct pin_user_pages.rst location

pin_user_pages.rst lives in Documentation/core-api/, not Documentation/vm/, adjust all links accordingly.

Fixes 3faa52c03f44 ("mm/gup: track FOLL_PIN pages")
Fixes eddb1c228f79 ("mm/gup: introduce pin_user_pages*() and FOLL_PIN")
---
 include/linux/mm.h |  4 ++--
 mm/gup.c           | 18 +++++++++---------
 2 files changed, 11 insertions(+), 11 deletions(-)
include/linux/mm.h +2 -2
index 5a323422d783..1f2850465f59 100644
@@ -1219,7 +1219,7 @@ void unpin_user_pages(struct page **pages, unsigned long npages);
  * used to track the pincount (instead using of the GUP_PIN_COUNTING_BIAS
  * scheme).
  *
- * For more information, please see Documentation/vm/pin_user_pages.rst.
+ * For more information, please see Documentation/core-api/pin_user_pages.rst.
  *
  * @page:	pointer to page to be queried.
  * @Return:	True, if it is likely that the page has been "dma-pinned".
@@ -2834,7 +2834,7 @@ struct page *follow_page(struct vm_area_struct *vma, unsigned long address,
  * releasing pages: get_user_pages*() pages must be released via put_page(),
  * while pin_user_pages*() pages must be released via unpin_user_page().
  *
- * Please see Documentation/vm/pin_user_pages.rst for more information.
+ * Please see Documentation/core-api/pin_user_pages.rst for more information.
  */
 
 static inline int vm_fault_to_errno(vm_fault_t vm_fault, int foll_flags)
mm/gup.c +9 -9
index 87a6a59fe667..87a3a4b400f9 100644
@@ -2845,10 +2845,10 @@ EXPORT_SYMBOL_GPL(get_user_pages_fast);
  * the arguments here are identical.
  *
  * FOLL_PIN means that the pages must be released via unpin_user_page(). Please
- * see Documentation/vm/pin_user_pages.rst for further details.
+ * see Documentation/core-api/pin_user_pages.rst for further details.
  *
- * This is intended for Case 1 (DIO) in Documentation/vm/pin_user_pages.rst. It
- * is NOT intended for Case 2 (RDMA: long-term pins).
+ * This is intended for Case 1 in Documentation/core-api/pin_user_pages.rst
+ * (DIO). It is NOT intended for Case 2 (RDMA: long-term pins).
  */
 int pin_user_pages_fast(unsigned long start, int nr_pages,
 			unsigned int gup_flags, struct page **pages)
@@ -2885,10 +2885,10 @@ EXPORT_SYMBOL_GPL(pin_user_pages_fast);
  * the arguments here are identical.
  *
  * FOLL_PIN means that the pages must be released via unpin_user_page(). Please
- * see Documentation/vm/pin_user_pages.rst for details.
+ * see Documentation/core-api/pin_user_pages.rst for details.
  *
- * This is intended for Case 1 (DIO) in Documentation/vm/pin_user_pages.rst. It
- * is NOT intended for Case 2 (RDMA: long-term pins).
+ * This is intended for Case 1 in Documentation/core-api/pin_user_pages.rst
+ * (DIO). It is NOT intended for Case 2 (RDMA: long-term pins).
  */
 long pin_user_pages_remote(struct task_struct *tsk, struct mm_struct *mm,
 			   unsigned long start, unsigned long nr_pages,
@@ -2921,10 +2921,10 @@ EXPORT_SYMBOL(pin_user_pages_remote);
  * FOLL_PIN is set.
  *
  * FOLL_PIN means that the pages must be released via unpin_user_page(). Please
- * see Documentation/vm/pin_user_pages.rst for details.
+ * see Documentation/core-api/pin_user_pages.rst for details.
  *
- * This is intended for Case 1 (DIO) in Documentation/vm/pin_user_pages.rst. It
- * is NOT intended for Case 2 (RDMA: long-term pins).
+ * This is intended for Case 1 in Documentation/core-api/pin_user_pages.rst
+ * (DIO). It is NOT intended for Case 2 (RDMA: long-term pins).
  */
 long pin_user_pages(unsigned long start, unsigned long nr_pages,
 		    unsigned int gup_flags, struct page **pages,
Signature · 1 line
2.25.4
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Vitaly Kuznetsov

pin_user_pages.rst lives in Documentation/core-api/, not Documentation/vm/, adjust all links accordingly.

Fixes 3faa52c03f44 ("mm/gup: track FOLL_PIN pages")
Fixes eddb1c228f79 ("mm/gup: introduce pin_user_pages*() and FOLL_PIN")
---
  include/linux/mm.h |  4 ++--
  mm/gup.c           | 18 +++++++++---------
  2 files changed, 11 insertions(+), 11 deletions(-)

Hi Vitaly,

Thanks for the fix,

(+CC Souptick, who fixed a similar set of links, maybe in a different file, as I recall.)

thanks,

Signature · 2 lines
John Hubbard
NVIDIA
Quoted 70 lines
include/linux/mm.h +2 -2
index 5a323422d783..1f2850465f59 100644
@@ -1219,7 +1219,7 @@ void unpin_user_pages(struct page **pages, unsigned long npages);
   * used to track the pincount (instead using of the GUP_PIN_COUNTING_BIAS
   * scheme).
   *
- * For more information, please see Documentation/vm/pin_user_pages.rst.
+ * For more information, please see Documentation/core-api/pin_user_pages.rst.
   *
   * @page:	pointer to page to be queried.
   * @Return:	True, if it is likely that the page has been "dma-pinned".
@@ -2834,7 +2834,7 @@ struct page *follow_page(struct vm_area_struct *vma, unsigned long address,
   * releasing pages: get_user_pages*() pages must be released via put_page(),
   * while pin_user_pages*() pages must be released via unpin_user_page().
   *
- * Please see Documentation/vm/pin_user_pages.rst for more information.
+ * Please see Documentation/core-api/pin_user_pages.rst for more information.
   */
 
  static inline int vm_fault_to_errno(vm_fault_t vm_fault, int foll_flags)
mm/gup.c +9 -9
index 87a6a59fe667..87a3a4b400f9 100644
@@ -2845,10 +2845,10 @@ EXPORT_SYMBOL_GPL(get_user_pages_fast);
   * the arguments here are identical.
   *
   * FOLL_PIN means that the pages must be released via unpin_user_page(). Please
- * see Documentation/vm/pin_user_pages.rst for further details.
+ * see Documentation/core-api/pin_user_pages.rst for further details.
   *
- * This is intended for Case 1 (DIO) in Documentation/vm/pin_user_pages.rst. It
- * is NOT intended for Case 2 (RDMA: long-term pins).
+ * This is intended for Case 1 in Documentation/core-api/pin_user_pages.rst
+ * (DIO). It is NOT intended for Case 2 (RDMA: long-term pins).
   */
  int pin_user_pages_fast(unsigned long start, int nr_pages,
  			unsigned int gup_flags, struct page **pages)
@@ -2885,10 +2885,10 @@ EXPORT_SYMBOL_GPL(pin_user_pages_fast);
   * the arguments here are identical.
   *
   * FOLL_PIN means that the pages must be released via unpin_user_page(). Please
- * see Documentation/vm/pin_user_pages.rst for details.
+ * see Documentation/core-api/pin_user_pages.rst for details.
   *
- * This is intended for Case 1 (DIO) in Documentation/vm/pin_user_pages.rst. It
- * is NOT intended for Case 2 (RDMA: long-term pins).
+ * This is intended for Case 1 in Documentation/core-api/pin_user_pages.rst
+ * (DIO). It is NOT intended for Case 2 (RDMA: long-term pins).
   */
  long pin_user_pages_remote(struct task_struct *tsk, struct mm_struct *mm,
  			   unsigned long start, unsigned long nr_pages,
@@ -2921,10 +2921,10 @@ EXPORT_SYMBOL(pin_user_pages_remote);
   * FOLL_PIN is set.
   *
   * FOLL_PIN means that the pages must be released via unpin_user_page(). Please
- * see Documentation/vm/pin_user_pages.rst for details.
+ * see Documentation/core-api/pin_user_pages.rst for details.
   *
- * This is intended for Case 1 (DIO) in Documentation/vm/pin_user_pages.rst. It
- * is NOT intended for Case 2 (RDMA: long-term pins).
+ * This is intended for Case 1 in Documentation/core-api/pin_user_pages.rst
+ * (DIO). It is NOT intended for Case 2 (RDMA: long-term pins).
   */
  long pin_user_pages(unsigned long start, unsigned long nr_pages,
  		    unsigned int gup_flags, struct page **pages,
#2 lore raw
Quoted 13 lines · John Hubbard
Quoted 10 lines · Vitaly Kuznetsov

pin_user_pages.rst lives in Documentation/core-api/, not Documentation/vm/, adjust all links accordingly.

Fixes 3faa52c03f44 ("mm/gup: track FOLL_PIN pages")
Fixes eddb1c228f79 ("mm/gup: introduce pin_user_pages*() and FOLL_PIN")
---
  include/linux/mm.h |  4 ++--
  mm/gup.c           | 18 +++++++++---------
  2 files changed, 11 insertions(+), 11 deletions(-)
Quoted 8 lines

Hi Vitaly,

Thanks for the fix,

(+CC Souptick, who fixed a similar set of links, maybe in a different file, as I recall.)

Changes related to mm/gup.c are merged in linux-next which means we need to take care
of only *mm.h* part. rebase on top of linux-next should work fine. With that,

Quoted 73 lines

NVIDIA

Quoted 70 lines
include/linux/mm.h +2 -2
index 5a323422d783..1f2850465f59 100644
@@ -1219,7 +1219,7 @@ void unpin_user_pages(struct page **pages, unsigned long npages);
   * used to track the pincount (instead using of the GUP_PIN_COUNTING_BIAS
   * scheme).
   *
- * For more information, please see Documentation/vm/pin_user_pages.rst.
+ * For more information, please see Documentation/core-api/pin_user_pages.rst.
   *
   * @page:   pointer to page to be queried.
   * @Return: True, if it is likely that the page has been "dma-pinned".
@@ -2834,7 +2834,7 @@ struct page *follow_page(struct vm_area_struct *vma, unsigned long address,
   * releasing pages: get_user_pages*() pages must be released via put_page(),
   * while pin_user_pages*() pages must be released via unpin_user_page().
   *
- * Please see Documentation/vm/pin_user_pages.rst for more information.
+ * Please see Documentation/core-api/pin_user_pages.rst for more information.
   */
 
  static inline int vm_fault_to_errno(vm_fault_t vm_fault, int foll_flags)
mm/gup.c +9 -9
index 87a6a59fe667..87a3a4b400f9 100644
@@ -2845,10 +2845,10 @@ EXPORT_SYMBOL_GPL(get_user_pages_fast);
   * the arguments here are identical.
   *
   * FOLL_PIN means that the pages must be released via unpin_user_page(). Please
- * see Documentation/vm/pin_user_pages.rst for further details.
+ * see Documentation/core-api/pin_user_pages.rst for further details.
   *
- * This is intended for Case 1 (DIO) in Documentation/vm/pin_user_pages.rst. It
- * is NOT intended for Case 2 (RDMA: long-term pins).
+ * This is intended for Case 1 in Documentation/core-api/pin_user_pages.rst
+ * (DIO). It is NOT intended for Case 2 (RDMA: long-term pins).
   */
  int pin_user_pages_fast(unsigned long start, int nr_pages,
                      unsigned int gup_flags, struct page **pages)
@@ -2885,10 +2885,10 @@ EXPORT_SYMBOL_GPL(pin_user_pages_fast);
   * the arguments here are identical.
   *
   * FOLL_PIN means that the pages must be released via unpin_user_page(). Please
- * see Documentation/vm/pin_user_pages.rst for details.
+ * see Documentation/core-api/pin_user_pages.rst for details.
   *
- * This is intended for Case 1 (DIO) in Documentation/vm/pin_user_pages.rst. It
- * is NOT intended for Case 2 (RDMA: long-term pins).
+ * This is intended for Case 1 in Documentation/core-api/pin_user_pages.rst
+ * (DIO). It is NOT intended for Case 2 (RDMA: long-term pins).
   */
  long pin_user_pages_remote(struct task_struct *tsk, struct mm_struct *mm,
                         unsigned long start, unsigned long nr_pages,
@@ -2921,10 +2921,10 @@ EXPORT_SYMBOL(pin_user_pages_remote);
   * FOLL_PIN is set.
   *
   * FOLL_PIN means that the pages must be released via unpin_user_page(). Please
- * see Documentation/vm/pin_user_pages.rst for details.
+ * see Documentation/core-api/pin_user_pages.rst for details.
   *
- * This is intended for Case 1 (DIO) in Documentation/vm/pin_user_pages.rst. It
- * is NOT intended for Case 2 (RDMA: long-term pins).
+ * This is intended for Case 1 in Documentation/core-api/pin_user_pages.rst
+ * (DIO). It is NOT intended for Case 2 (RDMA: long-term pins).
   */
  long pin_user_pages(unsigned long start, unsigned long nr_pages,
                  unsigned int gup_flags, struct page **pages,
Acked-by on v1 1/1
#3 lore raw
In reply to Vitaly Kuznetsov
Quoted 6 lines · Vitaly Kuznetsov

pin_user_pages.rst lives in Documentation/core-api/, not Documentation/vm/, adjust all links accordingly.

Fixes 3faa52c03f44 ("mm/gup: track FOLL_PIN pages")
Fixes eddb1c228f79 ("mm/gup: introduce pin_user_pages*() and FOLL_PIN")
Quoted 76 lines
---
 include/linux/mm.h |  4 ++--
 mm/gup.c           | 18 +++++++++---------
 2 files changed, 11 insertions(+), 11 deletions(-)
include/linux/mm.h +2 -2
index 5a323422d783..1f2850465f59 100644
@@ -1219,7 +1219,7 @@ void unpin_user_pages(struct page **pages, unsigned long npages);
  * used to track the pincount (instead using of the GUP_PIN_COUNTING_BIAS
  * scheme).
  *
- * For more information, please see Documentation/vm/pin_user_pages.rst.
+ * For more information, please see Documentation/core-api/pin_user_pages.rst.
  *
  * @page:	pointer to page to be queried.
  * @Return:	True, if it is likely that the page has been "dma-pinned".
@@ -2834,7 +2834,7 @@ struct page *follow_page(struct vm_area_struct *vma, unsigned long address,
  * releasing pages: get_user_pages*() pages must be released via put_page(),
  * while pin_user_pages*() pages must be released via unpin_user_page().
  *
- * Please see Documentation/vm/pin_user_pages.rst for more information.
+ * Please see Documentation/core-api/pin_user_pages.rst for more information.
  */
 
 static inline int vm_fault_to_errno(vm_fault_t vm_fault, int foll_flags)
mm/gup.c +9 -9
index 87a6a59fe667..87a3a4b400f9 100644
@@ -2845,10 +2845,10 @@ EXPORT_SYMBOL_GPL(get_user_pages_fast);
  * the arguments here are identical.
  *
  * FOLL_PIN means that the pages must be released via unpin_user_page(). Please
- * see Documentation/vm/pin_user_pages.rst for further details.
+ * see Documentation/core-api/pin_user_pages.rst for further details.
  *
- * This is intended for Case 1 (DIO) in Documentation/vm/pin_user_pages.rst. It
- * is NOT intended for Case 2 (RDMA: long-term pins).
+ * This is intended for Case 1 in Documentation/core-api/pin_user_pages.rst
+ * (DIO). It is NOT intended for Case 2 (RDMA: long-term pins).
  */
 int pin_user_pages_fast(unsigned long start, int nr_pages,
 			unsigned int gup_flags, struct page **pages)
@@ -2885,10 +2885,10 @@ EXPORT_SYMBOL_GPL(pin_user_pages_fast);
  * the arguments here are identical.
  *
  * FOLL_PIN means that the pages must be released via unpin_user_page(). Please
- * see Documentation/vm/pin_user_pages.rst for details.
+ * see Documentation/core-api/pin_user_pages.rst for details.
  *
- * This is intended for Case 1 (DIO) in Documentation/vm/pin_user_pages.rst. It
- * is NOT intended for Case 2 (RDMA: long-term pins).
+ * This is intended for Case 1 in Documentation/core-api/pin_user_pages.rst
+ * (DIO). It is NOT intended for Case 2 (RDMA: long-term pins).
  */
 long pin_user_pages_remote(struct task_struct *tsk, struct mm_struct *mm,
 			   unsigned long start, unsigned long nr_pages,
@@ -2921,10 +2921,10 @@ EXPORT_SYMBOL(pin_user_pages_remote);
  * FOLL_PIN is set.
  *
  * FOLL_PIN means that the pages must be released via unpin_user_page(). Please
- * see Documentation/vm/pin_user_pages.rst for details.
+ * see Documentation/core-api/pin_user_pages.rst for details.
  *
- * This is intended for Case 1 (DIO) in Documentation/vm/pin_user_pages.rst. It
- * is NOT intended for Case 2 (RDMA: long-term pins).
+ * This is intended for Case 1 in Documentation/core-api/pin_user_pages.rst
+ * (DIO). It is NOT intended for Case 2 (RDMA: long-term pins).
  */
 long pin_user_pages(unsigned long start, unsigned long nr_pages,
 		    unsigned int gup_flags, struct page **pages,
Signature · 1 line
2.25.4
Signature · 2 lines
Sincerely yours,
Mike.