Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1532155 > unrolled thread

[PATCHv5 10/36] filemap: handle huge pages in filemap_fdatawait_range()

Started by"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
First post2016-11-29 12:30 +0100
Last post2016-11-29 12:30 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCHv5 10/36] filemap: handle huge pages in filemap_fdatawait_range() "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-11-29 12:30 +0100

#1532155 — [PATCHv5 10/36] filemap: handle huge pages in filemap_fdatawait_range()

From"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Date2016-11-29 12:30 +0100
Subject[PATCHv5 10/36] filemap: handle huge pages in filemap_fdatawait_range()
Message-ID<sIOLM-7NC-31@gated-at.bofh.it>
We writeback whole huge page a time.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
---
 mm/filemap.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/mm/filemap.c b/mm/filemap.c
index ec976ddcb88a..52be2b457208 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -405,9 +405,14 @@ static int __filemap_fdatawait_range(struct address_space *mapping,
 			if (page->index > end)
 				continue;
 
+			page = compound_head(page);
 			wait_on_page_writeback(page);
 			if (TestClearPageError(page))
 				ret = -EIO;
+			if (PageTransHuge(page)) {
+				index = page->index + HPAGE_PMD_NR;
+				i += index - pvec.pages[i]->index - 1;
+			}
 		}
 		pagevec_release(&pvec);
 		cond_resched();
-- 
2.10.2

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web