提交 7f0b5fb9 编写于 作者: M Mel Gorman 提交者: Linus Torvalds

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.netSigned-off-by: NMel Gorman <mgorman@techsingularity.net>
Suggested-by: NVlastimil 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: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 0fac3ba5
...@@ -17,7 +17,7 @@ struct address_space; ...@@ -17,7 +17,7 @@ struct address_space;
struct pagevec { struct pagevec {
unsigned long nr; unsigned long nr;
bool drained; bool percpu_pvec_drained;
struct page *pages[PAGEVEC_SIZE]; struct page *pages[PAGEVEC_SIZE];
}; };
...@@ -53,7 +53,7 @@ static inline unsigned pagevec_lookup_tag(struct pagevec *pvec, ...@@ -53,7 +53,7 @@ static inline unsigned pagevec_lookup_tag(struct pagevec *pvec,
static inline void pagevec_init(struct pagevec *pvec) static inline void pagevec_init(struct pagevec *pvec)
{ {
pvec->nr = 0; pvec->nr = 0;
pvec->drained = false; pvec->percpu_pvec_drained = false;
} }
static inline void pagevec_reinit(struct pagevec *pvec) static inline void pagevec_reinit(struct pagevec *pvec)
......
...@@ -833,9 +833,9 @@ EXPORT_SYMBOL(release_pages); ...@@ -833,9 +833,9 @@ EXPORT_SYMBOL(release_pages);
*/ */
void __pagevec_release(struct pagevec *pvec) void __pagevec_release(struct pagevec *pvec)
{ {
if (!pvec->drained) { if (!pvec->percpu_pvec_drained) {
lru_add_drain(); lru_add_drain();
pvec->drained = true; pvec->percpu_pvec_drained = true;
} }
release_pages(pvec->pages, pagevec_count(pvec)); release_pages(pvec->pages, pagevec_count(pvec));
pagevec_reinit(pvec); pagevec_reinit(pvec);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册