[RFC PATCH 7/7] block, direct-io: flip the switch: use pin_user_pages_fast()

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

 



Remove CONFIG_BLK_USE_PIN_USER_PAGES_FOR_DIO, but leave the dio_w_*()
wrapper functions in place, with the pin_user_pages_fast() defines as
the only choice.

A subsequent patch is now possible, to rename all dio_w_*() functions so
as to remove the dio_w_ prefix.

Signed-off-by: John Hubbard <jhubbard@xxxxxxxxxx>
---
 block/Kconfig        | 25 -------------------------
 include/linux/bvec.h |  7 -------
 2 files changed, 32 deletions(-)

diff --git a/block/Kconfig b/block/Kconfig
index f6ca5e9597e4..168b873eb666 100644
--- a/block/Kconfig
+++ b/block/Kconfig
@@ -50,31 +50,6 @@ config BLK_DEV_BSG_COMMON
 config BLK_ICQ
 	bool
 
-config BLK_USE_PIN_USER_PAGES_FOR_DIO
-	bool "DEVELOPERS ONLY: Enable pin_user_pages() for Direct IO" if EXPERT
-	default n
-	help
-	  For Direct IO code, retain the pages via calls to
-	  pin_user_pages_fast(), instead of via get_user_pages_fast().
-	  Likewise, use pin_user_page() instead of get_page(). And then
-	  release such pages via unpin_user_page(), instead of
-	  put_page().
-
-	  This is a temporary setting, which will be deleted once the
-	  conversion is completed, reviewed, and tested. In the meantime,
-	  developers can enable this in order to try out each filesystem.
-	  For that, it's best to monitor these /proc/vmstat items:
-
-		nr_foll_pin_acquired
-		nr_foll_pin_released
-
-	  ...to ensure that they remain equal, when "at rest".
-
-	  Say yes here ONLY if are actively developing or testing the
-	  block layer or filesystems with pin_user_pages_fast().
-	  Otherwise, this is just a way to throw off the refcounting of
-	  pages in the system.
-
 config BLK_DEV_BSGLIB
 	bool "Block layer SG support v4 helper lib"
 	select BLK_DEV_BSG_COMMON
diff --git a/include/linux/bvec.h b/include/linux/bvec.h
index a96a68c687f6..5bc98b334efe 100644
--- a/include/linux/bvec.h
+++ b/include/linux/bvec.h
@@ -241,15 +241,8 @@ static inline void *bvec_virt(struct bio_vec *bvec)
 	return page_address(bvec->bv_page) + bvec->bv_offset;
 }
 
-#ifdef CONFIG_BLK_USE_PIN_USER_PAGES_FOR_DIO
 #define dio_w_pin_user_pages_fast(s, n, p, f)	pin_user_pages_fast(s, n, p, f)
 #define dio_w_pin_user_page(p)			pin_user_page(p)
 #define dio_w_unpin_user_page(p)		unpin_user_page(p)
 
-#else
-#define dio_w_pin_user_pages_fast(s, n, p, f)	get_user_pages_fast(s, n, p, f)
-#define dio_w_pin_user_page(p)			get_page(p)
-#define dio_w_unpin_user_page(p)		put_page(p)
-#endif
-
 #endif /* __LINUX_BVEC_H */
-- 
2.35.1





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux