From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752732AbcGMKNK (ORCPT ); Wed, 13 Jul 2016 06:13:10 -0400 Received: from mga14.intel.com ([192.55.52.115]:48429 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751136AbcGMKNF (ORCPT ); Wed, 13 Jul 2016 06:13:05 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,356,1464678000"; d="scan'208";a="1020771467" From: Chen Yu To: Pavel Machek Cc: linux-pm@vger.kernel.org, "Rafael J. Wysocki" , Len Brown , linux-kernel@vger.kernel.org Subject: Re: [PATCH] PM / hibernate: Introduce snapshot test mode for hibernation References: <1467873658-31986-1-git-send-email-yu.c.chen@intel.com> <20160713095005.GA27870@amd> Message-ID: <578615D5.3060501@intel.com> Date: Wed, 13 Jul 2016 18:20:05 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <20160713095005.GA27870@amd> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Pavel, thanks for your reply, On 2016年07月13日 17:50, Pavel Machek wrote: > On Thu 2016-07-07 14:40:58, Chen Yu wrote: >> This mode is to verify if the snapshot data written to >> swap device can be successfully restored to memory. It >> is useful to ease the debugging process on hibernation, >> since this mode can not only bypass the BIOSen/bootloader, >> but also the system re-initialization. >> >> For example: >> $ sudo echo snapshot > /sys/power/disk >> $ sudo echo disk > /sys/power/state >> >> /* manual resume.*/ >> $ sudo echo 8:3 > /sys/power/resume > Your examples will not work, will they? It works on my platform, although I did not tested it for too many rounds. And here's a revised version of v2, which introduced a new test mode in pm_test, thus users do not need to run a manual resume. https://patchwork.kernel.org/patch/9226837/ > > This is also quite tricky/dangerous. If you do this with filesystems > mounted R/W, it is "good bye, filesystems". Ah, yes, this is quite tricky, maybe we can use this option as a debug method, for example, boot with rootfs = initrd, without mounting any disks, and then swapon the swap device, and do a testing. This should be safer? > > I guess updating documentation would be welcome from my side, > otherwise it should be ok. OK, I'll update the documents. > > Acked-by: Pavel Machek thanks. > > Best regards, > Pavel >