Skip to contentSkip to conversation

fs/direct-io: Remove linux/prefetch.h include

PATCH In review Youling Tang 3 participants 4 messages Jun 3, 2024 – Jul 26, 2024 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs/direct-io: Remove linux/prefetch.h include

From: Youling Tang <[email protected]>

After commit c22198e78d52 ("direct-io: remove random prefetches"), Nothing in this file needs anything from linux/prefetch.h.

---
 fs/direct-io.c | 6 ------
 1 file changed, 6 deletions(-)
fs/direct-io.c +0 -6
index b0aafe640fa4..bbd05f1a2145 100644
@@ -37,7 +37,6 @@
 #include <linux/rwsem.h>
 #include <linux/uio.h>
 #include <linux/atomic.h>
-#include <linux/prefetch.h>
 
 #include "internal.h"
 
@@ -1121,11 +1120,6 @@ ssize_t __blockdev_direct_IO(struct kiocb *iocb, struct inode *inode,
 	struct blk_plug plug;
 	unsigned long align = offset | iov_iter_alignment(iter);
 
-	/*
-	 * Avoid references to bdev if not absolutely needed to give
-	 * the early prefetch in the caller enough time.
-	 */
-
 	/* watch out for a 0 len io from a tricksy fs */
 	if (iov_iter_rw(iter) == READ && !count)
 		return 0;
Signature · 1 line
2.34.1
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Youling Tang

From: Youling Tang <[email protected]>

After commit c22198e78d52 ("direct-io: remove random prefetches"), Nothing in this file needs anything from linux/prefetch.h.

Looks good. Feel free to add:

Honza

Quoted 31 lines
---
 fs/direct-io.c | 6 ------
 1 file changed, 6 deletions(-)
fs/direct-io.c +0 -6
index b0aafe640fa4..bbd05f1a2145 100644
@@ -37,7 +37,6 @@
 #include <linux/rwsem.h>
 #include <linux/uio.h>
 #include <linux/atomic.h>
-#include <linux/prefetch.h>
 
 #include "internal.h"
 
@@ -1121,11 +1120,6 @@ ssize_t __blockdev_direct_IO(struct kiocb *iocb, struct inode *inode,
 	struct blk_plug plug;
 	unsigned long align = offset | iov_iter_alignment(iter);
 
-	/*
-	 * Avoid references to bdev if not absolutely needed to give
-	 * the early prefetch in the caller enough time.
-	 */
-
 	/* watch out for a 0 len io from a tricksy fs */
 	if (iov_iter_rw(iter) == READ && !count)
 		return 0;
Signature · 1 line
2.34.1
Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
#2 lore raw

Hi,

Quoted 7 lines · Jan Kara
Quoted 6 lines · Youling Tang

From: Youling Tang <[email protected]>

After commit c22198e78d52 ("direct-io: remove random prefetches"), Nothing in this file needs anything from linux/prefetch.h.

Sorry to bother you, but do we still need this patch?

Thanks,
Youling.

Quoted 37 lines

Looks good. Feel free to add:

Honza

Quoted 31 lines
---
  fs/direct-io.c | 6 ------
  1 file changed, 6 deletions(-)
fs/direct-io.c +0 -6
index b0aafe640fa4..bbd05f1a2145 100644
@@ -37,7 +37,6 @@
  #include <linux/rwsem.h>
  #include <linux/uio.h>
  #include <linux/atomic.h>
-#include <linux/prefetch.h>
 
  #include "internal.h"
 
@@ -1121,11 +1120,6 @@ ssize_t __blockdev_direct_IO(struct kiocb *iocb, struct inode *inode,
  	struct blk_plug plug;
  	unsigned long align = offset | iov_iter_alignment(iter);
 
-	/*
-	 * Avoid references to bdev if not absolutely needed to give
-	 * the early prefetch in the caller enough time.
-	 */
-
  	/* watch out for a 0 len io from a tricksy fs */
  	if (iov_iter_rw(iter) == READ && !count)
  		return 0;
Signature · 1 line
2.34.1
#3 lore raw
Quoted 11 lines · Youling Tang

Hi,

Quoted 7 lines · Jan Kara
Quoted 6 lines · Youling Tang

From: Youling Tang <[email protected]>

After commit c22198e78d52 ("direct-io: remove random prefetches"), Nothing in this file needs anything from linux/prefetch.h.

Sorry to bother you, but do we still need this patch?

It's in the vfs.misc pile for next merge window.