From owner-freebsd-hackers@freebsd.org Tue Aug 23 07:05:26 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 277EDBC3639 for ; Tue, 23 Aug 2016 07:05:26 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 104F617D2 for ; Tue, 23 Aug 2016 07:05:26 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 0F9D2BC3638; Tue, 23 Aug 2016 07:05:26 +0000 (UTC) Delivered-To: hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F44BBC3637 for ; Tue, 23 Aug 2016 07:05:26 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CEFA17D1 for ; Tue, 23 Aug 2016 07:05:25 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u7N75Ghx045069 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 23 Aug 2016 10:05:16 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u7N75Ghx045069 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u7N75GuH045068; Tue, 23 Aug 2016 10:05:16 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 23 Aug 2016 10:05:16 +0300 From: Konstantin Belousov To: Eric McCorkle Cc: hackers@freebsd.org Subject: Re: Info about suspend-to-disk Message-ID: <20160823070516.GI83214@kib.kiev.ua> References: <141b1050-8fb5-e8c7-0e0f-50607f2f28b9@metricspace.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <141b1050-8fb5-e8c7-0e0f-50607f2f28b9@metricspace.net> User-Agent: Mutt/1.6.1 (2016-04-27) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Aug 2016 07:05:26 -0000 On Mon, Aug 22, 2016 at 11:41:12PM -0400, Eric McCorkle wrote: > Hi everyone, > > I'm gathering information in preparation for possibly working on > suspend-to-disk functionality. I have a fairly good idea of what it > would take and one way to attack it. The overall plan would look > something like this: > > * Use dump functionality to write an entire OS image out to disk. As > this is a voluntary dump, it should be possible to go through the FS > interface to produce a regular file. And get fs state unsynchronized between on-disk state and the cached state in memory at the moment where you begin dumping. Even if you preallocate all storage for the dump file before taking kernel memory snapshot, a write to the file may result in reallocation of the blocks and incompatible changes in the inode block, at least.