From patchwork Fri Mar 18 16:22:21 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manoj Iyer X-Patchwork-Id: 87548 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 5747AB6FD7 for ; Sat, 19 Mar 2011 03:22:42 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Q0cRc-0003Q7-9L; Fri, 18 Mar 2011 16:22:32 +0000 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Q0cRZ-0003Ph-S3 for kernel-team@lists.ubuntu.com; Fri, 18 Mar 2011 16:22:29 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1Q0cRZ-0007pD-Nv for ; Fri, 18 Mar 2011 16:22:29 +0000 Received: from cpe-72-177-40-4.austin.res.rr.com ([72.177.40.4] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1Q0cRZ-0006pO-EJ for kernel-team@lists.ubuntu.com; Fri, 18 Mar 2011 16:22:29 +0000 From: Manoj Iyer To: kernel-team@lists.ubuntu.com Subject: [MAVERICK SRU 1/2] Bug#737208 PM / Hibernate: Make default image size depend on total RAM size Date: Fri, 18 Mar 2011 11:22:21 -0500 Message-Id: <1300465342-4028-1-git-send-email-manoj.iyer@canonical.com> X-Mailer: git-send-email 1.7.1 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com Please consider the following SRU to maverick. The patch to hibernate code helps to solve failure to hibernate issues seen on some lenovo laptops. I have already proposed this patch to stable@kernel.org. SRU JUSTIFICATION --------------------------- CAUSE ----------- [ 839.784885] PM: Creating hibernation image: [ 839.788014] PM: Need to copy 120225 pages [ 839.788014] PM: Normal pages needed: 118714 + 1024, available pages: 118002 [ 839.788014] PM: Not enough free memory [ 839.788014] PM: Error -12 creating hibernation image FIX ---- Upstream patch reduces the image size to it equal 2/5 of the total RAM size. This combined with shutdown hibernate mode fixes this issue. TEST ------ This upstream patch was tested on a lenovo x120e by me, please see comments above for test results and details. The following changes since commit 98e5bbf03976d01a116c000ec141ec7b5325f759: UBUNTU: Ubuntu-2.6.35-28.50 (2011-03-13 09:54:14 -0700) are available in the git repository at: git://kernel.ubuntu.com/manjo/ubuntu-maverick.git lp737208 Rafael J. Wysocki (2): PM / Hibernate: Improve comments in hibernate_preallocate_memory() PM / Hibernate: Make default image size depend on total RAM size Documentation/power/interface.txt | 2 +- kernel/power/main.c | 1 + kernel/power/power.h | 9 ++++++++- kernel/power/snapshot.c | 13 ++++++++++--- 4 files changed, 20 insertions(+), 5 deletions(-)