aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMel Gorman <mgorman@techsingularity.net>2017-11-15 20:38:10 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-11-15 21:21:06 -0500
commit7f0b5fb953e750a7410cc96c67a656d79db48bcb (patch)
tree2c32a0126ac4610ae96e80e0e2e72199ec3d076e
parent0fac3ba527f23219678c7c10c767e37d40127b51 (diff)
mm, pagevec: rename pagevec drained field
According to Vlastimil Babka, the drained field in pagevec is potentially misleading because it might be interpreted as draining this pagevec instead of the percpu lru pagevecs. Rename the field for clarity. Link: http://lkml.kernel.org/r/20171019093346.ylahzdpzmoriyf4v@techsingularity.net Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Suggested-by: Vlastimil Babka <vbabka@suse.cz> Cc: Andi Kleen <ak@linux.intel.com> Cc: Dave Chinner <david@fromorbit.com> Cc: Dave Hansen <dave.hansen@intel.com> Cc: Jan Kara <jack@suse.cz> Cc: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--include/linux/pagevec.h4
-rw-r--r--mm/swap.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/pagevec.h b/include/linux/pagevec.h
index eebefd209424..5fb6580f7f23 100644
--- a/include/linux/pagevec.h
+++ b/include/linux/pagevec.h
@@ -17,7 +17,7 @@ struct address_space;
17 17
18struct pagevec { 18struct pagevec {
19 unsigned long nr; 19 unsigned long nr;
20 bool drained; 20 bool percpu_pvec_drained;
21 struct page *pages[PAGEVEC_SIZE]; 21 struct page *pages[PAGEVEC_SIZE];
22}; 22};
23 23
@@ -53,7 +53,7 @@ static inline unsigned pagevec_lookup_tag(struct pagevec *pvec,
53static inline void pagevec_init(struct pagevec *pvec) 53static inline void pagevec_init(struct pagevec *pvec)
54{ 54{
55 pvec->nr = 0; 55 pvec->nr = 0;
56 pvec->drained = false; 56 pvec->percpu_pvec_drained = false;
57} 57}
58 58
59static inline void pagevec_reinit(struct pagevec *pvec) 59static inline void pagevec_reinit(struct pagevec *pvec)
diff --git a/mm/swap.c b/mm/swap.c
index b480279c760c..38e1b6374a97 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -833,9 +833,9 @@ EXPORT_SYMBOL(release_pages);
833 */ 833 */
834void __pagevec_release(struct pagevec *pvec) 834void __pagevec_release(struct pagevec *pvec)
835{ 835{
836 if (!pvec->drained) { 836 if (!pvec->percpu_pvec_drained) {
837 lru_add_drain(); 837 lru_add_drain();
838 pvec->drained = true; 838 pvec->percpu_pvec_drained = true;
839 } 839 }
840 release_pages(pvec->pages, pagevec_count(pvec)); 840 release_pages(pvec->pages, pagevec_count(pvec));
841 pagevec_reinit(pvec); 841 pagevec_reinit(pvec);