mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 05:31:15 +00:00
PM / Hibernate: Make default image size depend on total RAM size
The default hibernation image size is currently hard coded and euqal to 500 MB, which is not a reasonable default on many contemporary systems. Make it equal 2/5 of the total RAM size (this is slightly below the maximum, i.e. 1/2 of the total RAM size, and seems to be generally suitable). Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Tested-by: M. Vefa Bicakci <bicave@superonline.com>
This commit is contained in:
parent
266f1a25ef
commit
ac5c24ec1e
4 changed files with 16 additions and 3 deletions
|
@ -321,6 +321,7 @@ static int __init pm_init(void)
|
|||
int error = pm_start_workqueue();
|
||||
if (error)
|
||||
return error;
|
||||
hibernate_image_size_init();
|
||||
power_kobj = kobject_create_and_add("power", NULL);
|
||||
if (!power_kobj)
|
||||
return -ENOMEM;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue