博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
慢慢欣赏linux 页面回收
阅读量:4070 次
发布时间:2019-05-25

本文共 3688 字,大约阅读时间需要 12 分钟。

int try_to_unmap_one(struct page *page, struct vm_area_struct *vma, unsigned long address, enum ttu_flags flags)	struct mm_struct *mm = vma->vm_mm;	pte_t *pte = page_check_address(page, mm, address, &ptl, 0);		flush_cache_page(vma, address, page_to_pfn(page));	pteval = ptep_clear_flush_notify(vma, address, pte);//tlb		if (pte_dirty(pteval))		set_page_dirty(page);	page_remove_rmap(page);	page_cache_release(page);//释放页框
unsigned long try_to_free_pages(struct zonelist *zonelist, int order, gfp_t gfp_mask, nodemask_t *nodemask)	struct scan_control sc = {		.gfp_mask = gfp_mask,		.may_writepage = !laptop_mode,		.nr_to_reclaim = SWAP_CLUSTER_MAX,		.may_unmap = 1,		.may_swap = 1,		.swappiness = vm_swappiness,		.order = order,		.mem_cgroup = NULL,		.isolate_pages = isolate_pages_global,		.nodemask = nodemask,	};	return do_try_to_free_pages(zonelist, &sc);	=>unsigned long do_try_to_free_pages(struct zonelist *zonelist, struct scan_control *sc)		for (priority = DEF_PRIORITY; priority >= 0; priority--)			shrink_zones(priority, zonelist, sc);			=>void shrink_zones(int priority, struct zonelist *zonelist, struct scan_control *sc)				for_each_zone_zonelist_nodemask(zone, z, zonelist, high_zoneidx, sc->nodemask)					shrink_zone(priority, zone, sc);					=>void shrink_zone(int priority, struct zone *zone, struct scan_control *sc)						while (nr[LRU_INACTIVE_ANON] || nr[LRU_ACTIVE_FILE] || nr[LRU_INACTIVE_FILE])							for_each_evictable_lru(l)								if (nr[l])									nr_to_scan = min_t(unsigned long, nr[l], SWAP_CLUSTER_MAX);									nr[l] -= nr_to_scan;											nr_reclaimed += shrink_list(l, nr_to_scan, zone, sc, priority);									=>unsigned long shrink_list(enum lru_list lru, unsigned long nr_to_scan, struct zone *zone, struct scan_control *sc, int priority)										int file = is_file_lru(lru);										if (is_active_lru(lru))											if (inactive_list_is_low(zone, sc, file))												shrink_active_list(nr_to_scan, zone, sc, priority, file);											return 0;																					return shrink_inactive_list(nr_to_scan, zone, sc, priority, file);										=>unsigned long shrink_inactive_list(unsigned long max_scan, struct zone *zone, struct scan_control *sc, int priority, int file)											nr_freed = shrink_page_list(&page_list, sc, PAGEOUT_IO_ASYNC);

Linux页面回收与反向映射机制

http://www.233.com/linux/fudao/20110324/153235403-4.html

Linux内存管理之页面回收

https://blog.csdn.net/wh8_2011/article/details/52275231

【内核】Linux 2.6 内存反向映射机制 Reverse Mapping

https://www.cnblogs.com/visayafan/archive/2011/12/24/2300758.html

linux 逆向映射机制浅析

https://www.cnblogs.com/ck1020/p/6883061.html

郭健:Linux内存管理系统参数配置之overcommit

https://blog.csdn.net/jus3ve/article/details/80681655

页面回收---LRU链表

https://blog.csdn.net/zouxiaoting/article/details/8824896

直接内存回收中的等待队列   好文章

http://www.cnblogs.com/tolimit/p/5481419.html

Linux内核设计与实现(16)--页高速缓存和页回写

http://blog.chinaunix.net/uid-24708340-id-4060950.html

Linux Kernel文件系统写I/O流程代码分析(二)bdi_writeback

https://www.cnblogs.com/jimbo17/p/10491223.html

read()/write()的生命旅程之四——第四章:writeback

http://blog.sina.com.cn/s/blog_a558c25a0102vhv3.html

block_prepare_write

https://blog.csdn.net/kidd_3/article/details/7032785

基数树(radix tree)

https://www.cnblogs.com/wuchanming/p/3824990.html

linux内核之把块放在页高速缓存中

http://blog.chinaunix.net/uid-28977986-id-3778156.html

内存脏数据下刷(linux2.6.18/linux.2.6.32)剖析

https://blog.csdn.net/u011013137/article/details/9110967

Linux内核进程详解之二:bdi-default

http://www.lenky.info/archives/2012/02/1125

Linux内存管理 —— 文件系统缓存和匿名页的交换

https://blog.csdn.net/jasonchen_gbd/article/details/79462014

内存管理---匿名页面管理

https://blog.csdn.net/jasonlee_lijiaqi/article/details/83068446

Linux 匿名页的反向映射

https://www.cnblogs.com/linhaostudy/p/10350326.html

你可能感兴趣的文章
Android/Linux 内存监视
查看>>
Android2.1消息应用(Messaging)源码学习笔记
查看>>
剑指offer算法题分析与整理(三)
查看>>
JVM并发机制探讨—内存模型、内存可见性和指令重排序
查看>>
nginx+tomcat+memcached (msm)实现 session同步复制
查看>>
WAV文件解析
查看>>
WPF中PATH使用AI导出SVG的方法
查看>>
QT打开项目提示no valid settings file could be found
查看>>
android 代码实现圆角
查看>>
java LinkedList与ArrayList迭代器遍历和for遍历对比
查看>>
drat中构造方法
查看>>
JavaScript的一些基础-数据类型
查看>>
coursesa课程 Python 3 programming 统计文件有多少单词
查看>>
coursesa课程 Python 3 programming course_2_assessment_7 多参数函数练习题
查看>>
coursesa课程 Python 3 programming course_2_assessment_8 sorted练习题
查看>>
多线程使用随机函数需要注意的一点
查看>>
getpeername,getsockname
查看>>
Visual Studio 2010:C++0x新特性
查看>>
所谓的进步和提升,就是完成认知升级
查看>>
如何用好碎片化时间,让思维更有效率?
查看>>