*参照元 [#m667a4f0]
#backlinks

*説明 [#aed736d7]
-パス: [[linux-4.4.1/mm/rmap.c]]

-FIXME: これは何?
--説明


**引数 [#qa14c774]
-struct page *page
--
--[[linux-4.4.1/page]]
-struct vm_area_struct *vma
--
--[[linux-4.4.1/vm_area_struct]]
-unsigned long address
--


**返り値 [#l9778385]
-void


**参考 [#z6382a20]


*実装 [#j2e31ffc]
 /**
  * page_add_new_anon_rmap - add pte mapping to a new anonymous page
  * @page:	the page to add the mapping to
  * @vma:	the vm area in which the mapping is added
  * @address:	the user virtual address mapped
  *
  * Same as page_add_anon_rmap but must only be called on *new* pages.
  * This means the inc-and-test can be bypassed.
  * Page does not have to be locked.
  */
 void page_add_new_anon_rmap(struct page *page,
 	struct vm_area_struct *vma, unsigned long address)
 {
 	VM_BUG_ON_VMA(address < vma->vm_start || address >= vma->vm_end, vma);
-
--[[linux-4.4.1/VM_BUG_ON_VMA()]]

 	SetPageSwapBacked(page);
 	atomic_set(&page->_mapcount, 0); /* increment count (starts at -1) */
-
--[[linux-4.4.1/SetPageSwapBacked()]]
--[[linux-4.4.1/atomic_set()]]

 	if (PageTransHuge(page))
 		__inc_zone_page_state(page, NR_ANON_TRANSPARENT_HUGEPAGES);
-
--[[linux-4.4.1/PageTransHuge()]]
--[[linux-4.4.1/__inc_zone_page_state()]]

 	__mod_zone_page_state(page_zone(page), NR_ANON_PAGES,
 			hpage_nr_pages(page));
 	__page_set_anon_rmap(page, vma, address, 1);
-
--[[linux-4.4.1/__mod_zone_page_state()]]
--[[linux-4.4.1/page_zone()]]
--[[linux-4.4.1/hpage_nr_pages()]]
--[[linux-4.4.1/__page_set_anon_rmap()]]

 }


*コメント [#o817ec52]


トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS