函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\power\snapshot.c Create Date:2022-07-27 11:01:25
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:swsusp_save

函数原型:asmlinkage __visible int swsusp_save(void)

返回类型:int

参数:

1979  打印信息("Creating hibernation image:\n")
1981  drain_local_pages(NULL)
1982  nr_pages等于_data_pages - Compute the total number of saveable non-highmem pages.
1983  nr_highmem等于count_highmem_pages()
1984  打印信息("Need to copy %u pages\n", nr_pages + nr_highmem)
1986  如果非gh_free_mem - Check if there is enough free memory for the image.
1987  打印错误信息("Not enough free memory\n")
1988  返回:负ENOMEM
1991  如果swsusp_alloc - Allocate memory for hibernation image
1992  打印错误信息("Memory allocation failed\n")
1993  返回:负ENOMEM
2000  drain_local_pages(NULL)
2001  copy_data_pages( & Memory bitmap used during hibernation for marking allocated page frames that* will contain copies of saveable pages. During restore it is initially used* for marking hibernation image pages, but then the set bits from it are, & Memory bitmap used for marking saveable pages (during hibernation) or* hibernation image pages (during restore))
2009  nr_pages加等于nr_highmem
2010  Total number of image pages 等于nr_pages
2011  Number of pages needed for saving the original pfns of the image pages 等于DIV_ROUND_UP(nr_pages * sizeof(long), PAGE_SIZE)
2013  打印信息("Hibernation image created (%d pages copied)\n", nr_pages)
2015  返回:0