linux-4.4.1/move_to_new_page()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#ae8330d9]
#backlinks
*説明 [#m2c88b98]
-パス: [[linux-4.4.1/mm/migrate.c]]
-FIXME: これは何?
--説明
**引数 [#p269081a]
-struct page *newpage
--
--[[linux-4.4.1/page]]
-struct page *page
--
--[[linux-4.4.1/page]]
-enum migrate_mode mode
--
--[[linux-4.4.1/migrate_mode]]
**返り値 [#sfc6b4d5]
-int
--
**参考 [#ie84a2f8]
*実装 [#tc8b39bc]
/*
* Move a page to a newly allocated page
* The page is locked and all ptes have been successfull...
*
* The new page will have replaced the old page if this ...
* is successful.
*
* Return value:
* < 0 - error code
* MIGRATEPAGE_SUCCESS - success
*/
static int move_to_new_page(struct page *newpage, struct...
enum migrate_mode mode)
{
struct address_space *mapping;
int rc;
-
--[[linux-4.4.1/address_space]]
VM_BUG_ON_PAGE(!PageLocked(page), page);
VM_BUG_ON_PAGE(!PageLocked(newpage), newpage);
-
--[[linux-4.4.1/VM_BUG_ON_PAGE()]]
--[[linux-4.4.1/PageLocked()]]
mapping = page_mapping(page);
if (!mapping)
rc = migrate_page(mapping, newpage, page, mode);
-
--[[linux-4.4.1/page_mapping()]]
--[[linux-4.4.1/migrate_page()]]
else if (mapping->a_ops->migratepage)
/*
* Most pages have a mapping and most filesystems prov...
* migratepage callback. Anonymous pages are part of s...
* space which also has its own migratepage callback. ...
* is the most common path for page migration.
*/
rc = mapping->a_ops->migratepage(mapping, newpage, pag...
-
--mapping->a_ops は const struct address_space_operations...
--[[linux-4.4.1/address_space_operations]]
else
rc = fallback_migrate_page(mapping, newpage, page, mod...
-
--[[linux-4.4.1/fallback_migrate_page()]]
/*
* When successful, old pagecache page->mapping must be...
* page is freed; but stats require that PageAnon be le...
*/
if (rc == MIGRATEPAGE_SUCCESS) {
set_page_memcg(page, NULL);
if (!PageAnon(page))
page->mapping = NULL;
}
-
--[[linux-4.4.1/set_page_memcg()]]
--[[linux-4.4.1/PageAnon()]]
return rc;
}
*コメント [#t2e92344]
終了行:
*参照元 [#ae8330d9]
#backlinks
*説明 [#m2c88b98]
-パス: [[linux-4.4.1/mm/migrate.c]]
-FIXME: これは何?
--説明
**引数 [#p269081a]
-struct page *newpage
--
--[[linux-4.4.1/page]]
-struct page *page
--
--[[linux-4.4.1/page]]
-enum migrate_mode mode
--
--[[linux-4.4.1/migrate_mode]]
**返り値 [#sfc6b4d5]
-int
--
**参考 [#ie84a2f8]
*実装 [#tc8b39bc]
/*
* Move a page to a newly allocated page
* The page is locked and all ptes have been successfull...
*
* The new page will have replaced the old page if this ...
* is successful.
*
* Return value:
* < 0 - error code
* MIGRATEPAGE_SUCCESS - success
*/
static int move_to_new_page(struct page *newpage, struct...
enum migrate_mode mode)
{
struct address_space *mapping;
int rc;
-
--[[linux-4.4.1/address_space]]
VM_BUG_ON_PAGE(!PageLocked(page), page);
VM_BUG_ON_PAGE(!PageLocked(newpage), newpage);
-
--[[linux-4.4.1/VM_BUG_ON_PAGE()]]
--[[linux-4.4.1/PageLocked()]]
mapping = page_mapping(page);
if (!mapping)
rc = migrate_page(mapping, newpage, page, mode);
-
--[[linux-4.4.1/page_mapping()]]
--[[linux-4.4.1/migrate_page()]]
else if (mapping->a_ops->migratepage)
/*
* Most pages have a mapping and most filesystems prov...
* migratepage callback. Anonymous pages are part of s...
* space which also has its own migratepage callback. ...
* is the most common path for page migration.
*/
rc = mapping->a_ops->migratepage(mapping, newpage, pag...
-
--mapping->a_ops は const struct address_space_operations...
--[[linux-4.4.1/address_space_operations]]
else
rc = fallback_migrate_page(mapping, newpage, page, mod...
-
--[[linux-4.4.1/fallback_migrate_page()]]
/*
* When successful, old pagecache page->mapping must be...
* page is freed; but stats require that PageAnon be le...
*/
if (rc == MIGRATEPAGE_SUCCESS) {
set_page_memcg(page, NULL);
if (!PageAnon(page))
page->mapping = NULL;
}
-
--[[linux-4.4.1/set_page_memcg()]]
--[[linux-4.4.1/PageAnon()]]
return rc;
}
*コメント [#t2e92344]
ページ名: