[PATCH 16/16] mm: filemap: Prefetch page->flags if !PageUptodate

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

 



The write_end handler is likely to call SetPageUptodate which is an atomic
operation so prefetch the line.

Signed-off-by: Mel Gorman <mgorman@xxxxxxx>
---
 mm/filemap.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/mm/filemap.c b/mm/filemap.c
index c28f69c..40713da 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -2551,6 +2551,9 @@ again:
 		copied = iov_iter_copy_from_user_atomic(page, i, offset, bytes);
 		flush_dcache_page(page);
 
+		if (!PageUptodate(page))
+			prefetchw(&page->flags);
+
 		status = a_ops->write_end(file, mapping, pos, bytes, copied,
 						page, fsdata);
 		if (unlikely(status < 0))
-- 
1.8.4.5

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux