mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
mm/page-writeback: introduce tracepoint for wait_on_page_writeback()
Recently there have been some hung tasks on our server due to wait_on_page_writeback(), and we want to know the details of this PG_writeback, i.e. this page is writing back to which device. But it is not so convenient to get the details. I think it would be better to introduce a tracepoint for diagnosing the writeback details. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Yafang Shao <[email protected]> Reviewed-by: Andrew Morton <[email protected]> Cc: Jan Kara <[email protected]> Cc: Michal Hocko <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
60b62ff7cc
commit
19343b5bdd
3 changed files with 28 additions and 10 deletions
|
|
@ -2808,6 +2808,18 @@ int __test_set_page_writeback(struct page *page, bool keep_write)
|
|||
}
|
||||
EXPORT_SYMBOL(__test_set_page_writeback);
|
||||
|
||||
/*
|
||||
* Wait for a page to complete writeback
|
||||
*/
|
||||
void wait_on_page_writeback(struct page *page)
|
||||
{
|
||||
if (PageWriteback(page)) {
|
||||
trace_wait_on_page_writeback(page, page_mapping(page));
|
||||
wait_on_page_bit(page, PG_writeback);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(wait_on_page_writeback);
|
||||
|
||||
/**
|
||||
* wait_for_stable_page() - wait for writeback to finish, if necessary.
|
||||
* @page: The page to wait on.
|
||||
|
|
|
|||
Loading…
Reference in a new issue