From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756644Ab1HXJeU (ORCPT ); Wed, 24 Aug 2011 05:34:20 -0400 Received: from mailhub.sw.ru ([195.214.232.25]:27192 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751557Ab1HXJeT (ORCPT ); Wed, 24 Aug 2011 05:34:19 -0400 Message-ID: <4E54C573.10302@parallels.com> Date: Wed, 24 Aug 2011 13:33:39 +0400 From: Pavel Emelyanov User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Thunderbird/3.1.10 MIME-Version: 1.0 To: Pekka Enberg CC: Cyrill Gorcunov , Nathan Lynch , Oren Laadan , Daniel Lezcano , Tejun Heo , Andrew Morton , Glauber Costa , "containers@lists.osdl.org" , "linux-kernel@vger.kernel.org" , Serge Hallyn , LINUXFS-ML , James Bottomley Subject: Re: [RFC] fs, proc: Introduce the /proc//map_files/ directory v2 References: <20110824085329.GL29452@sun> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/24/2011 01:21 PM, Pekka Enberg wrote: > On Wed, Aug 24, 2011 at 11:53 AM, Cyrill Gorcunov wrote: >> From: Pavel Emelyanov >> >> This one behaves similarly to the /proc//fd/ one - it contains symlinks >> one for each mapping with file, the name of a symlink is vma->vm_start, the >> target is the file. Opening a symlink results in a file that point exactly >> to the same inode as them vma's one. >> >> This thing is aimed to help checkpointing processes. > > OK, but you really should explain _how_ this will help with checkpointing. This helps in three ways: 1. When dumping a task mappings we do know exact file that is mapped by particular region. We do this by opening /proc/pid/map_files/address symlink the way we do with file descriptors. 2. This also helps in determining which anonymous shared mappings are shared with each other by comparing the inodes of them. 3. When restoring a set of process in case two of them has a mapping shared, we map the memory by the 1st one and then open its /proc/pid/map_files/address file and map it by the 2nd task. > Pekka > . >