mm/writeback: Convert tracing writeback_page_template to folios

Rename writeback_dirty_page() to writeback_dirty_folio() and
wait_on_page_writeback() to folio_wait_writeback().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: David Howells <dhowells@redhat.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
This commit is contained in:
Matthew Wilcox (Oracle) 2021-07-13 22:45:50 -04:00
parent 203a315166
commit b9b0ff61ee
2 changed files with 13 additions and 13 deletions

View File

@ -52,11 +52,11 @@ WB_WORK_REASON
struct wb_writeback_work;
DECLARE_EVENT_CLASS(writeback_page_template,
DECLARE_EVENT_CLASS(writeback_folio_template,
TP_PROTO(struct page *page, struct address_space *mapping),
TP_PROTO(struct folio *folio, struct address_space *mapping),
TP_ARGS(page, mapping),
TP_ARGS(folio, mapping),
TP_STRUCT__entry (
__array(char, name, 32)
@ -69,7 +69,7 @@ DECLARE_EVENT_CLASS(writeback_page_template,
bdi_dev_name(mapping ? inode_to_bdi(mapping->host) :
NULL), 32);
__entry->ino = mapping ? mapping->host->i_ino : 0;
__entry->index = page->index;
__entry->index = folio->index;
),
TP_printk("bdi %s: ino=%lu index=%lu",
@ -79,18 +79,18 @@ DECLARE_EVENT_CLASS(writeback_page_template,
)
);
DEFINE_EVENT(writeback_page_template, writeback_dirty_page,
DEFINE_EVENT(writeback_folio_template, writeback_dirty_folio,
TP_PROTO(struct page *page, struct address_space *mapping),
TP_PROTO(struct folio *folio, struct address_space *mapping),
TP_ARGS(page, mapping)
TP_ARGS(folio, mapping)
);
DEFINE_EVENT(writeback_page_template, wait_on_page_writeback,
DEFINE_EVENT(writeback_folio_template, folio_wait_writeback,
TP_PROTO(struct page *page, struct address_space *mapping),
TP_PROTO(struct folio *folio, struct address_space *mapping),
TP_ARGS(page, mapping)
TP_ARGS(folio, mapping)
);
DECLARE_EVENT_CLASS(writeback_dirty_inode_template,

View File

@ -2443,7 +2443,7 @@ static void folio_account_dirtied(struct folio *folio,
{
struct inode *inode = mapping->host;
trace_writeback_dirty_page(&folio->page, mapping);
trace_writeback_dirty_folio(folio, mapping);
if (mapping_can_writeback(mapping)) {
struct bdi_writeback *wb;
@ -2894,7 +2894,7 @@ EXPORT_SYMBOL(__folio_start_writeback);
void folio_wait_writeback(struct folio *folio)
{
while (folio_test_writeback(folio)) {
trace_wait_on_page_writeback(&folio->page, folio_mapping(folio));
trace_folio_wait_writeback(folio, folio_mapping(folio));
folio_wait_bit(folio, PG_writeback);
}
}
@ -2916,7 +2916,7 @@ EXPORT_SYMBOL_GPL(folio_wait_writeback);
int folio_wait_writeback_killable(struct folio *folio)
{
while (folio_test_writeback(folio)) {
trace_wait_on_page_writeback(&folio->page, folio_mapping(folio));
trace_folio_wait_writeback(folio, folio_mapping(folio));
if (folio_wait_bit_killable(folio, PG_writeback))
return -EINTR;
}